The Cart endpoints let you create carts, add or update items, and clear them. All cart operations require a secret key. You should create a cart when a user begins shopping and persist the returnedDocumentation Index
Fetch the complete documentation index at: https://docs.quickshops.app/llms.txt
Use this file to discover all available pages before exploring further.
id in their browser session so subsequent requests can reference the same cart.
Store the
cartId in the user’s browser session (e.g. a cookie or sessionStorage). You will need it for every subsequent cart operation and when creating a checkout session.Create cart
Creates a new, empty cart for your store.Request
Response
Unique identifier for the cart. Persist this value in the user’s session.
Identifier of the store this cart belongs to.
Array of cart line items. Empty on a newly created cart.
Calculated totals for the cart.
Get cart
Retrieves the current state of a cart.Path parameters
The ID of the cart to retrieve.
Request
Response
Returns a cart object with the same shape as Create cart.Add item
Adds a product to the cart. If the product is already in the cart, the quantity is increased by the amount you specify.Path parameters
The ID of the cart to add the item to.
Body parameters
The ID of the product to add.
The number of units to add.
Request
Response
Returns the updated cart object.Update item quantity
Sets the quantity of an existing line item. Use this to increase or decrease the quantity of a product already in the cart.Path parameters
The ID of the cart containing the item.
The ID of the product whose quantity you want to update.
Body parameters
The new quantity for this line item.
Request
Response
Returns the updated cart object.Remove item
Removes a product from the cart entirely.Path parameters
The ID of the cart containing the item.
The ID of the product to remove.
Request
Response
Returns the updated cart object with the item removed.Clear cart
Removes all items from the cart, resetting it to an empty state.Path parameters
The ID of the cart to clear.
Request
Response
Returns the cart object with an emptylines array and zeroed totals.