Service

https://ops.crocodealer.com

Shopping cart

Request

POST /v2/carts/get

{
"app":" →  Application IDstring","type":" →  Cart type: cart - client cart, view - viewed products, wish - client wishlist, wait - client wait liststring","visitor":" →  Visitor IDstring!","session":" →  User authentication tokenstring"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","cart": [  →  Cart records listarray{"type":" →  Cart type: cart - client cart, view - viewed products, wish - client wishlist, wait - client wait listobject","product": {  → object"id":" →  Product IDstring"
},
"options":" →  Chosen product option listarray","quantity":" →  Added product quantitystring"}
]
}

Cart actions

Request

POST /v2/carts/action

{
"app":" →  Application IDstring","id":" →  Cart record IDstring","action":" →  Cart action: 'add' - to add a product to the cart, 'remove' - remove a product from the cart, 'restore' - to restore previously removed cart product, 'change' - modify cart productstring!","visitor":" →  Visitor IDstring!","token":" →  User authorization tokenstring!","type":" →  The list type where the product should be placed: 'cart' - user cart, 'view' - product viewed by user, 'wish' - user favorites, 'wait' - user waiting liststring!","product": {  →  Product parametersobject"id":" →  Product IDstring!","sku":" →  Product skustring","name":" →  Product namestring","price":" →  Product pricestring","quantity":" →  Cart product quantitystring!","options":" →  Cart product optionsstring!"
},
"files": [  →  An array with user filesarray{"name":" →  File namestring","action":" →  File action; 'update' to apply changes, 'insert' to upload a new file, 'delete' to delete filestring","order":" →  A file ordernal number. If this parameter is not set, the array index will be used as the ordernal number. Instead of the file array, an object may also be used where the keys are file ordernal numbersstring"}
]
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring"
}

Reading cart

Request

POST /v2/carts/cart

{
"app":" →  Application IDstring","session":" →  User authentication tokenstring","visitor":" →  Visitor IDstring!","user":" →  Obtaining cart by a user ID available for manager level onlyobject","phone":" →  Stands for calculating previous orders by user phonestring","email":" →  Stands for calculating previous orders by user emailstring","type":" →  Cart type: cart - client cart, view - viewed products, wish - client wishlist, wait - client wait liststring","code":" →  User secret code to read cartstring","bonus":" →  Amount of bonuses that is prefered to spendstring","ip":" →  Visitor IP addressstring","promocode":" →  Promocode to get a discountstring","shipment":" →  Shipment methodstring","delivery":" →  Promocode to get a discountstring","payment":" →  Payment methodstring","tariff":" →  Delivery tariffstring","limit":" →  Cart product list limitinteger","status":" →  Cart product status: 0-removed/1-pulishedinteger"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","promocode":" →  Applied promo codestring","price":" →  Total cart pricestring","sale":" →  Total cart sale pricestring","calc":" →  Total cart price with all promotions and discountsstring","discount":" →  Total cart discountstring","quantity":" →  Total cart quantitystring","tariff":" →  Delivery price according chosen tariffstring","cart": [  →  Cart records listarray{"id":" →  Cart record IDstring","created":" →  Record creation datestring","options":" →  Chosen product option listarray","quantity":" →  Added product quantitystring","promotions": [  →  Cart product promotions detailsarray{"id":" →  Promotion IDstring","price":" →  Price afrer the promotion discount appliedstring","title":" →  Promotion titlestring"}
],
"product": {  → object"id":" →  Product IDstring","sku":" →  Product SKUstring","name":" →  Product namestring","files":" →  Product file listarray","price":" →  Price without discountstring","sale":" →  Price with discountstring","calc":" →  Price with all discounts and promotionsstring","discount":" →  Product discountstring","new":" →  Product is new = 1, if not = 0integer","link":" →  Link to the productstring","options": [  →  Product option listarray{"id":" →  Product option IDstring","title":" →  Product option titlestring","field":" →  Product option field namestring","stock":" →  Is an option cart 1 or 0string","values": [  →  Value listarray{"id":" →  Value IDstring","title":" →  Value titlestring","total":" →  Product quantity with this parameterstring","available":" →  Products with this parameter are available for pre-orderstring","checked":" →  1 if this parameter is set for cart product option, 0 if is not setstring"}
]
}
],
"created":" →  Product creation datestring"
}
}
],
"user": {  →  User data objectobject"id":" →  User IDstring","name":" →  User namestring","phone":" →  User phonestring","email":" →  User phonestring","orders":" →  User order quantitystring","purchases":" →  User purchased order quantitystring","discount":" →  User discountstring","groups": [  →  User field gropusarray{"id":" →  Field IDstring","title":" →  Field titlestring"}
],
"fields": [  →  User field arrayarray{"label":" →  Field titlestring","field":" →  Field namestring","value":" →  Field valuestring","values": [  →  Field value setarray{"label":" →  Field value titlestring","value":" →  Field valuestring"}
],
"group":" →  Field groupstring"}
],
"bonus":" →  User bonus amountstring","prepay":" →  User prepay amountstring"
}
}