Skip to main content

Introduction

The Cart API provides comprehensive functionality for managing shopping carts in your e-commerce application. It supports multiple operations including adding products, updating quantities, removing items, and managing cart selections.

Cart Structure

A cart consists of several components:

Products

The main items in the cart, including:
prod_id
integer
required
Unique product identifier
parent_prod_id
integer
Parent product ID for variants
quantity
integer
required
Product quantity (max 10 per product)
price
float
Regular price of the product
spl_price
float
Special/sale price if available
exclusive_price
float
Exclusive membership price if applicable
stock
integer
Available stock quantity
prod_type
integer
Product type (1=simple, 6=bundle/combo)
gender_type
string
Gender type: “0” (unisex), “1” (male), “2” (female)
size
string
Product size if applicable
url_key
string
Product URL slug
categories
array
Array of category IDs
images
array
Array of product image URLs
select
boolean
Whether the product is selected for checkout (default: true)
is_mystery_product
integer
Flag for mystery products (0 or 1)
print_name
string
Custom text for customizable products

Combo/Bundle Products

For bundle products (prod_type=6), additional fields apply:
combo_parent_id
integer
Parent bundle product ID
option_id
integer
Specific option ID within the bundle
combo_price_fraction
float
Discount percentage when bundle is complete
options
array
Array of bundle options with their own product details

Gift Vouchers

voucher_value
float
Gift voucher amount
quantity
integer
Number of vouchers

Meta Information

Additional cart metadata including:
  • calculations: Cart totals, discounts, shipping charges
  • climes: Climate impact tracking ID
  • exclusive_user: Exclusive membership status
  • reward_points: Loyalty points usage
  • tss_money: TSS money (store credit) usage
  • tss_points: TSS points usage

Calculations Object

main_sub_total
float
Subtotal before discounts
sub_total
float
Subtotal after discounts
discount
float
Total discount amount
shipping_charges
float
Shipping cost
gift_wrap_amount
float
Gift wrapping charges
used_tss_money
float
Store credit applied
used_reward_points
float
Loyalty points applied
used_tss_points
float
TSS points applied
total
float
Final cart total

Cart Count

cart_count
object
Summary of items in cart
product_count
integer
Total number of products
giftvoucher_count
integer
Total number of gift vouchers
complementary_count
integer
Total number of complementary products
total_count
integer
Sum of all items

Cart Operations

The Cart API supports the following operations:
  • get: Retrieve current cart contents
  • add: Add a product to the cart (increments if exists)
  • set: Set a product quantity directly
  • delete: Remove a product from the cart
  • bulk_delete: Remove multiple products at once
  • clear: Empty the entire cart
  • selection: Mark products as selected/unselected for checkout

Special Features

Exclusive Membership

Carts can contain exclusive membership products with special pricing. Users who already have membership cannot add membership products again.

Mystery Products

Mystery products have special restrictions:
  • Quantity must be 1
  • Only one mystery product per parent product allowed

Nestle Products

Nestle products cannot be combined with other products in the cart.

Combo Discounts

When all products in a bundle are added, combo pricing is automatically applied.

Base Endpoint

POST /api/v2/cart
All cart operations use this single endpoint with different operation types specified in the request payload.

Next Steps

Cart Operations

Learn about specific cart operations and their request/response formats

Build docs developers (and LLMs) love