This page details the technical specification for checking the status of an order to the Clothes2order API. Once an order is placed, you can query our system to retrieve information about the current order status.
The API endpoint for checking the status of an order is:
https://www.clothes2order.com/api/fetch-order/
1 2 3 4 5 6 7 |
<xml> <api_key>yourkey</api_key> <order> <your_order_id>YOURORDERID123456</your_order_id> <c2o_order_id>999000</c2o_order_id> </order> </xml> |
1 2 3 4 5 6 7 |
{ "api_key": "yourkey", "order": { "your_order_id": "YOURORDERID123456", "c2o_order_id": "999000" } } |
Node | Description |
---|---|
api_key | Your API key. |
order->your_order_id | The order id you wish you query. Either this or ‘c2o_order_id’ should be specified. |
order->c2o_order_id | The Clothes2order order id you wish to query. Either this or ‘your_order_id’ should be specified. |
The API will respond with XML once a fetch request is submitted; please see below for details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<xml> <status> <code>OK</code> <msg>Data accepted from Your Company Name. API Mode: LIVE</msg> </status> <order_details> <c2o_order_id>999000</c2o_order_id> <your_order_id>123456</your_order_id> <net_order_value>26.06</net_order_value> <gross_order_value>31.27</gross_order_value> <est_dispatch_date>13/11/2013</est_dispatch_date> <order_status>Dispatched</order_status> <shipped_by>Interlink</shipped_by> <tracking_link><![CDATA[http://www.full-courier-tracking-link.com/]]></tracking_link> <progress_images> <progress_image><![CDATA[http://www.clothes2order.com/progressimage1.jpg]]></progress_image> <progress_image><![CDATA[http://www.clothes2order.com/progressimage2.jpg]]></progress_image> </progress_images> <order_issues> <issue> <reason>Customer: Position not possible</reason> <date_added>23/01/2014</date_added> </issue> <issue> <reason>Customer: Artwork / Garment Colour Clash</reason> <date_added>24/01/2014</date_added> </issue> </order_issues> </order_details> </xml> |
The API will respond with JSON once a fetch request is submitted; please see below for details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
{ "status": { "code": "OK", "msg": "Data accepted from Your Company Name. API Mode: LIVE" }, "order_details": { "c2o_order_id": "999000", "your_order_id": "123456", "net_order_value": "26.06", "gross_order_value": "31.27", "est_dispatch_date": "13\/11\/2013", "order_status": "Dispatched", "shipped_by": "Interlink", "tracking_link": "http:\/\/www.full-courier-tracking-link.com\/", "progress_images": { "progress_image": [ "http:\/\/www.clothes2order.com\/progressimage1.jpg", "http:\/\/www.clothes2order.com\/progressimage2.jpg" ] }, "order_issues": { "issue": [ { "reason": "Customer: Position not possible", "date_added": "23\/01\/2014" }, { "reason": "Customer: Artwork \/ Garment Colour Clash", "date_added": "24\/01\/2014" } ] } } } |
Node | Description |
---|---|
status->code | Either ‘OK’ or ‘ERROR’. If a fatal error is reported here, the request will not be processed. You can also check the HTTP response code header; ‘OK’ returns 200, ‘ERROR’ returns 400. |
status->msg | The associated success or error message. |
order_details->c2o_order_id | The Clothes2order order number for the placed order. |
order_details->your_order_id | Your order number passed when the order was placed. |
order_details->net_order_value | The net cost you have been charged for the order. |
order_details->gross_order_value | The gross cost you have been charged for the order. |
order_details->est_dispatch_date | The estimated dispatch date for your order. |
order_details->order_status | The current status of the order. Typical values include ‘Processing Order’, ‘Dispatched’ and ‘On Hold’. |
order_details->shipped_by | The delivery method used to send the order (node included if the current status is ‘Dispatched’) . |
order_details->tracking_link | The direct courier tracking link for the order (node included if the current status is ‘Dispatched’). |
progress_images->progress_image | A list of images that have been taken of the order in progress, if any are available. For more information about this unique feature, please click here |
order_issues->issue->reason | In the rare cases there are any outstanding issues with your order, these will be shown here. By clicking an order number in your online order history you can then view full details of the issue. |
order_issues->issue->date_added | The date the above outstanding order issue was recorded. |
Checking the status of orders is not currently rate limited, but is subject to reasonable fair use limits. The status of an order is unlikely to change more than once a day. Orders are dispatched by 8pm BST Monday to Friday, so we would recommend checking the status of an order after this time and caching the results for 24 hours. Once an order reaches the ‘Dispatched’ status, the status will not change from this point so should not be queried again.