Zoey REST API reference ยท Interactive version: apidocs.zoey.com
GET https://container-url.zoeysite.com/api/rest/orders/:orderId/items?limit=10&page=1&order=item_id&dir=DESC&filter[0][attribute]=product_id&filter[0][eq]=1
Query parameters:
| Name | Example | Notes |
|---|---|---|
limit | 10 | Limit the amount of results returned. (Optional. Default 10) |
page | 1 | Paginate the limit. (Optional) |
order | item_id | Used to sort by property. (Optional) |
dir | DESC | Used to sort by direction. (Optional) |
filter[0][attribute] | product_id | Used to filter results by property. (Optional) |
filter[0][eq] | 1 | Used to filter results by action/value. (Optional) |
Example response (Get), HTTP 200:
[
{
"item_id": "54026",
"parent_item_id": null,
"product_id": "68679",
"product_type": "simple",
"sku": "dummy-configurable-15",
"name": "dummy-configurable-15 Large-Red",
"qty_canceled": "0.0000",
"qty_invoiced": "0.0000",
"qty_ordered": "6.0000",
"qty_refunded": "0.0000",
"qty_shipped": "0.0000",
"price": "10.0000",
"base_price": "10.0000",
"original_price": "10.0000",
"base_original_price": "10.0000",
"tax_percent": "10.0000",
"tax_amount": "6.0000",
"base_tax_amount": "6.0000",
"discount_amount": "0.0000",
"base_discount_amount": "0.0000",
"row_total": "60.0000",
"base_row_total": "60.0000",
"price_incl_tax": "11.0000",
"base_price_incl_tax": "11.0000",
"row_total_incl_tax": "66.0000",
"base_row_total_incl_tax": "66.0000",
"qty_to_cancel": 6,
"qty_to_invoice": 6,
"qty_to_refund": 0,
"qty_to_ship": 6,
"qty_billed": 6,
"qty_to_bill": 0
},
{
"item_id": "54027",
"parent_item_id": null,
"product_id": "68678",
"product_type": "simple",
"sku": "dummy-configurable-14",
"name": "dummy-configurable-14 Large-Yellow",
"qty_canceled": "0.0000",
"qty_invoiced": "0.0000",
"qty_ordered": "6.0000",
"qty_refunded": "0.0000",
"qty_shipped": "0.0000",
"price": "10.0000",
"base_price": "10.0000",
"original_price": "10.0000",
"base_original_price": "10.0000",
"tax_percent": "10.0000",
"tax_amount": "6.0000",
"base_tax_amount": "6.0000",
"discount_amount": "0.0000",
"base_discount_amount": "0.0000",
"row_total": "60.0000",
"base_row_total": "60.0000",
"price_incl_tax": "11.0000",
"base_price_incl_tax": "11.0000",
"row_total_incl_tax": "66.0000",
"base_row_total_incl_tax": "66.0000",
"qty_to_cancel": 6,
"qty_to_invoice": 6,
"qty_to_refund": 0,
"qty_to_ship": 6,
"qty_billed": 6,
"qty_to_bill": 0
},
{
"item_id": "54028",
"parent_item_id": null,
"product_id": "68677",
"product_type": "simple",
"sku": "dummy-configurable-13",
"name": "dummy-configurable-13 Large-Green",
"qty_canceled": "0.0000",
... (truncated)
POST https://container-url.zoeysite.com/api/rest/sales2/order/cancelItems
This endpoint allows for Canceling individual Item Quantities on an Order. Note that if canceling all items on an Order that the entire Order will be canceled.
Upon successful completion, a comment will be added to the Order indicating items have been canceled. This comment will not be visible to the customer who placed the Order.
Item Quantities that have already been Invoiced/Shipped cannot be canceled.
Items cannot be Canceled for Orders that are in the complete, closed, or canceled state.
Item
PackageInfo
Example request body:
[
{
"order_id": 27471,
"reason": "Reason for Cancelling Items",
"return_to_stock": 1,
"items": [
{
"item_id": 103949,
"qty_to_cancel": 2,
"uses_packages": 0
}
]
}
]
Example response (Cancel Items Success), HTTP 200:
{
"result": {
"status": {
"success": 1,
"details": [
{
"type": "success",
"code": "Items Canceled",
"message": "",
"detail": ""
}
]
},
"data": []
}
}
Example response (Cancel Items Success - Packages), HTTP 200:
{
"result": {
"status": {
"success": 1,
"details": [
{
"type": "success",
"code": "Items Canceled",
"message": "",
"detail": ""
}
]
},
"data": []
}
}
Example response (Cancel Items Error - Invalid QTY), HTTP 500:
{
"messages": {
"error": [
{
"code": 500,
"message": "SOCI-E-003-03: Invalid Cancel Quantities:\nCannot cancel Quantity 4 for Simple-Alpha (103949). Maximum Cancel Quantity is 2"
}
]
}
}
Example response (Cancel Items Error - Order Canceled), HTTP 500:
{
"messages": {
"error": [
{
"code": 500,
"message": "SOCI-E-001: Cannot cancel Items for Order 120023033 because the Order Status is Canceled (canceled)"
}
]
}
}
POST https://container-url.zoeysite.com/api/rest/orders/:orderid/add-items
Example request body:
{
"items": [
{
"product_id": 123,
"qty": 2,
"price": 25,
"variation_id": 790,
"customizations": {
"100": "Custom Text",
"101": "Blue"
}
}
]
}
Example response (Add Items), HTTP 200:
{
"success": true,
"order_id": "12345",
"increment_id": "200000123",
"subtotal": "140.0000",
"tax_amount": "10.0000",
"shipping_amount": "0.0000",
"discount_amount": "0.0000",
"grand_total": "150.0000",
"total_item_count": "5",
"history": [
{
"id": 123,
"status": "pending",
"comment": "API User ID: 1\nThe following items were added to the Order: ...",
"created_at": "2026-01-30 14:30:00",
"is_customer_notified": false,
"is_visible_on_front": false
}
]
}
POST https://container-url.zoeysite.com/api/rest/orders/:orderid/edit-items
When the same product exists multiple times on an order (e.g., with different prices or delivery dates), you must use
item_idto specify which item to edit. Theskuandproduct_idoptions will match the first item only.
Example request body:
{
"items": [
{
"item_id": 3196,
"qty": 5,
"price": 22.5
}
]
}
Example response (Edit Items), HTTP 200:
{
"success": true,
"order_id": "12345",
"increment_id": "200000123",
"subtotal": "140.0000",
"tax_amount": "10.0000",
"shipping_amount": "0.0000",
"discount_amount": "0.0000",
"grand_total": "150.0000",
"total_item_count": "5",
"history": [
{
"id": 123,
"status": "pending",
"comment": "API User ID: 1\nThe following items were added to the Order: ...",
"created_at": "2026-01-30 14:30:00",
"is_customer_notified": false,
"is_visible_on_front": false
}
]
}
POST https://container-url.zoeysite.com/api/rest/orders/:orderid/remove-items
Example request body:
{
"items": [
{
"item_id": 456,
"qty": 2
}
],
"preview": false,
"remove_additional_items": false
}
Example response (Remove Items), HTTP 200:
{
"success": true,
"order_id": "12345",
"increment_id": "200000123",
"subtotal": "75.0000",
"tax_amount": "5.0000",
"shipping_amount": "0.0000",
"discount_amount": "0.0000",
"grand_total": "80.0000",
"total_item_count": "2",
"history": [...]
}
Example response (Remove Items Preview), HTTP 200:
{
"success": true,
"order_id": "12345",
"increment_id": "200000123",
"subtotal": "75.0000",
"tax_amount": "5.0000",
"shipping_amount": "0.0000",
"discount_amount": "0.0000",
"grand_total": "80.0000",
"total_item_count": "2",
"preview": true,
"preview_data": {
"original_grand_total": "130.00",
"new_grand_total": "80.00",
"items_affected": 1
}
}
POST https://container-url.zoeysite.com/api/rest/orders/:orderid/versions
Example response (Versions), HTTP 200:
[
{
"id": 5,
"order_id": 12345,
"version": 3,
"created_at": "2026-01-30 14:30:00",
"created_by": 1,
"source": "api",
"comment": "Items edited via API",
"order_snapshot": {
"grand_total": "150.00",
"items": [...]
}
},
{
"id": 4,
"order_id": 12345,
"version": 2,
"created_at": "2026-01-29 10:00:00",
"created_by": 1,
"source": "api",
"comment": "Items added via API",
"order_snapshot": {
"grand_total": "100.00",
"items": [...]
}
}
]
POST https://container-url.zoeysite.com/api/rest/orders/:orderid/versions/:version
Example response (Version), HTTP 200:
{
"id": 5,
"order_id": 12345,
"version": 3,
"created_at": "2026-01-30 14:30:00",
"created_by": 1,
"source": "api",
"comment": "Items edited via API",
"order_snapshot": {
"grand_total": "150.00",
"subtotal": "140.00",
"tax_amount": "10.00",
"shipping_amount": "0.00",
"items": [
{
"item_id": 456,
"product_id": 123,
"sku": "ABC-123",
"name": "Product Name",
"qty": 5,
"price": 28,
"row_total": 140
}
]
}
}
POST https://container-url.zoeysite.com/api/rest/orders/:orderid/versions/:version/rollback
Creates a new snapshot of the current order state (for undo capability)
Compares current items with snapshot items
Removes items not in snapshot
Edits items with changed qty/price
Adds items that were in snapshot but not currently on order
Handles customization changes (removes and re-adds items with different customizations)
Example response (Rollback Version), HTTP 200:
{
"success": true,
"order_id": "12345",
"increment_id": "200000123",
"subtotal": "90.0000",
"tax_amount": "0.0000",
"shipping_amount": "0.0000",
"discount_amount": "0.0000",
"grand_total": "100.0000",
"total_item_count": "2",
"history": [...]
}