Zoey REST API reference ยท Interactive version: apidocs.zoey.com
GET https://container-url.zoeysite.com/api/rest/sales/orders/state
GET https://container-url.zoeysite.com/api/rest/sales2/orders/info?id=100000703
Used to get data from a single order.
Note:
Data returned from this endpoint is filtered through permissions. So the only properties that will be returned are those allowed.
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 100000703 | Order Increment ID. ( Required ) |
Example response (Get), HTTP 200:
{
"splitorder_key": null,
"state": "new",
"status": "pending",
"coupon_code": null,
"protect_code": "8b5ac7",
"shipping_description": "Pickup In Store - Collect from Store",
"is_virtual": "0",
"store_id": "1",
"customer_id": "728",
"base_discount_amount": "0.0000",
"base_discount_canceled": null,
"base_discount_invoiced": null,
"base_discount_refunded": null,
"base_grand_total": "15.0000",
"base_shipping_amount": "0.0000",
"base_shipping_canceled": null,
"base_shipping_invoiced": null,
"base_shipping_refunded": null,
"base_shipping_tax_amount": "0.0000",
"base_shipping_tax_refunded": null,
"base_subtotal": "15.0000",
"base_subtotal_canceled": null,
"base_subtotal_invoiced": null,
"base_subtotal_refunded": null,
"base_tax_amount": "0.0000",
"base_tax_canceled": null,
"base_tax_invoiced": null,
"base_tax_refunded": null,
"base_to_global_rate": "1.0000",
"base_to_order_rate": "1.0000",
"base_total_canceled": null,
"base_total_invoiced": null,
"base_total_invoiced_cost": null,
"base_total_offline_refunded": null,
"base_total_online_refunded": null,
"base_total_paid": null,
"base_total_qty_ordered": null,
"base_total_refunded": null,
"discount_amount": "0.0000",
"discount_canceled": null,
"discount_invoiced": null,
"discount_refunded": null,
"grand_total": "15.0000",
"shipping_amount": "0.0000",
"shipping_canceled": null,
"shipping_invoiced": null,
"shipping_refunded": null,
"shipping_tax_amount": "0.0000",
"shipping_tax_refunded": null,
"store_to_base_rate": "1.0000",
"store_to_order_rate": "1.0000",
"subtotal": "15.0000",
"subtotal_canceled": null,
"subtotal_invoiced": null,
"subtotal_refunded": null,
"tax_amount": "0.0000",
"tax_canceled": null,
"tax_invoiced": null,
"tax_refunded": null,
"total_canceled": null,
"total_invoiced": null,
"total_offline_refunded": null,
"total_online_refunded": null,
"total_paid": null,
"total_qty_ordered": "1.0000",
"total_refunded": null,
"can_ship_partially": null,
"can_ship_partially_item": null,
"customer_is_guest": "0",
"customer_note_notify": "0",
"billing_address_id": "7470",
"customer_group_id": "1",
"edit_increment": null,
"email_sent": null,
"forced_shipment_with_invoice": null,
"payment_auth_expiration": null,
"qu
... (truncated)
GET https://container-url.zoeysite.com/api/rest/sales2/orders/list?increment_id=100000002&customer_email[in][0]=don@zoey.com&customer_email[in][1]=test@zoey.com&limit=10&page=1&order[created_at]=DESC
Filtering this colleciton requires and attribute and a value.
How To Filter A Data Type in Query
Filtering on multiple values for the same data will require that you index the values as shown in the 'array' row of this table.
Query parameters:
| Name | Example | Notes |
|---|---|---|
increment_id | 100000002 | Filter by Increment ID. ( Optional ) |
customer_email[in][0] | don@zoey.com | Filter by customer email. ( Optional ) |
customer_email[in][1] | test@zoey.com | |
limit | 10 | Limit the response. |
page | 1 | Paginate the response. |
order[created_at] | DESC | Sort the response. |
Example response (Updated At), HTTP 200:
[
{
"order_id": "3102",
"increment_id": "110004262",
"customer_id": "728",
"customer_email": "developer@example.com",
"customer_firstname": "Zoey",
"customer_lastname": "Developer",
"created_at": "2021-06-02 11:16:05",
"updated_at": "2021-06-02 11:16:05",
"status": "processing",
"total_item_count": "3",
"total_qty_ordered": "3.0000",
"grand_total": "60.9700",
"company_id": null,
"company_name": null,
"company_location_id": null,
"company_location_name": null,
"admin_order_info": {
"Created by Team Member": "admin@example.com",
"Created": "Nov 5, 2019 4:57:39 PM",
"Created from IP": "127.0.0.1"
},
"order_attributes_json": "[]",
"custom_attributes": [],
"billing_company": null,
"shipping_company": null,
"store_id": "1",
"order_currency_code": "USD"
},
{
"order_id": "3103",
"increment_id": "110004263-1",
"customer_id": "728",
"customer_email": "developer@example.com",
"customer_firstname": "Zoey",
"customer_lastname": "Developer",
"created_at": "2021-06-02 11:16:05",
"updated_at": "2021-06-02 11:16:05",
"status": "processing",
"total_item_count": "1",
"total_qty_ordered": "1.0000",
"grand_total": "26.9900",
"company_id": null,
"company_name": null,
"company_location_id": null,
"company_location_name": null,
"admin_order_info": {
"Created by Team Member": "admin@example.com",
"Created": "Nov 5, 2019 4:59:01 PM",
"Created from IP": "127.0.0.1"
},
"order_attributes_json": "[]",
"custom_attributes": [],
"billing_company": null,
"shipping_company": null,
"store_id": "1",
"order_currency_code": "USD"
}
]
GET https://container-url.zoeysite.com/api/rest/sales2/orders/count?increment_id=100000002&customer_email[in][0]=don@zoey.com&customer_email[in][1]=test@zoey.com
See Get All for filtering options.
Query parameters:
| Name | Example | Notes |
|---|---|---|
increment_id | 100000002 | Filter by Increment ID. ( Optional ) |
customer_email[in][0] | don@zoey.com | |
customer_email[in][1] | test@zoey.com |
Example response (Updated At), HTTP 200:
[
{
"order_id": "112",
"increment_id": "1500000134",
"customer_email": "test@zoey.com",
"customer_firstname": "Zoey's test",
"customer_lastname": "customer",
"created_at": "2021-06-02 11:16:05"
}
]
POST https://container-url.zoeysite.com/api/rest/orders/:orderId/cancel
PUT https://container-url.zoeysite.com/api/rest/sales2/orders
Example request body:
{
"order_id": "15",
"data": {
"sales_rep_user_ids": [
"1",
"2"
],
"status": "test_processing",
"is_archived": "1",
"created_at": "2024-05-14 18:35:00"
}
}
GET https://container-url.zoeysite.com/api/rest/sales2/orders/print?id=100000343
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 100000343 | Order increment ID. |
DELETE https://container-url.zoeysite.com/api/rest/sales2/orders?id=100000343&reason=This is the reason why I'm deleting the order.
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 100000343 | Order increment id. |
reason | This is the reason why I'm deleting the order. | Reason for deleting the order. |
PUT https://container-url.zoeysite.com/api/rest/sales2/changeIncrementId
Example request body:
{
"data": {
"entity_id": 123,
"entity_type": "invoice",
"new_increment_id": "ABC-123"
}
}