{"info":{"_postman_id":"6e70da4e-404d-423c-a59b-1efb3c0cbe6f","name":"API Overview","description":"<html><head></head><body><p>Do you sell or bulk purchase customised clothing and require a company to do the fulfilment? With the Clothes2order ordering API, you can set up your own website or other ordering medium and send orders directly to us electronically in real time. We’ll then dispatch the completed order straight to you or your customer.</p>\n<img src=\"https://content.pstmn.io/d9adc22b-a941-4d22-a308-6e31b2044557/aW1hZ2UucG5n\" width=\"690\" height=\"135\">\n\n<p>Every order placed via our API receives the same expert service as any other Clothes2order order, so you can sure of receiving the best possible end result when ordering with us. To find out more about our API and view in depth technical specifications, please click the links on the left hand side.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"34924792","collectionId":"6e70da4e-404d-423c-a59b-1efb3c0cbe6f","publishedId":"2sA3s7i91D","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-08-15T11:31:25.000Z"},"item":[{"name":"Registering for our API","item":[],"id":"c15d9f02-3ae9-4142-8d00-2bafc01f9ad9","description":"<p>Clothes2order API access is available to approved users only. Please note that we do not charge any on-going additional fees to place orders via our API, however all applicants to use the API must meet the following basic requirements:</p>\n<ul>\n<li><p>Have an existing platform in place to accept orders</p>\n</li>\n<li><p>Be able to send orders electronically to us in XML or JSON format</p>\n</li>\n<li><p>Have a physical contact address and some kind of customer service (minimum by email)</p>\n</li>\n<li><p>Have the technical expertise (or access to the technical expertise) required to integrate an API with your own platform</p>\n</li>\n</ul>\n<p>If you fulfil these criteria and would like to work with Clothes2order, we would be delighted to hear from you. Please <a href=\"https://www.clothes2order.com/api_login.php\">click here and fill in our API application form</a> and we will assess your application as soon as possible.</p>\n<p>Once approved, you will receive email confirmation and you will be able to log into your <a href=\"https://www.clothes2order.com/docs/your-api-account/\">API Account </a>  online. You will also receive email confirmation if your application to use our API is rejected.</p>\n","_postman_id":"c15d9f02-3ae9-4142-8d00-2bafc01f9ad9"},{"name":"Your API Account","item":[{"name":"Your API Key","item":[],"id":"2dd65a4c-14f7-4809-8951-c1a8d34231ac","description":"<p>Your API key is automatically generated when your account is created and is clearly shown when logged into your account. API keys are 64 characters in length. Anyone who has your API key can place an order through our API using your account so it’s important not to share this key or make it publically visible in any way.</p>\n<p>Clicking ‘Generate a new API key’ from your account will generate a new key; please note that your previous key will instantly cease to work once your new key is generated.</p>\n","_postman_id":"2dd65a4c-14f7-4809-8951-c1a8d34231ac"},{"name":"Data Feeds","item":[],"id":"29281218-2870-4cc8-89fe-e23b5c23df36","description":"<p>There are several distinct data feeds in csv format available for the Clothes2order API. All can be downloaded from your account or automatically via the direct links provided in your account if required.</p>\n<h2 id=\"stock-and-product-information-feed\">Stock and Product Information Feed</h2>\n<p>This feed contains a list of all product SKU’s and stock information and is updated every 30 minutes. The feed is hosted on the Amazon S3 Cloud which means it can be fetched regularly by API users without restriction. The csv columns are listed below:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Column Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Product Name</td>\n<td>The name of the product.</td>\n</tr>\n<tr>\n<td>Product Category</td>\n<td>The name of the primary category the product sits in on the Clothes2order site.</td>\n</tr>\n<tr>\n<td>Manufacturer Code</td>\n<td>The manufacturer code for the product (if available).</td>\n</tr>\n<tr>\n<td>Colour</td>\n<td>The colour of the product for this SKU.</td>\n</tr>\n<tr>\n<td>Size</td>\n<td>The size of the product for this SKU.</td>\n</tr>\n<tr>\n<td>SKU</td>\n<td>The SKU code. This is the key part that needs to passed to the API to order a product.</td>\n</tr>\n<tr>\n<td>Is Core</td>\n<td>Indicates if this is a ‘core’ SKU. Core lines are generally our best sellers and are available for 24 hour dispatch.</td>\n</tr>\n<tr>\n<td>In Stock</td>\n<td>Indicates if this SKU is currently in stock or not.</td>\n</tr>\n<tr>\n<td>Approx Stock Level</td>\n<td>Shows the approximate stock available for that SKU; either ‘0’, ‘1-49′, ’50-249′,’250-499’ or ‘500+’.</td>\n</tr>\n<tr>\n<td>Image URL</td>\n<td>A URL link to an image of the SKU in question. Any images used should be cached on your system.</td>\n</tr>\n<tr>\n<td>Allowed Customisations</td>\n<td>A semi-colon (;) separated list of allowed customisations for this SKU. There are three types: ‘print’ (multi colour print), ‘print_1colour’ (single colour print), ’embroidery’ (embroidery).</td>\n</tr>\n<tr>\n<td>Allowed Positions</td>\n<td>A semi-colon (;) separated list of allowed positions for this SKU. <a href=\"https://www.clothes2order.com/docs/position-codes/\">Please click here</a> for a full list of position codes.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"pricing-feed\">Pricing Feed</h2>\n<p>This feed contains the specific pricing for your account for each SKU. As this feed contains pricing information you may not wish to disclose, it can be downloaded via a unique secure link provided in your account area. This feed only needs to be downloaded when your <a href=\"https://www.clothes2order.com/docs/custom-pricing/\">pricing levels</a> change. The csv columns are listed below:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Column Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>SKU</td>\n<td>The SKU code. This is the key part that needs to passed to the API to order a product.</td>\n</tr>\n<tr>\n<td>Price</td>\n<td>The actual price we charge you for the SKU, taking account of any custom pricing levels. Prices are in GBP and exclude VAT.</td>\n</tr>\n<tr>\n<td>VAT Rate</td>\n<td>The VAT rate that will be applied to each SKU.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"position-code-feed\">Position Code Feed</h2>\n<p>This feed lists all available position codes, together with the maximum width available in each position.</p>\n<h2 id=\"delivery-destinations-feed\">Delivery Destinations Feed</h2>\n<p>This feed lists all available delivery destinations as well as the associated delivery charges we will charge you.</p>\n","_postman_id":"29281218-2870-4cc8-89fe-e23b5c23df36"},{"name":"Billing","item":[],"id":"5b737780-fc24-46cb-983a-4980f94bd328","description":"<p>Payment options:</p>\n<ul>\n<li>BACS/Cheque (Invoiced monthly)</li>\n</ul>\n<p>All invoices are sent via email to the billing contact listed on your account.</p>\n<h2 id=\"bacscheque-invoiced-monthly-payment-option\">BACS/Cheque (Invoiced monthly) Payment Option</h2>\n<p>With this option, an invoice will automatically be sent on the 7th of each month for the previous months sales. Payment should then be made within 7 days.</p>\n<h2 id=\"view-all-invoices\">View All Invoices</h2>\n<p>All invoices generated can be viewed here and downloaded in PDF format.</p>\n","_postman_id":"5b737780-fc24-46cb-983a-4980f94bd328"},{"name":"Account Options","item":[],"id":"b69477f8-4c0e-4142-9fca-b96b6b768bc9","description":"<p>The Clothes2order API account area provides several options to update information stored with us, as well as view a full and complete history of all orders submitted through the API.</p>\n<h2 id=\"view-full-order-history\">View Full Order History</h2>\n<p>All orders generated through your API account can be viewed in detail here. Click an order number to view what was selected for a particular order. Any order issues which may be preventing your order being dispatched will also be listed here.</p>\n<h2 id=\"view-or-change-account-information\">View or Change Account Information</h2>\n<p>The information you gave when signing up for an API account (name, email, website, billing contact details etc) can all be updated from this page.</p>\n<h2 id=\"change-account-password\">Change Account Password</h2>\n<p>You can update your account password here at any time. Please ensure you protect your password at all times as someone with access to your account can access your API key.</p>\n<h2 id=\"view-current-api-settings\">View Current API Settings</h2>\n<p>API settings associated with your account can be viewed here. Please note the settings in this section are not user-editable, so to discuss any changes please <a href=\"https://www.clothes2order.com/api_contact.php\">contact our API team</a></p>\n","_postman_id":"b69477f8-4c0e-4142-9fca-b96b6b768bc9"}],"id":"5fa03aae-9fb6-4d36-b751-b6c6f96a7e5c","description":"<p>Once your API account is approved, you will be able to log in to your API account online. The Clothes2order API account area is a powerful tool allowing you to manage all aspects of your API account.</p>\n<p>Please use the links on the left to view more about the various sections of your API account in more detail.</p>\n<p>To log into your API account on the main Clothes2order site, <a href=\"https://www.clothes2order.com/api_account.php\">please click here</a></p>\n","_postman_id":"5fa03aae-9fb6-4d36-b751-b6c6f96a7e5c"},{"name":"Technical Docs","item":[{"name":"HTTP Headers","item":[{"name":"Placing an Order","item":[],"id":"3c85ff45-15f7-4273-b8a5-0b8108754ac9","description":"<p>This page details the technical specification for posting an order to the Clothes2order API. There are no further steps required to place an order; once you submit a request as detailed below, the order is instantly generated on our system ready for processing.</p>\n<h2 id=\"common-problems\">Common problems</h2>\n<h3 id=\"inside-back-neck-printed-label\">INSIDE BACK NECK PRINTED LABEL</h3>\n<p>Inside back next printed labels can be assigned to your order by attaching a customisation in position code 18. Only one printed label customisation can be used per order, but of course the same printed label customisation can be used on multiple items. The customisation used can only be a single colour print, maximum width 12cm and is only available on selected product types (mainly t-shirts and polo shirts). Inside back neck prints are charged at a much lower rate than standard printing applications; to see your price simply download the <a href=\"https://www.clothes2order.com/docs/data-feeds/\">pricing data feed</a> in your account. More information on this service is available <a href=\"https://www.clothes2order.com/pages/pricing/\">here</a>.</p>\n<h3 id=\"customisation-limits\">CUSTOMISATION LIMITS</h3>\n<p>There are no system limits on the number of products or customisations that can be placed on an order. Although we limit Clothes2order users to 6 customisations on our main site, there are no limits to how many customisations you can attach to a garment via the API.</p>\n<h3 id=\"address-requirements\">ADDRESS REQUIREMENTS</h3>\n<p>Please note that we require a state or province for delivery to the USA, Canada, and Australia. This is because shipping addresses in these countries are not complete without a state or province. If you do not provide a state or province, your order may be delayed.</p>\n<p>Eircode is the national postcode system in Ireland. An Eircode is a unique 7-character code consisting of letters and numbers. Each Eircode consists of a 3-character routing key to identify the area and a 4-character unique identifier for each address. A typical Eircode might read A65 F4E2</p>\n<p>We use Irish postcodes “Eircode” to help us deliver your order to the correct address. If you do not provide a valid Irish postcode, your order may be delayed.</p>\n<p>You can check the validity of an Irish postcode on the Eircode website: <a href=\"https://www.eircode.ie/\">https://www.eircode.ie/</a>.</p>\n<h2 id=\"place-order-api-endpoint\">Place Order API Endpoint</h2>\n<p>The API endpoint for placing an order is:</p>\n<p><a href=\"https://www.clothes2order.com/api/v1/orders\">https://www.clothes2order.com/api/v1/orders</a></p>\n<h2 id=\"post-xml-fields\">Post XML Fields</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-xml\">&lt;xml&gt;\n &lt;api_key&gt;Your API Key&lt;/api_key&gt;\n &lt;order&gt;\n  &lt;order_id&gt;123456&lt;/order_id&gt;\n  &lt;order_notes&gt;&lt;![CDATA[Any extra information here]]&gt;&lt;/order_notes&gt;\n  &lt;delivery_method&gt;standard&lt;/delivery_method&gt;\n &lt;/order&gt;\n &lt;customer&gt;\n  &lt;name&gt;Name Here&lt;/name&gt;\n  &lt;email&gt;email@email.com&lt;/email&gt;\n  &lt;telephone&gt;0161123456&lt;/telephone&gt;\n  &lt;taxId&gt;Tax id, required for delivery to some countries&lt;/taxId&gt;\n &lt;/customer&gt;\n &lt;address class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27;&gt;\n  &lt;delivery_name&gt;Name&lt;/delivery_name&gt;\n  &lt;company_name&gt;Quayside Clothing Ltd&lt;/company_name&gt;\n  &lt;address_line_1&gt;Unit 9 Wheel Forge Way&lt;/address_line_1&gt;\n  &lt;address_line_2&gt;Trafford Park&lt;/address_line_2&gt;\n  &lt;city&gt;Manchester&lt;/city&gt;\n  &lt;postcode&gt;M17 1EH&lt;/postcode&gt;\n  &lt;country&gt;United Kingdom&lt;/country&gt;\n &lt;/address&gt;\n &lt;products&gt;\n  &lt;product&gt;\n   &lt;sku&gt;594-117-15&lt;/sku&gt;\n   &lt;quantity&gt;2&lt;/quantity&gt;\n   &lt;logos&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;TEST_02&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[https://dl.dropboxusercontent.com/u/111/1.png]]&gt;&lt;/file&gt;\n     &lt;position&gt;3&lt;/position&gt;\n     &lt;width&gt;8&lt;/width&gt;\n     &lt;type&gt;print&lt;/type&gt;\n    &lt;/logo&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;TEST_03&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[https://dl.dropboxusercontent.com/u/111/2.png]]&gt;&lt;/file&gt;\n     &lt;position&gt;5&lt;/position&gt;\n     &lt;width&gt;12&lt;/width&gt;\n     &lt;type&gt;print&lt;/type&gt;\n    &lt;/logo&gt;\n   &lt;/logos&gt;\n  &lt;/product&gt;\n    &lt;product&gt;\n   &lt;sku&gt;594-117-14&lt;/sku&gt;\n   &lt;quantity&gt;1&lt;/quantity&gt;\n   &lt;logos&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;TEST_04&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[https://dl.dropboxusercontent.com/u/111/3.png]]&gt;&lt;/file&gt;\n     &lt;position&gt;5&lt;/position&gt;\n     &lt;width&gt;10&lt;/width&gt;\n     &lt;type&gt;embroidery&lt;/type&gt;\n    &lt;/logo&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[https://dl.dropboxusercontent.com/u/111/4.png]]&gt;&lt;/file&gt;\n     &lt;position&gt;9&lt;/position&gt;\n     &lt;width&gt;25&lt;/width&gt;\n     &lt;type&gt;print_1colour&lt;/type&gt;\n    &lt;/logo&gt;\n   &lt;/logos&gt;\n  &lt;/product&gt;\n &lt;/products&gt;\n&lt;/xml&gt;\n\n</code></pre>\n<h2 id=\"post-json-fields\">Post JSON Fields</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"api_key\": \"Your API Key\",\n    \"order\": {\n        \"order_id\": \"123456\",\n        \"order_notes\": \"Any extra information here\",\n        \"delivery_method\": \"standard\"\n    },\n    \"customer\": {\n        \"name\": \"Name Here\",\n        \"email\": \"email@email.com\",\n        \"telephone\": \"0161123456\",\n        \"taxId\": \"Tax id, required for delivery to some countries\"\n    },\n    \"address\": {\n        \"delivery_name\": \"Name\",\n        \"company_name\": \"Quayside Clothing Ltd\",\n        \"address_line_1\": \"Unit 9 Wheel Forge Way\",\n        \"address_line_2\": \"Trafford Park\",\n        \"city\": \"Manchester\",\n        \"postcode\": \"M17 1EH\",\n        \"country\": \"United Kingdom\"\n    },\n    \"products\": {\n        \"product\": [\n            {\n                \"sku\": \"594-117-15\",\n                \"quantity\": \"2\",\n                \"logos\": {\n                    \"logo\": [\n                        {\n                            \"unique_id\": \"TEST_02\",\n                            \"file\": \"https:\\/\\/dl.dropboxusercontent.com\\/u\\/111\\/1.png\",\n                            \"position\": \"3\",\n                            \"width\": \"8\",\n                            \"type\": \"print\"\n                        },\n                        {\n                            \"unique_id\": \"TEST_03\",\n                            \"file\": \"https:\\/\\/dl.dropboxusercontent.com\\/u\\/111\\/2.png\",\n                            \"position\": \"5\",\n                            \"width\": \"12\",\n                            \"type\": \"print\"\n                        }\n                    ]\n                }\n            },\n            {\n                \"sku\": \"594-117-14\",\n                \"quantity\": \"1\",\n                \"logos\": {\n                    \"logo\": [\n                        {\n                            \"unique_id\": \"TEST_04\",\n                            \"file\": \"https:\\/\\/dl.dropboxusercontent.com\\/u\\/111\\/3.png\",\n                            \"position\": \"5\",\n                            \"width\": \"10\",\n                            \"type\": \"embroidery\"\n                        },\n                        {\n                            \"unique_id\": \"\",\n                            \"file\": \"https:\\/\\/dl.dropboxusercontent.com\\/u\\/111\\/4.png\",\n                            \"position\": \"9\",\n                            \"width\": \"25\",\n                            \"type\": \"print_1colour\"\n                        }\n                    ]\n                }\n            }\n        ]\n    }\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Node</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>api_key</td>\n<td>Your API key provided to you when you sign up to use our API.</td>\n</tr>\n<tr>\n<td>order-&gt;order_id</td>\n<td>Your generated order id from your ordering system. This is recorded against the order on our system.</td>\n</tr>\n<tr>\n<td>order-&gt;order_notes</td>\n<td>Any additional comments related to the order you wish to pass through (optional).</td>\n</tr>\n<tr>\n<td>order-&gt;delivery_method</td>\n<td>The delivery method for this order; standard options here are ‘standard’, ‘4day’ or ‘express’.</td>\n</tr>\n<tr>\n<td>order-&gt;is_blank</td>\n<td>If this is an order without customisation, set this to ‘yes’ or ‘1’ (optional). Default is ‘no’. Blank products should not be ordered on the same order as customised products.</td>\n</tr>\n<tr>\n<td>order-&gt;individual_bags</td>\n<td>If you would like each item bagging in an individual poly bag, set this to ‘yes’ or ‘1’ (optional). Default is ‘no’. There is a charge applicable for this service; the charge can be found in the <a href=\"https://www.clothes2order.com/docs/data-feeds/\">pricing data feed</a> in your account. More information on this service is available <a href=\"https://www.clothes2order.com/pages/pricing/\">here</a>.</td>\n</tr>\n<tr>\n<td>customer-&gt;name</td>\n<td>The name of the customer.</td>\n</tr>\n<tr>\n<td>customer-&gt;email</td>\n<td>The email address of the customer. By default, the Clothes2order API will not send any emails to the customer.</td>\n</tr>\n<tr>\n<td>customer-&gt;telephone</td>\n<td>The telephone number of the customer.</td>\n</tr>\n<tr>\n<td>customer-&gt;taxId</td>\n<td>A tax identifier for the recipient. required for delivery to some countries, if required and not provided the order will be placed on hold</td>\n</tr>\n<tr>\n<td>address-&gt;delivery_name</td>\n<td>The name to appear on the delivery address, if not set, customer-&gt;name will be used (optional).</td>\n</tr>\n<tr>\n<td>address-&gt;company_name</td>\n<td>The company name to appear on the delivery address (optional).</td>\n</tr>\n<tr>\n<td>address-&gt;address_line_1</td>\n<td>The first line of the delivery address.</td>\n</tr>\n<tr>\n<td>address-&gt;address_line_2</td>\n<td>The second line of the delivery address.</td>\n</tr>\n<tr>\n<td>address-&gt;city</td>\n<td>The postal city of the delivery address.</td>\n</tr>\n<tr>\n<td>address-&gt;county</td>\n<td>This is not needed for UK addresses, but for international addresses you can add a county/state here (optional).</td>\n</tr>\n<tr>\n<td>address-&gt;postcode</td>\n<td>The post code of the delivery address.</td>\n</tr>\n<tr>\n<td>address-&gt;country</td>\n<td>The delivery country. Please see our <a href=\"https://www.clothes2order.com/pages/delivery/\">delivery page</a> for a list of countries we can deliver to.</td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;sku</td>\n<td>The unique SKU code for the product selected. Please see the <a href=\"https://www.clothes2order.com/docs/data-feeds/\">data feeds page</a> for more information about our downloadable csv files.</td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;quantity</td>\n<td>The quantity of the above SKU to order. The same SKU can be used multiple times if different customisations are required on each.</td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;logos-&gt;logo-&gt;unique_id</td>\n<td>If you have customisations that can be purchased multiple times on different orders, setting a unique id will prevent the API having the pull the logo file each time an order is placed (optional). In addition, once the setup charge has been paid for a customisation in the specified size, using the same unique_id will automatically ensure you are not charged a setup charge again for that customisation (assuming the size has not changed).</td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;logos-&gt;logo-&gt;file</td>\n<td>The full URL of the artwork file. This must be set or the order will not be accepted, even if the unique_id is set and the file has been used before. The file should be as you wish it to be produced and adhear to our standard <a href=\"https://www.clothes2order.com/pages/artwork-guidelines/\">artwork guidelines</a></td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;logos-&gt;logo-&gt;position</td>\n<td>The position code for where the customisation should be placed. See the <a href=\"https://www.clothes2order.com/docs/position-codes/\">position codes page</a> for a full list of position codes.</td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;logos-&gt;logo-&gt;width</td>\n<td>Width image should be produced in cm. If not set or greater than the maximum size for a position, the maximum size will be used. See the <a href=\"https://www.clothes2order.com/docs/position-codes/\">position codes page</a> for a full list of maximum sizes.</td>\n</tr>\n<tr>\n<td>products-&gt;product-&gt;logos-&gt;logo-&gt;type</td>\n<td>Either ‘print’ (multi colour print), ‘print_1colour’ (single colour print) or ’embroidery’ (embroidery).</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-xml-fields\">Response XML Fields</h2>\n<p>The API will respond with XML once an order is submitted; please see below for details.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-xml\">&lt;xml&gt;\n &lt;status&gt;\n  &lt;code class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27;&gt;OK&lt;/code&gt;\n  &lt;msg&gt;Data accepted from Your Company Name. API Mode: LIVE&lt;/msg&gt;\n &lt;/status&gt;\n &lt;order_details&gt;\n  &lt;order_id&gt;999000&lt;/order_id&gt;\n  &lt;net_order_value&gt;26.06&lt;/net_order_value&gt;\n  &lt;gross_order_value&gt;31.27&lt;/gross_order_value&gt;\n  &lt;est_dispatch_date&gt;13/11/2013&lt;/est_dispatch_date&gt;\n &lt;/order_details&gt;\n &lt;warnings&gt;\n  &lt;warning&gt;Your postcode is not a valid UK postcode&lt;/warning&gt;\n  &lt;warning&gt;Current stock levels are below the ordered quantity for sku 203-1-13&lt;/warning&gt;\n &lt;/warnings&gt;\n&lt;/xml&gt;\n\n</code></pre>\n<h2 id=\"response-json-fields\">Response JSON Fields</h2>\n<p>The API will respond with JSON once an order is submitted; please see below for details.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": {\n        \"code\": \"OK\",\n        \"msg\": \"Data accepted from Your Company Name. API Mode: LIVE\"\n    },\n    \"order_details\": {\n        \"order_id\": \"999000\",\n        \"net_order_value\": \"26.06\",\n        \"gross_order_value\": \"31.27\",\n        \"est_dispatch_date\": \"13\\/11\\/2013\"\n    },\n    \"warnings\": {\n        \"warning\": [\n            \"Your postcode is not a valid UK postcode\",\n            \"Current stock levels are below the ordered quantity for sku 203-1-13\"\n        ]\n    }\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Node</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status-&gt;code</td>\n<td>Either ‘OK’ or ‘ERROR’. If a fatal error is reported here, the order will not be accepted. You can also check the HTTP response code header; ‘OK’ returns 200, ‘ERROR’ returns 400.</td>\n</tr>\n<tr>\n<td>status-&gt;msg</td>\n<td>The associated success or error message.</td>\n</tr>\n<tr>\n<td>order_details-&gt;order_id</td>\n<td>The Clothes2order order number for the placed order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;net_order_value</td>\n<td>The net cost you have been charged for the order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;gross_order_value</td>\n<td>The gross cost you have been charged for the order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;est_dispatch_date</td>\n<td>The estimated dispatch date for your order.</td>\n</tr>\n<tr>\n<td>warnings-&gt;warning</td>\n<td>Any warning messages about your order will be displayed here.</td>\n</tr>\n<tr>\n<td>test_msgs-&gt;msg</td>\n<td>If you are running the API in test mode, testing results will be displayed here.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"3c85ff45-15f7-4273-b8a5-0b8108754ac9"},{"name":"Check Order Status","item":[],"id":"83e541a1-dd18-475f-96f6-b877f1e7f4ae","description":"<p>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.</p>\n<h2 id=\"fetch-order-api-endpoint\">Fetch Order API Endpoint</h2>\n<p>The API endpoint for checking the status of an order is:</p>\n<p><a href=\"https://www.clothes2order.com/api/v1/orders/fetch\">https://www.clothes2order.com/api/v1/orders/fetch</a></p>\n<h2 id=\"post-xml-fields\">Post XML Fields</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;xml&gt;\n &lt;api_key&gt;yourkey&lt;/api_key&gt;\n &lt;order&gt;\n  &lt;your_order_id&gt;YOURORDERID123456&lt;/your_order_id&gt;\n  &lt;c2o_order_id&gt;999000&lt;/c2o_order_id&gt;\n &lt;/order&gt;\n&lt;/xml&gt;\n\n</code></pre><h2 id=\"post-json-fields\">Post JSON Fields</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"api_key\": \"yourkey\",\n    \"order\": {\n        \"your_order_id\": \"YOURORDERID123456\",\n        \"c2o_order_id\": \"999000\"\n    }\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Node</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>api_key</td>\n<td>Your API key.</td>\n</tr>\n<tr>\n<td>order-&gt;your_order_id</td>\n<td>The order id you wish you query. Either this or ‘c2o_order_id’ should be specified.</td>\n</tr>\n<tr>\n<td>order-&gt;c2o_order_id</td>\n<td>The Clothes2order order id you wish to query. Either this or ‘your_order_id’ should be specified.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-xml-fields\">Response XML Fields</h2>\n<p>The API will respond with XML once a fetch request is submitted; please see below for details.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-xml\">&lt;xml&gt;\n &lt;status&gt;\n  &lt;code class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27;&gt;OK&lt;/code&gt;\n  &lt;msg&gt;Data accepted from Your Company Name. API Mode: LIVE&lt;/msg&gt;\n &lt;/status&gt;\n &lt;order_details&gt;\n  &lt;c2o_order_id&gt;999000&lt;/c2o_order_id&gt;\n  &lt;your_order_id&gt;123456&lt;/your_order_id&gt;\n  &lt;net_order_value&gt;26.06&lt;/net_order_value&gt;\n  &lt;gross_order_value&gt;31.27&lt;/gross_order_value&gt;\n  &lt;est_dispatch_date&gt;13/11/2013&lt;/est_dispatch_date&gt;\n  &lt;order_status&gt;Dispatched&lt;/order_status&gt;\n  &lt;shipped_by&gt;Interlink&lt;/shipped_by&gt;\n  &lt;tracking_link&gt;&lt;![CDATA[http://www.full-courier-tracking-link.com/]]&gt;&lt;/tracking_link&gt;\n  &lt;progress_images&gt;\n   &lt;progress_image&gt;&lt;![CDATA[http://www.clothes2order.com/progressimage1.jpg]]&gt;&lt;/progress_image&gt;\n   &lt;progress_image&gt;&lt;![CDATA[http://www.clothes2order.com/progressimage2.jpg]]&gt;&lt;/progress_image&gt;\n  &lt;/progress_images&gt;\n  &lt;order_issues&gt;\n   &lt;issue&gt;\n    &lt;reason&gt;Customer: Position not possible&lt;/reason&gt;\n    &lt;date_added&gt;23/01/2014&lt;/date_added&gt;\n   &lt;/issue&gt;\n   &lt;issue&gt;\n    &lt;reason&gt;Customer: Artwork / Garment Colour Clash&lt;/reason&gt;\n    &lt;date_added&gt;24/01/2014&lt;/date_added&gt;\n   &lt;/issue&gt;\n  &lt;/order_issues&gt;\n &lt;/order_details&gt;\n&lt;/xml&gt;\n\n</code></pre>\n<h2 id=\"response-json-fields\">Response JSON Fields</h2>\n<p>The API will respond with JSON once a fetch request is submitted; please see below for details.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": {\n        \"code\": \"OK\",\n        \"msg\": \"Data accepted from Your Company Name. API Mode: LIVE\"\n    },\n    \"order_details\": {\n        \"c2o_order_id\": \"999000\",\n        \"your_order_id\": \"123456\",\n        \"net_order_value\": \"26.06\",\n        \"gross_order_value\": \"31.27\",\n        \"est_dispatch_date\": \"13\\/11\\/2013\",\n        \"order_status\": \"Dispatched\",\n        \"shipped_by\": \"Interlink\",\n        \"tracking_link\": \"http:\\/\\/www.full-courier-tracking-link.com\\/\",\n        \"progress_images\": {\n            \"progress_image\": [\n                \"http:\\/\\/www.clothes2order.com\\/progressimage1.jpg\",\n                \"http:\\/\\/www.clothes2order.com\\/progressimage2.jpg\"\n            ]\n        },\n        \"order_issues\": {\n            \"issue\": [\n                {\n                    \"reason\": \"Customer: Position not possible\",\n                    \"date_added\": \"23\\/01\\/2014\"\n                },\n                {\n                    \"reason\": \"Customer: Artwork \\/ Garment Colour Clash\",\n                    \"date_added\": \"24\\/01\\/2014\"\n                }\n            ]\n        }\n    }\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Node</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status-&gt;code</td>\n<td>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.</td>\n</tr>\n<tr>\n<td>status-&gt;msg</td>\n<td>The associated success or error message.</td>\n</tr>\n<tr>\n<td>order_details-&gt;c2o_order_id</td>\n<td>The Clothes2order order number for the placed order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;your_order_id</td>\n<td>Your order number passed when the order was placed.</td>\n</tr>\n<tr>\n<td>order_details-&gt;net_order_value</td>\n<td>The net cost you have been charged for the order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;gross_order_value</td>\n<td>The gross cost you have been charged for the order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;est_dispatch_date</td>\n<td>The estimated dispatch date for your order.</td>\n</tr>\n<tr>\n<td>order_details-&gt;order_status</td>\n<td>The current status of the order. Typical values include ‘Processing Order’, ‘Dispatched’ and ‘On Hold’.</td>\n</tr>\n<tr>\n<td>order_details-&gt;shipped_by</td>\n<td>The delivery method used to send the order (node included if the current status is ‘Dispatched’) .</td>\n</tr>\n<tr>\n<td>order_details-&gt;tracking_link</td>\n<td>The direct courier tracking link for the order (node included if the current status is ‘Dispatched’).</td>\n</tr>\n<tr>\n<td>progress_images-&gt;progress_image</td>\n<td>A list of images that have been taken of the order in progress, if any are available. For more information about this unique feature, <a href=\"https://www.clothes2order.com/docs/order-progress-images/\">please click here</a></td>\n</tr>\n<tr>\n<td>order_issues-&gt;issue-&gt;reason</td>\n<td>In the rare cases there are any outstanding issues with your order, these will be shown here. By clicking an order number in your <a href=\"https://www.clothes2order.com/api_order_list.php\">online order history</a> you can then view full details of the issue.</td>\n</tr>\n<tr>\n<td>order_issues-&gt;issue-&gt;date_added</td>\n<td>The date the above outstanding order issue was recorded.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"important-notes\">Important Notes</h2>\n<p>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.</p>\n","_postman_id":"83e541a1-dd18-475f-96f6-b877f1e7f4ae"},{"name":"Position Codes","item":[],"id":"88597ff5-1979-456a-8baa-362d6e103379","description":"<p>All customisations sent via the ordering API require a position code to indicate where they should be printed or embroidered. The full list of position codes is below. All positions are stated as worn.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Position Code</th>\n<th>Position Name</th>\n<th>Position Diagram</th>\n<th>Maximum Width</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Right Sleeve</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/1.jpg\" alt /></td>\n<td>10 cm</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Bottom Right</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/2.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Right Chest</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/3.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Centre Chest</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/4.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>5</td>\n<td>Left Chest</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/5.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>6</td>\n<td>Bottom Left</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/6.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>7</td>\n<td>Left Sleeve</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/7.jpg\" alt /></td>\n<td>10 cm</td>\n</tr>\n<tr>\n<td>8</td>\n<td>Centre Back</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/8.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Top Back</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/9.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>11</td>\n<td>Front of Hat</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/11.jpg\" alt /></td>\n<td>10 cm</td>\n</tr>\n<tr>\n<td>12</td>\n<td>Bottom Back</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/12.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>13</td>\n<td>Front of Bag</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/13.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>14</td>\n<td>Centre Tea Towel</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/14.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>15</td>\n<td>Left Pocket</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/15.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>16</td>\n<td>Right Pocket</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/16.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>17</td>\n<td>Top Chest</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/17.jpg\" alt /></td>\n<td>30 cm</td>\n</tr>\n<tr>\n<td>18</td>\n<td>Inside Back (for Printed Labels)</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/18.jpg\" alt /></td>\n<td>12 cm</td>\n</tr>\n<tr>\n<td>19</td>\n<td>Front of Tie</td>\n<td><img src=\"https://www.clothes2order.com/images/c2o_new_2013/layout/checkout/positions/19.jpg\" alt /></td>\n<td>5 cm</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"important-notes\">Important Notes</h2>\n<p>The maximum width for printing is 30cm, the maximum width for embroidery is 25cm. Any embroidery designs submitted via the API with a width greater than 25cm will automatically have the size reduced to 25cm by the API.</p>\n","_postman_id":"88597ff5-1979-456a-8baa-362d6e103379"},{"name":"Code Examples","item":[],"id":"e9d16249-192f-4033-af8f-717a0b34654b","description":"<p>StartFragment</p>\n<p>The Clothes2order API is designed to be simple to integrate into any existing platform. Below is a basic PHP code example to get you started. The example is available to suit both XML and JSON formats (click the option in the top right to change your preference).</p>\n<h2 id=\"php-post-order-xml-example\">PHP Post Order XML Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/*\nAPI Post Order Test Script\nClothes2order.com\n*/\n//Defines\ndefine('API_KEY','your-api-key');\ndefine('API_URL','https://www.clothes2order.com/api/v1/orders');\n//Set your data here\n$post_data = '\n&lt;xml&gt;\n &lt;api_key&gt;&amp;#x27; . API_KEY . &amp;#x27;&lt;/api_key&gt;\n &lt;order&gt;\n  &lt;order_id&gt;123456&lt;/order_id&gt;\n  &lt;order_notes&gt;&lt;![CDATA[Any extra information here]]&gt;&lt;/order_notes&gt;\n  &lt;delivery_method&gt;standard&lt;/delivery_method&gt;\n &lt;/order&gt;\n &lt;customer&gt;\n  &lt;name&gt;Name Here&lt;/name&gt;\n  &lt;email&gt;email@email.com&lt;/email&gt;\n  &lt;telephone&gt;0161123456&lt;/telephone&gt;\n &lt;/customer&gt;\n &lt;address class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27;&gt;\n  &lt;delivery_name&gt;Name&lt;/delivery_name&gt;\n  &lt;company_name&gt;Quayside Clothing Ltd&lt;/company_name&gt;\n  &lt;address_line_1&gt;Unit 9 Wheel Forge Way&lt;/address_line_1&gt;\n  &lt;address_line_2&gt;Trafford Park&lt;/address_line_2&gt;\n  &lt;city&gt;Manchester&lt;/city&gt;\n  &lt;postcode&gt;M17 1EH&lt;/postcode&gt;\n  &lt;country&gt;United Kingdom&lt;/country&gt;\n &lt;/address&gt;\n &lt;products&gt;\n  &lt;product&gt;\n   &lt;sku&gt;594-117-15&lt;/sku&gt;\n   &lt;quantity&gt;2&lt;/quantity&gt;\n   &lt;logos&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;TEST_02&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[http://www.clothes2order.com/images/c2o_new_2013/layout/carousel/15.jpg]]&gt;&lt;/file&gt;\n     &lt;position&gt;3&lt;/position&gt;\n     &lt;width&gt;8&lt;/width&gt;\n     &lt;type&gt;print&lt;/type&gt;\n    &lt;/logo&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;TEST_03&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[http://www.clothes2order.com/images/c2o_new_2013/layout/carousel/14.jpg]]&gt;&lt;/file&gt;\n     &lt;position&gt;5&lt;/position&gt;\n     &lt;width&gt;12&lt;/width&gt;\n     &lt;type&gt;print&lt;/type&gt;\n    &lt;/logo&gt;\n   &lt;/logos&gt;\n  &lt;/product&gt;\n    &lt;product&gt;\n   &lt;sku&gt;1316-1-13&lt;/sku&gt;\n   &lt;quantity&gt;1&lt;/quantity&gt;\n   &lt;logos&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;TEST_04&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[http://www.clothes2order.com/images/c2o_new_2013/layout/carousel/32.jpg]]&gt;&lt;/file&gt;\n     &lt;position&gt;5&lt;/position&gt;\n     &lt;width&gt;10&lt;/width&gt;\n     &lt;type&gt;embroidery&lt;/type&gt;\n    &lt;/logo&gt;\n    &lt;logo&gt;\n     &lt;unique_id&gt;&lt;/unique_id&gt;\n     &lt;file&gt;&lt;![CDATA[http://www.clothes2order.com/images/c2o_new_2013/layout/carousel/16.jpg]]&gt;&lt;/file&gt;\n     &lt;position&gt;9&lt;/position&gt;\n     &lt;width&gt;25&lt;/width&gt;\n     &lt;type&gt;print_1colour&lt;/type&gt;\n    &lt;/logo&gt;\n   &lt;/logos&gt;\n  &lt;/product&gt;\n &lt;/products&gt;\n&lt;/xml&gt;\n';\n//Post data to the API\n$ch = curl_init(API_URL);\ncurl_setopt($ch, CURLOPT_HTTPHEADER,\n array('Content-Type: application/xml',\n       'Accept: application/xml'\n       )\n);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n$ch_result = curl_exec($ch);\n$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\n//Get response\n$obj = simplexml_load_string($ch_result);\n//Check HTTP status\nif ($http_code == 200) {\n //All OK\n echo &amp;#x27;All seems OK: &amp;#x27; . $obj-&gt;status-&gt;msg  . \"&lt;br /&gt;\\n\";\n //Lets echo some values\n echo &amp;#x27;Clothes2order order ID: &amp;#x27; . $obj-&gt;order_details-&gt;order_id . \"&lt;br /&gt;\\n\";\n echo &amp;#x27;This order has cost you: &amp;pound;&amp;#x27; . $obj-&gt;order_details-&gt;net_order_value . \"&lt;br /&gt;\\n\";\n echo &amp;#x27;Estimated dispatch date: &amp;#x27; . $obj-&gt;order_details-&gt;est_dispatch_date . \"&lt;br /&gt;\\n\";\n if (sizeof($obj-&gt;warnings-&gt;warning) &gt; 0) {\n  foreach ((array)$obj-&gt;warnings-&gt;warning as $warning) {\n   echo &amp;#x27;Warning: &amp;#x27; . $warning . \"&lt;br /&gt;\\n\";\n  }\n }\n if (sizeof($obj-&gt;test_msgs-&gt;msg) &gt; 0) {\n  foreach ((array)$obj-&gt;test_msgs-&gt;msg as $test_msg) {\n   echo &amp;#x27;Test message: &amp;#x27; . $test_msg . \"&lt;br /&gt;\\n\";\n  }\n }\n} elseif ($http_code == 400) {\n //There was an error\n echo &amp;#x27;Error occured: &amp;#x27; . $obj-&gt;status-&gt;msg  . \"&lt;br /&gt;\\n\";\n}\nexit;\n?&gt;\n\n</code></pre>\n<h2 id=\"php-post-order-json-example\">PHP Post Order JSON Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/*\nAPI Post Order Test Script\nClothes2order.com\n*/\n//Defines\ndefine('API_KEY','your-api-key');\ndefine('API_URL','https://www.clothes2order.com/api/v1/orders');\n//Set your data here\n$post_data = '\n{\n    \"api_key\": \"' . API_KEY . '\",\n    \"order\": {\n        \"order_id\": \"123456\",\n        \"order_notes\": \"Any extra information here\",\n        \"delivery_method\": \"standard\"\n    },\n    \"customer\": {\n        \"name\": \"Name Here\",\n        \"email\": \"email@email.com\",\n        \"telephone\": \"0161123456\"\n    },\n    \"address\": {\n        \"delivery_name\": \"Name\",\n        \"company_name\": \"Quayside Clothing Ltd\",\n        \"address_line_1\": \"Unit 9 Wheel Forge Way\",\n        \"address_line_2\": \"Trafford Park\",\n        \"city\": \"Manchester\",\n        \"postcode\": \"M17 1EH\",\n        \"country\": \"United Kingdom\"\n    },\n    \"products\": {\n        \"product\": [\n            {\n                \"sku\": \"594-117-15\",\n                \"quantity\": \"2\",\n                \"logos\": {\n                    \"logo\": [\n                        {\n                            \"unique_id\": \"TEST_02\",\n                            \"file\": \"http:\\/\\/www.clothes2order.com\\/images\\/c2o_new_2013\\/layout\\/carousel\\/15.jpg\",\n                            \"position\": \"3\",\n                            \"width\": \"8\",\n                            \"type\": \"print\"\n                        },\n                        {\n                            \"unique_id\": \"TEST_03\",\n                            \"file\": \"http:\\/\\/www.clothes2order.com\\/images\\/c2o_new_2013\\/layout\\/carousel\\/14.jpg\",\n                            \"position\": \"5\",\n                            \"width\": \"12\",\n                            \"type\": \"print\"\n                        }\n                    ]\n                }\n            },\n            {\n                \"sku\": \"1316-1-13\",\n                \"quantity\": \"1\",\n                \"logos\": {\n                    \"logo\": [\n                        {\n                            \"unique_id\": \"TEST_04\",\n                            \"file\": \"http:\\/\\/www.clothes2order.com\\/images\\/c2o_new_2013\\/layout\\/carousel\\/32.jpg\",\n                            \"position\": \"5\",\n                            \"width\": \"10\",\n                            \"type\": \"embroidery\"\n                        },\n                        {\n                            \"unique_id\": \"\",\n                            \"file\": \"http:\\/\\/www.clothes2order.com\\/images\\/c2o_new_2013\\/layout\\/carousel\\/16.jpg\",\n                            \"position\": \"9\",\n                            \"width\": \"25\",\n                            \"type\": \"print_1colour\"\n                        }\n                    ]\n                }\n            }\n        ]\n    }\n}\n';\n//Post data to the API\n$ch = curl_init(API_URL);\ncurl_setopt($ch, CURLOPT_HTTPHEADER,\n array('Content-Type: application/json',\n       'Accept: application/json'\n       )\n);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n$ch_result = curl_exec($ch);\n$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\n//Get response\n$obj = json_decode($ch_result);\n//Check HTTP status\nif ($http_code == 200) {\n //All OK\n echo &amp;#x27;All seems OK: &amp;#x27; . $obj-&gt;status-&gt;msg  . \"&lt;br /&gt;\\n\";\n //Lets echo some values\n echo &amp;#x27;Clothes2order order ID: &amp;#x27; . $obj-&gt;order_details-&gt;order_id . \"&lt;br /&gt;\\n\";\n echo &amp;#x27;This order has cost you: &amp;pound;&amp;#x27; . $obj-&gt;order_details-&gt;net_order_value . \"&lt;br /&gt;\\n\";\n echo &amp;#x27;Estimated dispatch date: &amp;#x27; . $obj-&gt;order_details-&gt;est_dispatch_date . \"&lt;br /&gt;\\n\";\n if (sizeof($obj-&gt;warnings-&gt;warning) &gt; 0) {\n  foreach ((array)$obj-&gt;warnings-&gt;warning as $warning) {\n   echo &amp;#x27;Warning: &amp;#x27; . $warning . \"&lt;br /&gt;\\n\";\n  }\n }\n if (sizeof($obj-&gt;test_msgs-&gt;msg) &gt; 0) {\n  foreach ((array)$obj-&gt;test_msgs-&gt;msg as $test_msg) {\n   echo &amp;#x27;Test message: &amp;#x27; . $test_msg . \"&lt;br /&gt;\\n\";\n  }\n }\n} elseif ($http_code == 400) {\n //There was an error\n echo &amp;#x27;Error occured: &amp;#x27; . $obj-&gt;status-&gt;msg  . \"&lt;br /&gt;\\n\";\n}\nexit;\n?&gt;\n\n</code></pre>\n<p>You can download these example files on our <a href=\"https://www.clothes2order.com/docs/code-resources/\">code resources</a> page.</p>\n","_postman_id":"e9d16249-192f-4033-af8f-717a0b34654b"},{"name":"Resources","item":[],"id":"3ff7d097-16b2-4e99-9daf-ccfe0d103712","description":"<p>Below are some free to download resources designed to aid any development work with the Clothes2order API. Check back soon for more downloads.</p>\n<ul>\n<li><p><a href=\"https://www.clothes2order.com/docs/data-files/xml_data_files.zip\">XML post and response example files</a></p>\n</li>\n<li><p><a href=\"https://www.clothes2order.com/docs/data-files/json_data_files.zip\">JSON post and response example files</a></p>\n</li>\n<li><p><a href=\"https://www.clothes2order.com/docs/data-files/php_post_order_examples.zip\">Basic PHP post order examples</a> (as featured on our <a href=\"https://www.clothes2order.com/docs/code-examples/\">code examples</a> page)</p>\n</li>\n</ul>\n","_postman_id":"3ff7d097-16b2-4e99-9daf-ccfe0d103712"}],"id":"d18c7ad1-de0a-4392-a89f-885ca4908d0c","description":"<p>There are various HTTP headers that can be used when sending data to the Clothes2order API and in addition, different response headers can be sent back to you depending on the request.</p>\n<h2 id=\"submit-headers\">Submit Headers</h2>\n<p>The key header to note here is the ‘Accept’ header; this allows you to use the API with either XML or JSON.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Options</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td>application/xml or application/json</td>\n<td>application/xml</td>\n<td>Determines whether XML or JSON should be used.</td>\n</tr>\n<tr>\n<td>Test-Mode</td>\n<td>true or false</td>\n<td>false</td>\n<td>Once you have been set live on the API, you can use this header to force a test transaction.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-headers\">Response Headers</h2>\n<p>Instead of having to check the OK/ERROR status in the content of the response, the HTTP header code can also be checked to determine if a request was successful or not.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Response Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Request was received successfully.</td>\n</tr>\n<tr>\n<td>400</td>\n<td>There was an error with your request. In the case of order submission, your order hasn’t been accepted.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"d18c7ad1-de0a-4392-a89f-885ca4908d0c"}],"id":"86febe87-7d42-4feb-8d5d-a25467a489f1","description":"<p>The Clothes2order API is built in a <a href=\"http://en.wikipedia.org/wiki/Representational_State_Transfer\">RESTful</a> way and is designed to be powerful yet simple to use. The API supports both XML and JSON requests from the same URL sets and uses HTTP error codes appropriately in responses.</p>\n<p>Authentication is built around a single API key; it’s important you do not disclose this key as anyone in possession of it will be able to place orders using your account.</p>\n<p>To aid with development, the API has a testing mode (the default for new users) so requests can be sent and the responses validated without the need to place live orders.</p>\n<p>For detailed technical information about the various areas of the API, please click the links on the left.</p>\n","_postman_id":"86febe87-7d42-4feb-8d5d-a25467a489f1"},{"name":"API Features","item":[{"name":"Silent Fulfilment","item":[],"id":"966cbba1-cf8c-4633-bbf3-37621db25066","description":"<p>Many clothing APIs on the market are quite basic. You can submit an order, but then you have to redirect the user to someone else’s payment pages to complete the order on a different URL. Not only is this a poor experience for your customer but it makes your site look very amateurish. For any serious business, an API set up like this doesn’t offer an acceptable solution.</p>\n<p>The Clothes2order API is different! You send your orders to us electronically without your customer needing to leave your website. You retain complete control of your own order process.</p>\n<ul>\n<li>Set up your website however you please; any ecommerce platform can work with our API.</li>\n<li>Charge whatever you like for your items.</li>\n<li>Take payment via whichever method you choose.</li>\n<li>We’ll send your order directly to your customer, with a custom packing slip as standard.</li>\n<li>We won’t market to or contact your customer directly.</li>\n</ul>\n<p>If this sounds like the API for you, <a href=\"https://www.clothes2order.com/api_login.php\">click here to sign up</a> now.</p>\n","_postman_id":"966cbba1-cf8c-4633-bbf3-37621db25066"},{"name":"Custom Pricing","item":[],"id":"1a01ad84-0301-43d5-8092-5c5133c291bc","description":"<p>The Clothes2order API supports very flexible pricing levels. The price we can offer you will be largely based on the volume of orders you are sending and for simplicity, we will charge you a flat rate price per SKU. These prices are based on our existing <a href=\"https://www.clothes2order.com/pages/pricing/\">pricing structure</a>; for example you might be set on “price break 3 + 5%” for products and “price break 2 – 10%” for application charges.</p>\n<img src=\"https://content.pstmn.io/016e2f9b-1d3d-45c0-8147-063eac282f62/aW1hZ2UucG5n\" alt height=\"222\" width=\"662\" />\n\n<p>You can view your current pricing structure by <a href=\"https://www.clothes2order.com/api_options.php\">logging in to your account</a> and all your exact SKU prices can be viewed by downloading your <a href=\"https://www.clothes2order.com/docs/data-feeds/\">pricing data feed</a> from your account.</p>\n<p>By default, all new users start with:</p>\n<ul>\n<li>Price break 2 for products and applications</li>\n<li><strong>FREE</strong> set up for all printed logos (save money instantly versus placing the order through our normal site)</li>\n</ul>\n<p>If you’d like to discuss alternative pricing levels simply <a href=\"https://www.clothes2order.com/api_contact.php\">contact our API team</a> and we can offer alternative prices based on your sales volume.</p>\n<p>If this sounds like the API for you, <a href=\"https://www.clothes2order.com/api_login.php\">click here to sign up</a> now.</p>\n","_postman_id":"1a01ad84-0301-43d5-8092-5c5133c291bc"},{"name":"Dispatch Features","item":[],"id":"d8c8281d-aac8-442c-8f1a-a349a1dfd0e3","description":"<p>There are several features provided as standard to API users to make the dispatch and delivery of goods to your end user as seamless as possible.</p>\n<h2 id=\"custom-packing-slip\">Custom Packing Slip</h2>\n<p>We print your logo, address and contact details on the packing slip for your order as standard. Rather than having a Clothes2order branded packing slip, this really helps promote your brand and improve the experience of your customers.</p>\n<p>Please note packing slips are printed in black and white, so please consider this when supplying us your logo.</p>\n<h2 id=\"direct-courier-tracking-link\">Direct Courier Tracking Link</h2>\n<p>The majority of orders sent from Clothes2order to UK destinations are dispatched via Interlink Express courier. They provide excellent delivery tracking and a 1 hour time slot for delivery. Once your order is dispatched, you can <a href=\"https://www.clothes2order.com/docs/check-order-status/\">query our API</a> to obtain a direct link to the tracking information for the order which you can then send to your customer.</p>\n<p>We also provide direct tracking links when international orders are dispatched; these are sent via UPS.</p>\n<p>If this sounds like the API for you, <a href=\"https://www.clothes2order.com/api_login.php\">click here to sign up</a> now.</p>\n","_postman_id":"d8c8281d-aac8-442c-8f1a-a349a1dfd0e3"},{"name":"Default Customisations","item":[],"id":"9fd7a448-74bb-44ef-bc9b-c882b68c8eb3","description":"<p>Want to brand the clothing you supply? Although we do not offer a relabeling service, for a low per item fee, Clothes2order can add a default customisation to all your items. For example, you could have your company logo printed in the back neck position of all your garments. Since these need to be single colour prints, we can offer them more cheaply than standard printing applications.</p>\n<p>If this service is of interest, please <a href=\"https://www.clothes2order.com/api_contact.php\">contact our API team</a> for more details.</p>\n","_postman_id":"9fd7a448-74bb-44ef-bc9b-c882b68c8eb3"},{"name":"Order Progress Images","item":[],"id":"2d15653a-96d8-4231-a38c-0fe506ba8a1f","description":"<p>One of the features our customers love best is our order progress images. During production, we email our customers an image of their order actually in production. Some examples of these images are shown below:</p>\n<img src=\"https://www.clothes2order.com/images/order_images/1390636918130.jpg\" />\n\n<img src=\"https://www.clothes2order.com/images/order_images/1390898192659.jpg\" />\n\n<p>This unique feature is available to API users as standard! When <a href=\"https://www.clothes2order.com/docs/check-order-status/\">requesting the current order status via our API</a>, any order progress image URLs will be listed. You can then send these to your customer or link to them from your site as you wish. The images are not branded or watermarked byClothes2order so can fit seamlessly into your site or customer correspondence.</p>\n<p>If this sounds like the API for you, <a href=\"https://www.clothes2order.com/api_login.php\">click here to sign up</a> now.</p>\n<p>*Please note we do not guarantee to produce a progress image for every order.</p>\n","_postman_id":"2d15653a-96d8-4231-a38c-0fe506ba8a1f"}],"id":"59d96b42-df58-4f0b-bb31-a0f7f034e128","description":"<p>The Clothes2order API offers an unparalleled array of great features. As well as a huge product range, <a href=\"https://www.clothes2order.com/docs/billing/\">automated billing</a> and a <a href=\"https://www.clothes2order.com/docs/technical-docs/\">simple yet powerful API interface</a>, our API offers many other features as standard to all users.</p>\n<p>To discover more about our additional API features, please click the links on the left hand side.</p>\n<p>If this sounds like the API for you, <a href=\"https://www.clothes2order.com/api_login.php\">click here to sign up</a> now.</p>\n","_postman_id":"59d96b42-df58-4f0b-bb31-a0f7f034e128"},{"name":"API FAQs","item":[],"id":"5031800a-80ae-4115-b824-ca11028054d5","description":"<p>Below are a list of questions and answers regarding our API which aren’t covered in other areas of the documentation.</p>\n<h2 id=\"how-is-pricing-set-for-products-and-applications\">How is pricing set for products and applications?</h2>\n<p>For API pricing we offer a single price per each SKU based on standard Clothes2order pricing. To view more information about Clothes2order pricing in general, <a href=\"https://www.clothes2order.com/pages/pricing/\">please click here</a>.?We offer custom pricing to API users depending on your sales volume. Please <a href=\"https://www.clothes2order.com/docs/custom-pricing/\">click here to view more about custom pricing</a>.</p>\n<h2 id=\"how-are-delivery-charges-calculated\">How are delivery charges calculated?</h2>\n<p>Delivery charges are based on our <a href=\"https://www.clothes2order.com/pages/delivery/\">standard delivery pricing</a>. You can also select express dispatch through the API; charges for this are based on our <a href=\"https://www.clothes2order.com/pages/express-dispatch/\">standard express pricing</a>.</p>\n<h2 id=\"what-countries-can-i-send-orders-to\">What countries can I send orders to?</h2>\n<p>A full list of countries we ship to is shown on our <a href=\"https://www.clothes2order.com/pages/delivery/\">delivery information page</a>. Please note all orders are charged in GBP regardless of where they are shipped. Express delivery options are only available to UK destinations.</p>\n<h2 id=\"what-customisation-types-can-i-order-through-the-api\">What customisation types can I order through the API?</h2>\n<p>We only accept images through the API; i.e. printed logos or embroidered logos as we classify them on the main Clothes2order site. You can still order just text, but you’ll need to create an image file of your text rather than just passing individual lines of text as we can on the Clothes2order front end site. The reason for this is that to pass individual text lines, fonts, colours etc would hugely complicate the API so to keep it simple we just ask for a single image file per design. We do not support individual names and numbers in the same way as on the Clothes2order front end site, however you can still pass a different image customisation containing a name and/or number as a standard design to achieve the same effect if you wish.</p>\n<h2 id=\"do-you-send-customisation-proofs\">Do you send customisation proofs?</h2>\n<p>No, we do not send proofs for API orders as standard. The reason for this is that we don’t communicate with your end customer so we take this process out of the order. Our expert team will create the artwork as you have specified when the order is created.</p>\n<h2 id=\"what-support-is-available-for-the-api\">What support is available for the API?</h2>\n<p>The API documentation provided here is very comprehensive and should cover any questions you might have. To use our API you will need some technical knowledge, or access to someone who does. Although we can’t do the integration for you, our API team is on hand to offer support via our <a href=\"https://www.clothes2order.com/api_contact.php\">dedicated API contact form</a>. Please note we’re unable to offer phone support to API users.</p>\n<h2 id=\"do-you-process-returns-on-behalf-of-api-users\">Do you process returns on behalf of API users?</h2>\n<p>No. You define your own returns policy and handle that as you wish via your own site. If you wish to accept customer returns, the item is then yours to do with as you please (resell for example). As such, we require a contact address from all API users which will be printed on your packing slip.</p>\n<h2 id=\"can-the-api-be-used-to-order-blank-items\">Can the API be used to order blank items?</h2>\n<p>Yes! Simply add items without customisation to your API order and make sure you set the <em>is_blank</em> flag when <a href=\"https://www.clothes2order.com/docs/placing-an-order/\">placing your order</a>.</p>\n","_postman_id":"5031800a-80ae-4115-b824-ca11028054d5"}]}