Production Time: 1-5 Working Days

API docum­en­ta­tion

General details on API commu­nica­tions

How to make API requests?

Each API request should include your identity by specifying AppID and Signature.

  • The AppID is static value which can be taken from your API Settings page.
  • The Signature value will need to be generated at your side as SHA1(request body + Secret Key).
  • The Secret Key is auto-generated value which can be taken from your API Settings page.

POST: For API requests using this method you'll need to include the whole content for the request.

GET: API requests using this method requires everything after the ? symbol, excluding your Signature parameter.

Request formats

Requests can be made in either JSON or XML:

Requests: Requests sent using GET can use either JSON or XML formats. If you're using POST you'll need to specify the format of your requests using Content-Type. All answers to these requests will be in the same format as the format of request.

Answers: If you're using GET, the format of answers will need to be specified using the 'format' parameter. You can use either 'JSON' or 'XML' as the value - if omitted this will default to 'JSN'.

Creating and processing orders

What can you do with Order?

The API lets you do the following with the Order resource. More detailed versions of these general actions may be available:

Order Properties

id readonly
{"id": "23941"}

A unique numeric identifier for the order. This one is used by the shop owner and customer.
external_id writeble
{"external_id": "TEST-234324"}

A unique numeric identifier for the internal customer order.
created_at readonly
{"created_at": "2016-10-17T15:07:08+01:00"}

By default, this auto-generated property is the date and time when the order was created in Imprinted, in ISO 8601 format.
type readonly
{"type": "order"}
  • order - regular order
  • invoice - generate invoice for current account balance
  • credits - credit purchase
status readonly
{"status": "received"}
  • received
  • in progress
  • paid
  • stock allocation
  • printing
  • quality control
  • refunded
  • internal order query
deleted readonly
{"deleted": "false"}

If the order was cancelled, this value is "true."
brand writeble
{"brand": "Imprinted"}

The name of one of the brands created on your profile page https://­www.­imprinted.­com/­drop-shipping-account
billing_­address readonly
{"billing_address": {
"firstName": "Alex",
"lastName": "Cunliffe",
"company": "Imprinted",
"address1": "Unit 501a",
"address2": "Gelenfield Park Two",
"city": "Blackburn",
"county": "Lancashire",
"postcode": "BB1 5QH",
"country": "United Kingdom",
"phone1": "+44 (0)1254 777070",
"phone2": "",
"phone3": "",
"vatNumber": ""
}}

The billing address associated with the creator account. This auto-generated property based on your profile details https://­www.­imprinted.­com/­account-details. It has the following properties:
  • address1: The street address of the billing address.
  • address2: An optional additional field for the street address of the billing address.
  • city: The city of the billing address.
  • company: The company of the person associated with the billing address.
  • country: The name of the country of the billing address.
  • firstName: The first name of the person associated with the payment method.
  • lastName: The last name of the person associated with the payment method.
  • phone1: The phone number at the billing address.
  • phone2: The mobile number at the billing address.
  • phone3: The fax number at the billing address.
  • county: The name of the state or province of the billing address.
  • postcode: The zip or postal code of the billing address.
  • vatNumber: The VAT number of the billing address.
shipping_­address writeble
{"shipping_address": {
"firstName": "Alex",
"lastName": "Cunliffe",
"company": "Imprinted",
"address1": "Unit 501a",
"address2": "Gelenfield Park Two",
"city": "Blackburn",
"county": "Lancashire",
"postcode": "BB1 5QH",
"country": "United Kingdom",
"phone1": "+44 (0)1254 777070",
"phone2": "",
"phone3": "",
"vatNumber": ""
}}

The mailing address to where the order will be shipped. It has the following properties:
  • address1: The street address of the shipping address.
  • address2: An optional additional field for the street address of the shipping address.
  • city: The city of the shipping address.
  • company: The company of the person associated with the shipping address.
  • country: The name of the country of the shipping address.
  • firstName: The first name of the person associated with the payment method.
  • lastName: The last name of the person associated with the payment method.
  • phone1: The phone number at the shipping address.
  • phone2: The mobile number at the shipping address.
  • phone3: The fax number at the shipping address.
  • county: The name of the state or province of the shipping address.
  • postcode: The zip or postal code of the shipping address.
items writeble
"items": [
{
"pn": "JH001",
"title": "AWDis Girlie College Hoodie",
"price": "23.25",
"retailPrice": "20.00",
"quantity": "4",
"description": "Special instructions",
"brandName": "Imprinted",
"label": {
"type": "printed",
"name": "max-label",
"price": 1.44,
}
"designs": [
"back": "url",
"front": "url",
...
],
"mockups":[
"back": "url",
"front": "url",
...
]
}
]


A list of line item objects, each one containing information about an item in the order. Each item object has the following properties:
  • pn: The product code of the product variant.
  • title: The title of the product.
  • (readonly) price: The price of the item with applied discounts.
  • retailPrice: The reail price of the item (printed on invoice that will be send to customer with order)
  • quantity: The number of products that were purchased.
  • description: Comments or instructions fot he product.
  • brandName: Brand name, if not defined - then used brandName from order
  • label: The label details.
  • designs: A list of designs for print, each one containing information about a side of printing and link to file for printing.
  • mockup: A list of mockups, each one containing information about a side name and link to mockup file.
summary readonly
"summary": {
"currency": "GBP",
"subtotalPrice": "93.00",
"shippingPrice": "7.20",
"total": "100.20",
"totalTax": "16.70"
}


A order summary information. It has the following properties:
  • currency: The three letter code (ISO 4217) for the currency.
  • subto­tal­Price: Price of the order before shipping and taxes
  • shipping­Price: The price of this shipping method.
  • total: The sum of all the prices of all the items in the order, taxes and discounts included
  • totalTax: The amount of tax to be charged.
shipping writable
"shipping": {
"shippingMethod": "courier",
"trackingNumber": "TF345435",
"shiped_at": "2016-10-17T16:17:08+01:00"
}


The shipping details. It has the following properties:
  • shippin­gMethod: A reference to the carrier service that provided the rate. Can be on of those values:
    • regular: Standard delivery
    • recorded: Recorded delivery
    • courier: Courier delivery
    • collection: Collection From Factory
  • (readonly) trackin­gNumber: The shipping number, provided by the shipping company.
  • (readonly) shiped_at: The date and time when the fulfillment was created. The API returns this value in ISO 8601 format.
payment readonly
"payment": {
"methodMethod": "Pay by Credit or Debit Card",
"paid_at": "2016-10-17T16:14:08+01:00"
}


An object containing information about the payment status. It has the following properties:
  • method­Method: The name of the gateway the transaction was issued through.
  • paid_at: The date and time when the transaction was created. The API returns this value in ISO 8601 format.

Endpoints

GET /­api/­orders.­php
Retrieve a list of Orders
ids A comma-separated list of order ids
limit Amount of results
(default: 50) (maximum: 250)
page Page to show
(default: 1)
since_id Restrict results to after the specified ID
created_­at_­min Show orders created after date (format: 2014-04-25T16:15:47-04:00)
created_­at_­max Show orders created before date (format: 2014-04-25T16:15:47-04:00)
status
  • 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 repre­sen­ta­tion of a single order

GET /­api/­order.­php?AppId=­APP-xxxxxxxx&­Signature=­xxxxxxxx&id=10734

Get a repre­sen­ta­tion 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
Receive a count of all Orders
since_id Count orders created after the specified ID
created_­at_­min Count orders created after date (format: 2014-04-25T16:15:47-04:00)
created_­at_­max Count orders created before date (format: 2014-04-25T16:15:47-04:00)
status Count orders with 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
order Order details - please see Order properties
Creating an order (JSON format)

POST /­api/­orders.­php?AppId=­APP-xxxxxxxx&­Signature=­xxxxxxxx

{
"brandName": "Imprinted",
"comment": "Test order.",
"shipping_address": {
"firstName": "Alex",
"lastName": "Cunliffe",
"company": "Imprinted",
"address1": "Unit 501a",
"address2": "Glenfield 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 (XML format)

POST /­api/­orders.­php?AppId=­APP-xxxxxxxx&­Signature=­xxxxxxxx

<?xml version="1.1" encoding="UTF-8" ?>
<order>
<brandName>Imprinted</brandName>
<comment>Test order.</comment>
<shipping_address>
<firstName>Alex</firstName>
<lastName>Cunliffe</lastName>
<company>Imprinted</company>
<address1>Unit 501a</address1>
<address2>Glenfield 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. Only supported for non paid orders.
Delete an order

GET /­api/­orders.­php?AppId=­APP-xxxxxxxx&­Signature=­xxxxxxxx&id=10734