Order Management API (1.0)
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 |
Order Search
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.
Request Body schema: application/x-www-form-urlencoded
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. |
Responses
Response Schema: application/json
object (ResponseStatus) | |
Array of objects (Order) | |
total | number Total number of orders found |
Request samples
- Payload
field=2&condition=4&date1=2018-02-01T00%3A00%3A00
Response samples
- 200
{- "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": {
- "id": 735345,
- "login": "Rob123",
- "firstname": "Robert",
- "lastname": "Smith"
}, - "length": 6,
- "width": 5,
- "height": 1.25,
- "unit_weight": 0.56,
- "workflow_items": [
- {
- "id": 5463456,
- "option_id": 35345,
- "sub_option_id": 12543,
- "vendor_sku": "AAA234234",
- "dn_sku_id": "123234-423513",
- "qty_to_fulfill": 3,
- "qty_required": 4,
- "qty_allocated": 4,
- "qty_on_order": 4,
- "qty_produced": 4,
- "qty_wasted": 1,
- "qty_shipped": 3,
- "qty_skip_po": 0,
- "qty_skip_inv": 0,
- "procurement_status": 60,
- "production_status": 80,
- "shipping_status": 80,
- "purchase_order_lines": [
- {
- "po_line_id": 9633543,
- "po_number": "PO-3452",
- "qty_ordered": 2,
- "qty_received": 1
}
]
}
]
}
], - "notes": [
- {
- "note_type": "to customer",
- "content": "Please hurry",
- "created_at": "2016-02-01T00:00:00",
- "from": {
- "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"
}
]
}
}
], - "assigned_to": {
- "id": 735345,
- "login": "Rob123",
- "firstname": "Robert",
- "lastname": "Smith"
}, - "created_by": {
- "id": 735345,
- "login": "Rob123",
- "firstname": "Robert",
- "lastname": "Smith"
}, - "is_priority": false,
- "store": {
- "id": 11424233,
- "name": "Dave's Store",
- "domain": "www.daves-store.com",
- "owner": {
- "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"
}
]
}
}, - "store_group": {
- "id": 11424233,
- "name": "School Stores"
}
}
], - "total": 1
}
Update Order Status
Update the status of an order and line items. Multiple orders and line items can be specified in one request using the "multi change format":
changes[n][parameter name]
where "n" starts at 1, and "parameter name" is the name of the parameter as below.
Request Body schema: application/x-www-form-urlencoded
order_id required | string The Invoice Number of the order Multi change parameter format: changes[n][order_id] |
order_line_id | number The line item id of the line item getting changed. If missing the whole order will be changed. Multi change parameter format: changes[n][order_line_id] |
workflow_item_id | number The workflow item id of the workflow item getting changed. If missing the whole line item will be changed. Multi change parameter format: changes[n][workflow_item_id] |
qty | number The qty of the change. If you specify a qty, you must also specify a workflow_item_id. If missing the qty will be the outstanding qty for that item. Multi change parameter format: changes[n][qty] |
new_status required | number Enum: 2 3 The status to change the order/line item to. Multi change parameter format: changes[n][new_status] Members 2 = Produced 3 = Shipped |
contact_customer | boolean Default: false Contact the customer letting them know of the status change. This will only happen if the whole order is moved status. Multi change parameter format: changes[n][contact_customer] |
shipping_code | string The Shipping Tracking Number to assign if marking as shipped. Multi change parameter format: changes[n][shipping_tracking_code] |
operator_id | number The id of the operator making the change. If not specified, the operator with the username/password sent will be used. Multi change parameter format: changes[n][operator_id] |
operator_login | string The login of the operator making the change. Can be used if the id of the operator is unknown. Multi change parameter format: changes[n][operator_login] |
Responses
Response Schema: application/json
object (ResponseStatus) |
Request samples
- Payload
order_id=INV1234&new_status=2&contact_customer=false&operator_login=bob123
Response samples
- 200
{- "response_status": {
- "code": 10001,
- "severity": "SUCCESS",
- "description": "string"
}
}
IMPORTANT NOTICE: The following notice pertains to Altacolor LLC's responsibilities and the user's rights as regards API use and may affect a user's legal rights. Read carefully, as use of any product or technological facility provided by Altacolor LLC binds the user to these terms:
- Altacolor LLC is a limited-liability company formed in the United States, with a nexus in the state of Texas.
- Altacolor LLC does not provide support for API functions and does not guarantee or warrant performance, correctness, or fitness for a specific purpose of this software. Use of these API functions are SOLELY at the risk of the user. Use of the provided API is acknowledgement by the user of the foregoing and the user assumes all risk, loss or any other consequence of using these functions in whole or in part and further specifically indemnifies Altacolor LLC, its principals, employees, subsidiaries, affiliates, assigns, agents or representatives from any harm that may arise for the use of or access to the supplied API(s).
- Altacolor LLC makes no representations regarding the security or lack thereof of data in whole or part shared using the API or as stored on Altacolor LLC's servers whether onsite or remotely. The user shall at all times maintain appropriate data security and breach insurance that indemnifies Altacolor LLC, its principals, employees, subsidiaries, affiliates, assigns, agents or representatives against loss whether material or otherwise and further includes any axillary fees and costs such as legal fees, consulting fees, government fees, technology fees or any other sundry costs and fees that may be associated with legal action any action contemplated by the user or a third party actor.
- If any provision set forth herein is held to be illegal, invalid, or unenforceable under present or future laws effective during the term of this agreement, such provision is fully severable, and this agreement must be construed and enforced as if such illegal, invalid, or unenforceable provision never comprised a part of this agreement; and the remaining provisions of this agreement remain in full force and effect and may not be affected by the illegal, invalid, or unenforceable provision or its severance from this agreement.