Advice and answers from the Inkthreadable Team

When you're familiar with the requests you can make to our API, you'll need to know what answers will be returned to your own: 

Endpoints

GET - /api/orders.php

Retrieve a list of orders. 

  • ids - a comma-separated list of order IDs.
  • limit - amount of results returned (default: 50, maximum: 250).
  • page - page to show (default: 1). 
  • since_id - restrict results to those after the specified ID.
  • created_at_min - show orders created after a specific date (format: 2014-04-25T16:15:47-04:00).
  • created_at_max - show orders created before a specific date (format: 2014-04-25T16:15:47-04:00).
  • status - show the status of an order (received, in progress, paid, refunded, stock allocation, printing, quality control, refunded, internal order query).
  • List all orders - GET /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx
  • List all orders after the specified ID - GET /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx&since_id=123
  • List of specific orders in XML format - GET /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx&ids=10734,1599,1067&format=xml

GET - /api/order.php

Retrieve a specific order. 

  • Get a representation of a single order - GET /api/order.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx&id=10734
  • Get a representation of a single order in XML format - GET /api/order.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx&id=10734&format=xml

GET - /api/orders/count.php

Retrieve a count of all orders.

  • since_id - count orders created after the specified ID.
  • created_at_min - count orders created after a specific date (format: 2014-04-25T16:15:47-04:00).
  • created_at_max - count orders created before a specific date (format: 2014-04-25T16:15:47-04:00).
  • status - count all orders with a specific status (received, in progress, paid, refunded, stock allocation, printing, quality control, refunded, internal order query).
  • Count all orders - GET /api/orders/count.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx4
  • Count all paid orders - GET /api/order.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx&status=paid

POST - /api/orders.php

Create a new order.

Creating an order using JSON:

POST /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx {
 "brandName": "Inkthreadable",
 "comment": "Test order.",
 "shipping_address": {
  "firstName": "Alex",
  "lastName": "Cunliffe",
  "company": "Inkthreadable",
  "address1": "Unit 501a",
  "address2": "Glenfield Business Park Two",
  "city": "Blackburn",
  "county": "Lancashire",
  "postcode": "BB1 5QH",
  "country": "United Kingdom",
  "phone1": "+44 (0)1254 777070",
 },
 "shipping": {
  "shippingMethod": "courier"
 },
 "items": [
  {
   "pn": "JH001",
   "quantity": 4,
   "retailPrice": 20,
   "description": "Please print as large as posible",
   "label": {
    "type": "printed",
    "name": "ink-label"
   },
   "designs": {
    "front": "http://animalfair.com/wp-content/uploads/2014/06/little_cute_cat_1920x1080.jpg",
    "back": "http://data3.whicdn.com/images/168204223/large.jpg"
   }
  }
 ]
}

Creating an order using XML:

POST /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx <?xml version="1.1" encoding="UTF-8" ?>
<order>
 <brandName>Inkthreadable</brandName>
 <comment>Test order.</comment>
 <shipping_address>
  <firstName>Alex</firstName>
  <lastName>Cunliffe</lastName>
  <company>Inkthreadable</company>
  <address1>Unit 501a</address1>
  <address2>Glenfield Business Park Two</address2>
  <city>Blackburn</city>
  <county>Lancashire</county>
  <country>United Kingdom</country>
  <postcode>BB1 5QH</postcode>
  <phone1>+44 (0)1254 777070</phone1>
 </shipping_address>
 <shipping>
  <shippingMethod>courier</shippingMethod>
 </shipping>
 <items>
  <item>
   <pn>JH001</pn>
   <quantity>4</quantity>
   <retailPrice>25.00</retailPrice>
   <description>Please print as large as posible</description>
   <label>
    <type>printed</type>
    <name>ink-label</name>
   </label>
   <designs>
    <front>http://animalfair.com/wp-content/uploads/2014/06/little_cute_cat_1920x1080.jpg</front>
    <back>http://data3.whicdn.com/images/168204223/large.jpg</back>
   </designs>
  </item>
 </items>
</order>

DELETE - /api/orders.php

Delete an order. This is only supported for non-paid orders.

  • Delete an order - GET /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx&id=10734
Did this answer your question?