Cart API Response
This document provides a detailed breakdown of the JSON structure returned by cart-related API endpoints.
tip
If you're looking for how to call the endpoints, refer back to the Cart API Overview.
Success Response (200 OK)
Returns the complete cart data including all items with their variant details and pricing information.
Response Format
| Field | Type | Description |
|---|---|---|
message | String | Status message indicating the result of the operation |
data | Cart Object | Cart data with all items |
source | String | Source of the data (e.g., "db" for database) |
Cart Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the cart |
storeId | String | Store ID associated with the cart |
customerId | String | Customer's unique identifier |
totalAmount | Number | Total amount payable for all items (in paise) |
items | Array[Item] | List of all items currently in the cart |
Item Object
| Field | Type | Description |
|---|---|---|
variantId | String | Unique identifier for the product variant |
quantity | Number | Number of units added to cart |
price | Number | Price per unit (in paise) |
title | String | Product title with variant details |
description | String | Detailed product description |
brandName | String | Brand name of the product |
sku | String | Stock keeping unit identifier |
images | Array[Image] | Product variant images |
option | Options | Variant-specific attributes and specs |
Image Object
| Field | Type | Description |
|---|---|---|
position | Number | Display order of the image |
url | String | Presigned S3 URL of the image |
Options Object
| Field | Type | Description |
|---|---|---|
type | String | Type of options (e.g., "custom") |
data | OptionData | Attribute details for the variant |
OptionData
| Field | Type | Description |
|---|---|---|
size | Size Attribute | Size-related attributes |
color | Color Attribute | Color-related attributes |
Size Attribute
| Field | Type | Description |
|---|---|---|
name | String | Attribute name (e.g., "footwearSize") |
brand | String | Brand-specific naming (e.g., "default") |
value | Array[Size Value] | Array of available size values |
gender | String | Gender specification (e.g., "male") |
displayName | String | User-friendly display name |
Size Value
| Field | Type | Description |
|---|---|---|
id | String | Unique size identifier |
width | String | Size width category (e.g., "narrow", "regular", "wide") |
numericCM | String | Size measurement in centimeters |
numericEU | String | European shoe size standard |
numericUK | String | UK shoe size standard |
displayName | String | Display label combining size and width (e.g., "UK 5.0 | Narrow") |
Color Attribute
| Field | Type | Description |
|---|---|---|
value | String | Color code value |
hexCode | String | Hexadecimal color code |
displayName | String | User-friendly color name |