API documentation
General details on API communications
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 Secret Key is auto-generated value which can be taken from your API Settings page.
-
The Signature value will need to be generated on your end as SHA1 (request body + Secret Key).
NOTE: The request body value is different for POST and GET methods:-
If the POST method is used, the request body should include the entire content of the request.
-
If the GET method is used, the request body should include 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:
- GET /api/orders.php
Retrieve a list of Orders - GET /api/order.php
Receive a single Order - GET /api/orders/count.php
Receive a count of all Orders - POST /api/orders.php
Create a new Order - DELETE /api/orders.php
Remove a Order from the database
Order Properties
id | readonly |
{"id": "23941"} |
external_id | writable |
{"external_id": "TEST-234324"} |
created_at | readonly |
{"created_at": "2016-10-17T15:07:08+01:00"} |
type | readonly |
{"type": "order"}
|
status | readonly |
{"status": "received"}
|
deleted | readonly |
{"deleted": "false"} |
brand | writable |
{"brand": "The Brick Factory"} |
billing_address | readonly |
{"billing_address": {
|
shipping_address | writable |
{"shipping_address": {
|
items | writable |
"items": [
|
summary | readonly |
"summary": {
|
shipping | writable |
"shipping": {
|
payment | readonly |
"payment": {
|
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 |
|
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 |
---|---|
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:
|
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 { |
|
Creating an order (XML format)
POST /api/orders.php?AppId=APP-xxxxxxxx&Signature=xxxxxxxx <?xml version="1.1" encoding="UTF-8" ?> |
|
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 |