Zoey REST API reference ยท Interactive version: apidocs.zoey.com
A cart is a an order before its created. There are a few things that are required before a cart can be converted to an order. Each cart is required to have:
Beyond the above, each store can have different requirements with the use of custom customer, address, or order attributes.
Before adding products to a cart you must first have a cart id to use to make additional cart requests. This is done using the Create method below. Once you have the cart ID, you'll be able to add all the required data to the cart.
Once you have a cart ID you'll be able to use the
Getmethod below to get the data associated with the cart.
Once all the required data is added to the cart, you will be able to use the Convert method below.
POST https://container-url.zoeysite.com/api/rest/checkout2/cart
To have a Cart ready to be Converted - The cart endpoint returns a new cart ID
The order will be cancelled once the new cart is converted to an order.
No, you will have a Cart and then you can call the Convert endpoint using the Cart to create the order
Shipped/Invoiced items will not be moved to the new order only items that have not been Shipped/Invoiced will be carried over.
You can also check out https://support.zoey.com/docs/editing-an-order for some more information
Example request body:
{
"data": {
"store_id": "1",
"quote_currency_code": "USD",
"quote_name": "test",
"edit_order": 544
}
}
Example response (Create), HTTP 200:
287
DELETE https://container-url.zoeysite.com/api/rest/checkout2/cart?id=1&reason=This is my reason for deleting the quote.
This endpoint is used to delete a cart.
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 1 | |
reason | This is my reason for deleting the quote. | Reason for deleting the cart (required). Must be more than 10 characters long. |
PUT https://container-url.zoeysite.com/api/rest/checkout2/cart?id=66
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 66 |
Example request body:
{
"cart_id": "231",
"data": {
"quote_name": "Made from Mobile",
"quote_currency_code": "EUR",
"store_id": 2,
"coupon_code": "test_coupon_code"
}
}
GET https://container-url.zoeysite.com/api/rest/checkout2/cart?id=80069
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 80069 |
Example response (Get), HTTP 200:
{
"store_id": "1",
"created_at": "2020-11-26 01:53:03",
"updated_at": "2020-11-26 02:02:14",
"converted_at": null,
"is_active": "0",
"is_virtual": "0",
"is_multi_shipping": "0",
"items_count": "1",
"items_qty": "2.0000",
"orig_order_id": "0",
"store_to_base_rate": "1.0000",
"store_to_quote_rate": "1.0000",
"base_currency_code": "USD",
"store_currency_code": "USD",
"quote_currency_code": "USD",
"grand_total": "150.0000",
"base_grand_total": "150.0000",
"checkout_method": "guest",
"customer_id": "1",
"customer_tax_class_id": "3",
"customer_group_id": "1",
"customer_email": "guest_customer@example.com",
"customer_prefix": null,
"customer_firstname": "Guest",
"customer_middlename": null,
"customer_lastname": "Customer",
"customer_suffix": null,
"customer_dob": null,
"customer_note": null,
"customer_note_notify": "1",
"customer_is_guest": "0",
"remote_ip": null,
"applied_rule_ids": null,
"reserved_order_id": null,
"password_hash": "hBjxiZlm6AI=",
"coupon_code": null,
"global_currency_code": "USD",
"base_to_global_rate": "1.0000",
"base_to_quote_rate": "1.0000",
"customer_taxvat": null,
"customer_gender": null,
"subtotal": "136.3600",
"base_subtotal": "136.3600",
"subtotal_with_discount": "136.3600",
"base_subtotal_with_discount": "136.3600",
"is_changed": "1",
"trigger_recollect": "0",
"ext_shipping_info": null,
"gift_message_id": null,
"is_persistent": "0",
"ebizmarts_abandonedcart_counter": "0",
"ebizmarts_abandonedcart_flag": "0",
"ebizmarts_abandonedcart_token": null,
"auctaneapi_discounts": null,
"base_giftcard_discount": "0.0000",
"giftcard_discount": "0.0000",
"giftcard_code": null,
"xp_card_data": null,
"zoey_order_comment": null,
"zb2b_customer_data": null,
"email_status": "0",
"zoey_custom_options_price": "0.0000",
"base_zoey_custom_options_price": "0.0000",
"zoey_bcc_emails": null,
"zoey_customer_agreement": null,
"is_recovered_abandoned_cart": "0",
"flag_as_recovered_cart": "0",
"mailchimp_abandonedcart_flag": "0",
"mailchimp_landing_page": "",
"mailchimp_campaign_id": "",
"avatax_normalization_flag": null,
"customer_avatax_lc_seller_is_importer": null,
"prohibited_rule_ids": null,
"is_pending_order": "0",
"force_checkout_step": null,
"customer_signat
... (truncated)
POST https://container-url.zoeysite.com/api/rest/checkout2/cart_order/reserve_id/
Query parameters:
| Name | Example | Notes |
|---|---|---|
| 1003 |
Example request body:
{
"cart_id": 1003
}
POST https://container-url.zoeysite.com/api/rest/checkout2/cart_order
This endpoint has been deprecated and is no longer receiving active support. See endpoint Convert (V2) for the most recent endpoint for converting a cart to an order.
Convert the cart to an order.
Split Orders is not supported when converting a cart to and order using the API. See Convert (V2)
Example request body:
{
"id": "53756",
"store": "1",
"agreements": null,
"notifyCustomer": "0",
"sales_rep_user_ids": [
"10967417227736299533"
]
}
Example response (Convert), HTTP 200:
"100000180"
POST https://container-url.zoeysite.com/api/rest/checkout2/cart_order_convert
Convert the cart to an order. If the cart is flagged to split into multiple orders then multiple orders will be created.
Example request body:
{
"id": "113"
}
Example response (Convert (Single Order)), HTTP 200:
{
"result": {
"status": {
"success": 1,
"details": [
{
"type": "success",
"code": "CART_SUCCESS_CONVERTED_TO_ORDER",
"message": "The cart has successfully been converted to an order.",
"detail": ""
}
]
},
"data": {
"order_count": 1,
"created_orders": [
"100000001"
]
}
}
}
Example response (Convert (Split Orders)), HTTP 200:
{
"result": {
"status": {
"success": 1,
"details": [
{
"type": "success",
"code": "CART_SUCCESS_CONVERTED_TO_ORDER",
"message": "The cart has successfully been converted to an order.",
"detail": ""
}
]
},
"data": {
"order_count": 2,
"created_orders": [
"100000001-1",
"100000001-2"
]
}
}
}