Zoey REST API reference ยท Interactive version: apidocs.zoey.com

Orders

States

GET https://container-url.zoeysite.com/api/rest/sales/orders/state

Get

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:

NameExampleNotes
id100000703Order 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 All

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.

Action Data Type Description
eq string Is Equal To
neq string Is NOT Equal To
like string Is Like
nlike string Is Not Like
in array Is In
nin array Is NOT In
null boolean Is NULL
notnull boolean Is NOT NULL
gt string Is Greater Than
gte string Is Greater Than OR Equal To
lt string Is Less Than
lte string Is Less Than OR Equal To

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.

DataType Query Description
string ?increment_id=10000001&email=test@zoey.com Filter this collection where increment_id is equal to 10000001 and email is equal to test@zoey.com (Default)
string ?firstname[neq]=test firstname does not equal test
array ?email[in][0]=test@example.com&email[in][1]=test@zoey.com Filter this collection where the email is either test@example.com or test@zoey.com
boolean ?email[null]=true Filter this collection where the email is null.
string ?created_at[gt]=2021-12-13 Filter this collection for Orders created at greater than 2021-12-13 - can also use updated_at

Query parameters:

NameExampleNotes
increment_id100000002Filter by Increment ID. ( Optional )
customer_email[in][0]don@zoey.comFilter by customer email. ( Optional )
customer_email[in][1]test@zoey.com
limit10Limit the response.
page1Paginate the response.
order[created_at]DESCSort 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"
    }
]

Count

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:

NameExampleNotes
increment_id100000002Filter 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"
    }
]

Cancel

POST https://container-url.zoeysite.com/api/rest/orders/:orderId/cancel

Update

PUT https://container-url.zoeysite.com/api/rest/sales2/orders

Request Fields:

Field Type Required Description
sales_rep_user_ids array No Array of User IDs
status string No Status must be the status code that is valid for the current state of the order
is_archived integer No 1 for Yes or 0 for No
created_at datetime No UTC DateTime string in ISO format. ex: '2026-05-14 18:35:00'

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"
    }
}

Print

GET https://container-url.zoeysite.com/api/rest/sales2/orders/print?id=100000343

Response

Key Type Description
file string A base64 encoded PDF.
filename string PDF file name.

Query parameters:

NameExampleNotes
id100000343Order increment ID.

Delete

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:

NameExampleNotes
id100000343Order increment id.
reasonThis is the reason why I'm deleting the order.Reason for deleting the order.

Change Increment ID

PUT https://container-url.zoeysite.com/api/rest/sales2/changeIncrementId

Field Type Required Description
entity_id integer Yes ID of the sales entity.
entity_type string Yes 'creditmemo',
'invoice',
'order',
'shipment',
'transaction',
new_increment_id string Yes New Increment ID.

Example request body:

{
    "data": {
        "entity_id": 123,
        "entity_type": "invoice",
        "new_increment_id": "ABC-123"
    }
}