Each request should be authenticated using authentication key. 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
The order data should be sent every time an order is created or when an order status is updated (Paid, Delivered, Refunded..).
DATA MODEL
{
siteId: “” // SiteId is part of configuration
id: "", // Order reference, the same display to the buyer
cartId: “”, // Cart ID reference, source of the order
creationDate: "", // (optional) Date of the order as string in json format (2016-07-26T08:21:25.689Z)
totalATI: 0, // Amount included taxes and excluded shipping
totalET: 0, // Amount excluded taxes and excluded shipping
currency: "", // (optional) Currency, ISO code
paymentMethod: "", // Payment method used
state: "", // (optional) Status of the order
ip: "", // (optional) Visitor ip address
accountId: "", // Account id of the buyer (use same identifier as Carts)
civility: "", // (optional) Use string in this list : ‘mister','madam','miss'
lastname: "", // (optional) Lastname of the buyer
firstname: "", // (optional) Firstname of the buyer
email: "", // Email address of the buyer
homePhoneNumber: "", // (optional) Landline phone number of buyer
mobilePhoneNumber: "", // (optional) Mobile phone number of buyer
country: "", // Country of the buyer (you can send country or country code)
language: "", // (optional) language of the customer, can be different from the country: ISO code and lower case ex: en,fr,es.
countryCode: "", // (required) Country ISO code of the buyer (you can send country or country code)
custom: {}, // (optional) Any custom fields you want to send with the cart. Standard fields are language (ISO code), customerGroup and isNewCustomer (optional)
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: 0, // Count
totalATI: 0, // Total price included taxes
totalET: 0, // Total price excluded taxes
url: "", // URL of product sheet
imageUrl: "", // Image URL of the product, size should be min 150*150, max 180*180
universe: "", // (optional) Main category of the product
category: "" // (optional) Sub category of the product
]
}