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

Cart (Create Order)

Cart (Create Order): Shipping

Get

GET https://container-url.zoeysite.com/api/rest/checkout2/cart_shipping?cartId=287

Get the shipping method for the current cart. code is the value used when setting a shipping method.

Query parameters:

NameExampleNotes
cartId287ID of shopping cart to fetch info. ( Required )

Example response (Get), HTTP 200:

[
    {
        "carrier": "freeshipping",
        "carrier_title": "Free Shipping",
        "code": "freeshipping_freeshipping",
        "method": "freeshipping",
        "method_description": null,
        "price": "0.0000",
        "error_message": null,
        "method_title": "Free",
        "carrier_type": null,
        "dispatch_date": null,
        "delivery_date": null,
        "carrier_notice": null,
        "pickup_location": null,
        "time_slot": null,
        "pickup_latitude": null,
        "pickup_longitude": null,
        "carriergroup_id": null,
        "carriergroup": null,
        "carriergroup_shipping_details": null,
        "custom_description": null,
        "carrier_id": null,
        "custom_duties": null,
        "freight_rate": "0",
        "pickup_email": null,
        "pickup_contact": null,
        "pickup_email_option": null,
        "tooltip": null,
        "customs_message": null,
        "carrierName": "Free Shipping"
    },
    {
        "carrier": "flatrate",
        "carrier_title": "Flat Rate 1",
        "code": "flatrate_flatrate",
        "method": "flatrate",
        "method_description": null,
        "price": "5.0000",
        "error_message": null,
        "method_title": "Standard Shipping",
        "carrier_type": null,
        "dispatch_date": null,
        "delivery_date": null,
        "carrier_notice": null,
        "pickup_location": null,
        "time_slot": null,
        "pickup_latitude": null,
        "pickup_longitude": null,
        "carriergroup_id": null,
        "carriergroup": null,
        "carriergroup_shipping_details": null,
        "custom_description": null,
        "carrier_id": null,
        "custom_duties": null,
        "freight_rate": "0",
        "pickup_email": null,
        "pickup_contact": null,
        "pickup_email_option": null,
        "tooltip": null,
        "customs_message": null,
        "carrierName": "Flat Rate 1"
    }
]

Set

PUT https://container-url.zoeysite.com/api/rest/checkout2/cart_shipping

Add a shipping method to the cart. The method used is the code property from the GET response.

Example request body:

{
    "cartId": "287",
    "method": "flatrate_flatrate"
}

Set Custom

PUT https://container-url.zoeysite.com/api/rest/checkout2/cart_shipping_custom

Example request body:

{
    "quoteId": "113",
    "amount": 21.5,
    "description": "This is a custom shipping description."
}