Skip to main content

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

FieldTypeDescription
messageStringStatus message indicating the result of the operation
dataCart ObjectCart data with all items
sourceStringSource of the data (e.g., "db" for database)

Cart Object

FieldTypeDescription
idStringUnique identifier for the cart
storeIdStringStore ID associated with the cart
customerIdStringCustomer's unique identifier
totalAmountNumberTotal amount payable for all items (in paise)
itemsArray[Item]List of all items currently in the cart

Item Object

FieldTypeDescription
variantIdStringUnique identifier for the product variant
quantityNumberNumber of units added to cart
priceNumberPrice per unit (in paise)
titleStringProduct title with variant details
descriptionStringDetailed product description
brandNameStringBrand name of the product
skuStringStock keeping unit identifier
imagesArray[Image]Product variant images
optionOptionsVariant-specific attributes and specs

Image Object

FieldTypeDescription
positionNumberDisplay order of the image
urlStringPresigned S3 URL of the image

Options Object

FieldTypeDescription
typeStringType of options (e.g., "custom")
dataOptionDataAttribute details for the variant

OptionData

FieldTypeDescription
sizeSize AttributeSize-related attributes
colorColor AttributeColor-related attributes

Size Attribute

FieldTypeDescription
nameStringAttribute name (e.g., "footwearSize")
brandStringBrand-specific naming (e.g., "default")
valueArray[Size Value]Array of available size values
genderStringGender specification (e.g., "male")
displayNameStringUser-friendly display name

Size Value

FieldTypeDescription
idStringUnique size identifier
widthStringSize width category (e.g., "narrow", "regular", "wide")
numericCMStringSize measurement in centimeters
numericEUStringEuropean shoe size standard
numericUKStringUK shoe size standard
displayNameStringDisplay label combining size and width (e.g., "UK 5.0 | Narrow")

Color Attribute

FieldTypeDescription
valueStringColor code value
hexCodeStringHexadecimal color code
displayNameStringUser-friendly color name