This method creates an order with the given items and quantities for a user’s customer. The order will be dispatched, after user's payment, to the given recipient (user’s customer).
Remember to authenticate properly, using HTTP Basic Authentication with your API-Key as username and your password.
The request body contains the order items informations and the recipient detail.
- key : identifies the user’s platform order id, it's the same value used in orderStatusOrderId
- date : the date of the order in the format - “yyyy/MM/dd HH:mm:ss Z”, where:
- yyyy = four digits year (i.e. 2017)
- MM = two digits month from 01 to 12
- dd = two digits day in the month, from 01 to 31
- HH = two digits hour of the day for the 24-hour clock, from 00 to 23
- mm = two digits minutes in the hour, from 00 to 59
- ss = two digits seconds in the minute, from 00 to 59
- Z = RFC 822 (https://www.w3.org/Protocols/rfc822/#z28) style numeric time zone offset from GMT, e.g. 0800. This value will be adjusted as necessary for Daylight Saving Time
- recipient : order recipient
- careof : care of
- cfpiva : vat number or person ID of your customer (not required)
- customer_key : customer ID on your platform (not required)
- notes : notes (not required)
- street_type : shipping street type (ex. Via, Street, Avenue) (not required)
- street_name : shipping street name
- address_number : shipping house number
- zip : shipping zip code
- city : shipping city
- province : shipping province or district
- countrycode : shipping country code using the ISO 3166-1 alpha-2 standard
- prefix : prefix phone number of your customer
- number : phone number of your customer
- stock_id : model id of the size/color variation
- quantity : the required quantity to be shippend
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root> <order_list> <order> <key>2345</key> <date>2017/01/31 23:59:59 +0000</date> <recipient_details> <recipient>ACME srl</recipient> <careof /> <cfpiva>12345558</cfpiva> <customer_key>7777</customer_key> <notes></notes> <address> <street_type>Via</street_type> <street_name>Roma</street_name> <address_number>1</address_number> <zip>10100</zip> <city>TORINO</city> <province>TO</province> <countrycode>IT</countrycode> </address> <phone> <prefix>+39</prefix> <number>0112838474</number> </phone> </recipient_details> <item_list> <item> <stock_id>148148</stock_id> <quantity>10</quantity> </item> <item> <stock_id>148367</stock_id> <quantity>15</quantity> </item> </item_list> </order> </order_list> </root>
The response body contains a list of the models remaining in your reservation. Each model has three attributes:
- stock_id : the numerical id of the model
- locked : the amount of locked quantity
- available : the amount of model still available.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root order_id="1000"> <model stock_id="148148" locked="10" available="5" /> </root>
Even if the order_list tag can accept multiple orders, it is strongly recommended, for better performance, to insert one order at a time.
The maximum addable quantity of a model depends on the available quantity. You can't exceed this quantity: if you require more than the available quantity, only the available quantity will be added and no error or message will be returned. In order to make sure that all your models are correctly added to your order make sure to have reserved them (using Reserve ) before calling this API.
If the request body contains not existing stock_ids, this will cause the abort of the order creation. Some of the required quantities may have been added to your reservation. We recommend you to always add all required quantities to your reservation before trying to use this API so you don't get any error caused by missing items.
If the request body contains errors this will cause the abort of the order creation. The http status code 429 will be returned and request body contains the error message.