Overview

Cart state is maintained server-side, which frees up developers from the tricky task of client-side cart management. No call is needed to initiate a session; simply add an item for a given merchant ID and the cart can then be manipulated with the calls listed below.

Cart Session Modes

There are two different cart session modes for authenticated and guest users.

Authenticated User Cart

Authenticated user carts are identified with access tokens passed in the Authorization header. No special actions are necessary.

Guest Cart

Guest carts are identified by the Guest-Token header, the value of which must be generated before initiating a cart session. Guest cart sessions can be integrated into authenticated user sessions by simply passing the Guest-Token header to the login and account creation endpoints, after which the converted carts can be accessed using the authenticated user flow described above.

Retrieve Contents

HTTP Request

GET /customer/cart/{merchant_id}

Request Parameters

"order_type": "pickup",
"order_time": "2014-01-19T08:00:00-0500"

Parameter Name

Type

Notes

Required Parameters

order_type

String

Must be either ‘pickup’ or ‘delivery’ (Note: Items and Carts are never for pickup or for delivery only. The reason we ask for the type in all the cart operations is so we can calculate details about the cart – delivery fee for example.)

Use this param to add multiple items to the cart at once. (To add one item, use the above one)

order_type

String

Must be either ‘pickup’ or ‘delivery’ (Note: Items are never for pickup or for delivery only. The reason we ask for the type in all the cart operations is so we can calculate details about the cart – delivery fee for example.)

Must be either ‘pickup’ or ‘delivery’ (Note: Items are never for pickup or for delivery only. The reason we ask for the type in all the cart operations is so we can calculate details about the cart – delivery fee for example.)