The Order Management API is a simple API that allows you to search for orders or update the status of an order
Each request is authorized using username and password fields passed either as query parameters (for GET/POST operations) or part of the application/x-www-form-urlencoded body (for POST operations).
Each response contains a response_status field containing the following error codes.
Code | Severity | Description |
---|---|---|
10001 | SUCCESS | |
30001 | ERROR | Authentication failed |
31000 | ERROR | API not enabled on your site |
40004 | WARNING | Product ID Not Found |
50002 | ERROR | No conditions specified |
50003 | ERROR | Condition N 'field' is missing |
50003 | ERROR | Condition N 'condition' is missing |
50003 | ERROR | date1 is invalid |
50003 | ERROR | date2 is invalid |
50004 | ERROR | Invalid limit or offset |
50005 | ERROR | Invalid request parameters |
Retrieve a list of orders based upon your search parameters.
The maximum number of rows returned is 100. Use the returned "total" value to determine if you need to paginate using the offset parameter.
You can specify multiple conditions in which case the conditions will be joined with a logical 'AND'.
To use multiple conditions you will need to pass the parameters using the multi condition parameter format:
conditions[n][parameter name]
where n starts at 1 and "parameter name" is the name of the parameter as below.
field required | integer The Field the condition is tested against. Values
|
condition required | integer The logical test to use. Values
|
date1 | string The date to test against (Required when field is Date Ordered or Date Production Files Ready). |
date2 | string The end date to test against (Required when field is Date Ordered or Date Production Files Ready and condition is 7: Between). |
string | string The string to test against (Required when field is Invoice Number). Multi condition parameter name: conditions[n][string] |
limit | integer [ 0 .. 100 ] Default: 100 Limit the number of results returned. The maximum limit is 100 |
offset | integer Default: 0 Offset of the results to allow pagination |
sortby | integer Default: 2 What field to sort the results by
|
include_workflow_data | integer Default: 0 Include workflow information used to track items going through the production workflow. Set to 1 to include workflow information. |
include_po_data | integer Default: 0 Include purchase order information associated with the above workflow information. This will make workflow information be included.Set to 1 to include purchase order information. |
include_shipments | integer Default: 0 Include shipment information. Set to 1 to include shipment information. |
include_production_file_info | integer Default: 0 Include production file information. Set to 1 to include information about the format and offsets/cropping of the production files. |
skip_login_token | integer Default: 0 Don't add the user login token to document download urls. Set to 1 to not add the user login token. The user's password can be added to the download document url instead of the token. |
object (ResponseStatus) | |
Array of objects (Order) | |
total | number Total number of orders found |
field=2&condition=4&date1=2018-02-01T00%3A00%3A00
{- "response_status": {
- "code": 10001,
- "severity": "SUCCESS",
- "description": "string"
}, - "orders": [
- {
- "order_id": "INV1234",
- "item_amount": 22.5,
- "shipping_amount": 10.2,
- "tax_amount_before_discounts": 6.5,
- "tax_amount": 5.5,
- "tax_names": "Tax name",
- "taxes": [
- {
- "id": 6345,
- "name": "GST",
- "amount": 12.65
}
], - "discount_amount": 0,
- "coupon_discount_amount": 2.2,
- "coupon_code": "ABC123",
- "gift_certificate_amount": 20.2,
- "gift_certificate_code": "C600-5A05-E2F8-D8A6",
- "credit_used": 5,
- "billable_amount": 12,
- "outstanding_balance": 4.5,
- "total_weight": 2.8,
- "order_proof_pdf_url": "https://abc.secure-decortion.com/manage/orders/download_order_proof/234234",
- "job_name": "Internet Order",
- "customer_id": 2678321,
- "customer_po_number": "PO123",
- "source_type": 0,
- "order_status": 1,
- "date_started": "2016-02-01T00:00:00",
- "date_ordered": "2016-02-01T00:00:00",
- "date_production_files_ready": "2016-02-01T00:00:00",
- "date_produced": "2016-02-01T00:00:00",
- "date_shipped": "2016-02-01T00:00:00",
- "date_invoiced": "2016-02-01T00:00:00",
- "date_modified": "2016-02-01T00:00:00",
- "date_due": "2016-02-15T00:00:00",
- "date_scheduled": "2016-02-01T00:00:00",
- "rush_order_fee": "Rush Order Fee",
- "rush_order_fee_amount": 5,
- "account_terms": "C.O.D",
- "shipping_method": {
- "id": 34857623,
- "name": "Overnight"
}, - "shipments": [
- {
- "id": 45334,
- "date": "2016-02-01T00:00:00",
- "tracking_number": "TRK5363",
- "shipping_method": {
- "id": 34857623,
- "name": "Overnight"
}, - "packages": [
- {
- "id": 6345,
- "weight": 224,
- "length": 10,
- "width": 3,
- "height": 0.6
}
], - "workflow_items": [
- {
- "workflow_item_id": 5463456,
- "qty": 24
}
]
}
], - "billing_details": {
- "user_id": 2143423,
- "email": "fred@acme.co",
- "firstname": "Fred",
- "lastname": "Smith",
- "country_code": "US",
- "state": "California",
- "city": "Huntington Beach",
- "street": "219 Cimmaron Road",
- "postcode": "92647",
- "company": "Acme Co",
- "company_id": 5423,
- "salutation": "Mr",
- "ph_number": "714-596-6776",
- "custom_fields": [
- {
- "caption": "Student Name",
- "value": "James"
}
]
}, - "shipping_details": {
- "firstname": "Patrick",
- "lastname": "Smith",
- "country_code": "US",
- "state": "California",
- "city": "Huntington Beach",
- "street": "219 Cimmaron Road",
- "postcode": "92647",
- "company": "Acme Co",
- "salutation": "Mr",
- "ph_number": "714-596-6776",
- "custom_fields": [
- {
- "caption": "Student Name",
- "value": "James"
}
]
}, - "payment_details": {
- "payment_type_id": 0,
- "payment_type_name": "Credit Card",
- "card_number": "*********1234"
}, - "payments": [
- {
- "id": 2483456,
- "payment_id": 234234,
- "date_paid": "2016-02-03T00:00:00",
- "payment_method": "Credit Card",
- "billable_amount": 22.5,
- "refunded_amount": 0,
- "paid_amount": 22.5
}
], - "refunds": [
- {
- "id": 2958662,
- "date_refunded": "2016-02-03T00:00:00",
- "refunded_amount": 0
}
], - "order_lines": [
- {
- "id": 345554635463,
- "product_id": 2353534534,
- "product_code": "G2000",
- "product_name": "Gilden 2000",
- "decorated_product_name": "Racing Special Shirt",
- "product_color": {
- "id": 35345,
- "name": "White",
- "colors": [
- {
- "id": 35345,
- "type": "rgb",
- "r": 0,
- "g": 0,
- "b": 0,
- "c": 0,
- "m": 0,
- "y": 0,
- "k": 0,
- "name": "cyan"
}
]
}, - "sku": "ACC234523",
- "fields": [
- {
- "field_id": 35345,
- "field_name": "Size",
- "field_type": 0,
- "options": [
- {
- "option_id": 35345,
- "qty": 2,
- "name": "Large",
- "code": "L",
- "sku": "AAA234234",
- "dn_sku_id": "123423513",
- "vendor_sku": "AAA234234",
- "sub_options": [
- {
- "sub_option_id": 76589,
- "qty": 2,
- "name": "Long",
- "code": "L",
- "sku": "AAA567567",
- "dn_sku_id": "123234-423513",
- "vendor_sku": "AAA567567",
- "price": 20,
- "cost": 10
}
]
}
], - "string_value": "ABC",
- "date_value": "2016-02-01T00:00:00",
- "file_value_url": "/configured_product_field/s/213/2323/123/file.pdf"
}
], - "views": [
- {
- "view_id": 235345,
- "view_name": "Front",
- "thumbnail": "/configured_product_views/s/image/234/453/546/large_thumb.png",
- "areas": [
- {
- "area_id": 65345,
- "area_name": "Body",
- "processes": [
- {
- "process": "DTG",
- "stitch_count": 999,
- "cropped": false,
- "top": "10cm",
- "left": "5.2cm",
- "width": "25.5cm",
- "height": "30.5cm",
- "format": "png"
}
],
}
], - "production_files_ready": true
}
], - "teamnames": [
- {
- "size": "M",
- "fields": [
- {
- "location": "Front-Body",
- "text": "David"
}
]
}, - {
- "size": "XL",
- "fields": [
- {
- "location": "Front-Body",
- "text": "John"
}
]
}
], - "qty": 5,
- "total_price": 150.5,
- "unit_price": 30.15,
- "decoration_unit_price": 5.15,
- "discount": 0,
- "tax": 10.5,
- "tax_names": "Tax name",
- "store_commission": 3.25,
- "parent_store_commission": 0.25,
- "commission_transaction_fee": 0.65,
- "production_status": 2,
- "processed_date": "2016-02-01T00:00:00",
- "processed_by": {
- "id": 735345,
- "login": "Rob123",
- "firstname": "Robert",
- "lastname": "Smith"
}, - "production_assigned_to": {
- "id": 735345,
- "login": "Rob123",
- "firstname": "Robert",
- "lastname": "Smith"
}, - "shipped_date": "2016-02-01T00:00:00",
- "shipped_by":