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

Quotes

Get

GET https://container-url.zoeysite.com/api/rest/quotes2/quotes?quote_id=113

Query parameters:

NameExampleNotes
quote_id113ID of quote to fetch info for. ( Required )

Example response (Get), HTTP 200:

[
    {
        "is_active": "0",
        "state": null,
        "status": null,
        "zoey_quote_status": "2",
        "coupon_code": null,
        "protect_code": null,
        "shipping_description": null,
        "is_virtual": null,
        "items_count": "1",
        "items_qty": "2.0000",
        "store_id": "0",
        "customer_id": "1",
        "base_discount_amount": "0.0000",
        "base_discount_canceled": null,
        "base_discount_invoiced": null,
        "base_discount_refunded": null,
        "base_grand_total": "155.0000",
        "base_shipping_amount": "5.0000",
        "base_shipping_canceled": null,
        "base_shipping_invoiced": null,
        "base_shipping_refunded": null,
        "base_shipping_tax_amount": null,
        "base_shipping_tax_refunded": null,
        "base_subtotal": "136.3600",
        "base_subtotal_canceled": null,
        "base_subtotal_invoiced": null,
        "base_subtotal_refunded": null,
        "base_tax_amount": "13.6400",
        "base_tax_canceled": null,
        "base_tax_invoiced": null,
        "base_tax_refunded": null,
        "base_to_global_rate": "1.0000",
        "base_to_order_rate": null,
        "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": "155.0000",
        "shipping_amount": "5.0000",
        "shipping_canceled": null,
        "shipping_invoiced": null,
        "shipping_refunded": null,
        "shipping_tax_amount": null,
        "shipping_tax_refunded": null,
        "store_to_base_rate": "1.0000",
        "store_to_order_rate": null,
        "subtotal": "136.3600",
        "subtotal_canceled": null,
        "subtotal_invoiced": null,
        "subtotal_refunded": null,
        "tax_amount": "13.6400",
        "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": null,
        "total_refunded": null,
        "can_ship_partially": null,

... (truncated)

Get All

GET https://container-url.zoeysite.com/api/rest/quotes2/quotes?is_active=1&zoey_quote_status[neq]=1&store_id=1&customer_id=1&customer_email=test@zoey.com&customer_group_id=0&increment_id=000000115&limit=10&page=2

You can filter this list by providing filter data in the request query.

Filtering requires and attribute and a value. If the action is not present it will default to = or eq.

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

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.

Query parameters:

NameExampleNotes
is_active11 or 0. Indicates whether a quote is currently in use by frontend customer. ( Optional )
zoey_quote_status[neq]1The integer ID of the current status of the quote. See Quotes > Quote Status Settings for a list of Quote Status IDs ( Optional )
store_id1The integer ID of the store the quote is assigned to. ( Optional )
customer_id1The integer ID of the customer set on the quote. ( Optional )
customer_emailtest@zoey.comThe email address on the quote ( Optional )
customer_group_id0The integer ID of the customer group set on the quote. ( Optional )
increment_id000000115Customer facing quote number. Typically automatically generated but can be manually set by admin users. ( Optional )
limit10Limit the response.
page2Paginate the response.

Example response (GetAll), HTTP 200:

[
    {
        "is_active": "1",
        "state": null,
        "status": null,
        "zoey_quote_status": "1",
        "coupon_code": null,
        "protect_code": null,
        "shipping_description": null,
        "is_virtual": null,
        "items_count": "0",
        "items_qty": "0.0000",
        "store_id": "1",
        "customer_id": "1",
        "base_discount_amount": "0.0000",
        "base_discount_canceled": null,
        "base_discount_invoiced": null,
        "base_discount_refunded": null,
        "base_grand_total": "0.0000",
        "base_shipping_amount": "0.0000",
        "base_shipping_canceled": null,
        "base_shipping_invoiced": null,
        "base_shipping_refunded": null,
        "base_shipping_tax_amount": null,
        "base_shipping_tax_refunded": null,
        "base_subtotal": "0.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": null,
        "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": "0.0000",
        "shipping_amount": "0.0000",
        "shipping_canceled": null,
        "shipping_invoiced": null,
        "shipping_refunded": null,
        "shipping_tax_amount": null,
        "shipping_tax_refunded": null,
        "store_to_base_rate": "1.0000",
        "store_to_order_rate": null,
        "subtotal": "0.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": null,
        "total_refunded": null,
        "can_ship_partially": null,
        "c
... (truncated)

Example response (Get All), HTTP 200:

[
    {
        "is_active": "1",
        "state": null,
        "status": null,
        "zoey_quote_status": "2",
        "coupon_code": null,
        "protect_code": null,
        "shipping_description": null,
        "is_virtual": null,
        "items_count": "0",
        "items_qty": "0.0000",
        "store_id": "1",
        "customer_id": "1164",
        "base_discount_amount": "0.0000",
        "base_discount_canceled": null,
        "base_discount_invoiced": null,
        "base_discount_refunded": null,
        "base_grand_total": "0.0000",
        "base_shipping_amount": "0.0000",
        "base_shipping_canceled": null,
        "base_shipping_invoiced": null,
        "base_shipping_refunded": null,
        "base_shipping_tax_amount": null,
        "base_shipping_tax_refunded": null,
        "base_subtotal": "0.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": null,
        "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": "0.0000",
        "shipping_amount": "0.0000",
        "shipping_canceled": null,
        "shipping_invoiced": null,
        "shipping_refunded": null,
        "shipping_tax_amount": null,
        "shipping_tax_refunded": null,
        "store_to_base_rate": "1.0000",
        "store_to_order_rate": null,
        "subtotal": "0.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": null,
        "total_refunded": null,
        "can_ship_partially": null,
       
... (truncated)

Count

GET https://container-url.zoeysite.com/api/rest/quotes2/count

See Get All for filtering

Update

PUT https://container-url.zoeysite.com/api/rest/quotes2/quote

Example request body:

{
    "quote_id": "678",
    "data": {
        "sales_rep_user_ids": [
            "12232208114183625295",
            "10899377607998806001",
            "19353745417817517276"
        ]
    }
}

Create

POST https://container-url.zoeysite.com/api/rest/quotes2/quote

Example response (Create), HTTP 200:

113

Submit

POST https://container-url.zoeysite.com/api/rest/quotes2/quote_submit

This is used to submit a quote to the admin to be reviewed by the store. It does not create an order.

quoteData Description
quote_name The name of the quote. This may be required based on your stores setting to require quote name, which can be found in Quotes > Settings in your store admin.

Example request body:

{
    "quoteId": "113",
    "quoteData": {
        "quote_name": "API Quote",
        "sales_reps_user_ids": "94236136666192051944,92838584930183242888,91407454229181797421"
    }
}

Example response (Submit), HTTP 200:

"113"

Convert (Deprecated)

POST https://container-url.zoeysite.com/api/rest/quotes2/quote_order

DEPRECATED ENDPOINT

This endpoint has been deprecated and is no longer receiving active support. See endpoint Convert (V2) for the most recent endpoint for converting a quote to an order.

Used to convert a quote into an order.

Param Type Notes Required
id string int The Cart ID that will be converted into an order.
store string int The Store ID to which the cart is associated.
sales_rep_user_ids string[] Should be an array of sales rep user ids. No (default: [])

This endpoint does not support convering a quote into multiple orders. See Convert (V2)

Example request body:

{
    "quoteId": "344",
}

Example response (Convert), HTTP 500:

{
    "messages": {
        "error": [
            {
                "code": 500,
                "message": "Unable to convert quote to order"
            }
        ]
    }
}

Convert (V2)

POST https://container-url.zoeysite.com/api/rest/quotes2/quote_order_convert

Used to convert a quote into an order.

Param Type Notes Required
id string int The Cart ID that will be converted into an order.
store string int The Store ID to which the cart is associated.
sales_rep_user_ids string[] Should be an array of sales rep user ids. No (default: [])

Example request body:

{
    "quoteId": "2807",
    "store": "1",
    "sales_rep_user_ids": [
        "99999999999999999999"
    ]
}

Example response (Convert (Single Order)), HTTP 200:

{
    "result": {
        "status": {
            "success": 1,
            "details": [
                {
                    "type": "success",
                    "code": "QUOTE_SUCCESS_CONVERTED_TO_ORDER",
                    "message": "The quote 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": "QUOTE_SUCCESS_CONVERTED_TO_ORDER",
                    "message": "The quote has successfully been converted to an order.",
                    "detail": ""
                }
            ]
        },
        "data": {
            "order_count": 2,
            "created_orders": [
                "100000001-1",
                "100000001-2"
            ]
        }
    }
}