Each request should be authenticated using authentication key (which you can find by going to your https://app.carts.guru account, website settings, integration tab and clicking on the platform you are connected to). It should be sent using the HTTP header: x-auth-key. The data structure is JSON based, for both resulting data and data included in the body.
All fields are required unless specified otherwise.
We perform automatically some data validation. In case of validation error, the response will have his status code equal to 500 and you can find the details of the error in the body.
Though our API is fast to answer, we advise you to set a timeout on the calls to prevent issues.
IMPORTANT INFORMATION
You need to send the cart content on cart creation and on cart updates.The accountId is required (we advise to use the email address), so that carts will be pushed only if your customer is logged in or has created an account during the checkout process.
DATA MODEL
{
siteId: "" // SiteId is part of configuration
id: "", // Cart reference (use SessionId if you don’t have specific ID)
totalATI: 0, // Total price including taxes
totalET: 0, // Total price excluding taxes
currency: "", // (optional) Currency, ISO code
accountId: "", // Account id of the buyer (we advise to use the email address)
ip: "", // (optional) Visitor IP address
recoverUrl: "", // Link to recover the cart (link to cart checkout with security token included). If you do not have a way to recover the cart the best will be to send the url to the checkout page
civility: "", // (optional) Use string in this list : 'mister','madam','miss'
lastname: "", // (optional) Lastname
firstname: "", // (optional but really important) Firstname
email: "", // Email address
homePhoneNumber: "", // (optional) Landline phone number
mobilePhoneNumber: "", // (optional) Mobile phone number
phoneNumber: "", // Phone number of buyer, if you don’t know the kind of it (optional)
countryCode: "", // (Required) if you send any phone number. Country ISO code of the buyer, 2 or 3 letters.
language: "", // (optional) language of the customer, can be different from the country: ISO code and lower case ex: en,fr,es.
custom: {}, // (optional) Any custom fields you want to send with the cart. Standard fields are language (ISO code), customerGroup and isNewCustomer
buyerAcceptsMarketing: true, //(optional) True or false, depending if the customer wants to receive marketing
//Details of each items
items: [
id: "", // SKU or product id
label: "", // Designation
quantity: 1, // Count
totalATI: 0, // Total price included taxes
totalET: 0, // Total price excluded taxes
url: "", // URL of product sheet
imageUrl: "", // Image URL of product, size should be min 150*150, max 180*180
universe: "", // (optional) Main category of the product
category: "" // (optional) Sub category of the product,
custom: {} // (optional) Any custom fields you want to send with the cart in order to do specific segmentation on your retargating strategy
]
}