Get cart by customer ID
Returns the most recently updated active cart of the customer. When there is none the response is 200 with an empty body (null), not 404.
AuthorizationBearer <token>
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Path Parameters
customerIdstring
Customer ID
curl -X GET "https://api.brainerce.com/api/v1/cart/customer/string"{
"id": "clx1a2b3c4d5e6f7g8h9",
"sessionToken": "cs_7d9f2a1b3c4e5f60",
"customerId": "clx1a2b3c4d5e6f7g8h9",
"status": "ACTIVE",
"currency": "USD",
"notes": "Leave at the door",
"analyticsClientId": "clx1a2b3c4d5e6f7g8h9",
"analyticsSessionId": "clx1a2b3c4d5e6f7g8h9",
"subtotal": "59.80",
"discountAmount": "5.00",
"ruleDiscountAmount": "5.00",
"promoDiscountTotal": "0.00",
"couponCode": "WELCOME10",
"appliedDiscounts": [
{
"ruleId": "clx1a2b3c4d5e6f7g8h9",
"ruleName": "Summer sale",
"type": "ORDER_DISCOUNT",
"discountAmount": "10.00",
"description": "10% off orders over 200"
}
],
"nudges": [
{
"ruleId": "clx1a2b3c4d5e6f7g8h9",
"text": "Add 20.00 more for free shipping",
"type": "AMOUNT_NEEDED",
"amountNeeded": "20.00",
"quantityNeeded": 1
}
],
"items": [
{
"id": "clx1a2b3c4d5e6f7g8h9",
"productId": "clx1a2b3c4d5e6f7g8h9",
"variantId": "clx1a2b3c4d5e6f7g8h9",
"quantity": 2,
"unitPrice": "29.90",
"currentUnitPrice": "31.90",
"priceChanged": true,
"priceDelta": "2.00",
"priceDirection": "increased",
"isAvailable": true,
"unavailableReason": "PRODUCT_DRAFT",
"discountAmount": "0.00",
"promoDiscountAmount": "0.00",
"promoSource": "BUNDLE",
"promoSourceId": "clx1a2b3c4d5e6f7g8h9",
"notes": "Gift wrap please",
"metadata": {},
"customizations": {},
"product": {
"id": "clx1a2b3c4d5e6f7g8h9",
"name": "Classic T-Shirt",
"sku": "TSHIRT-BLK-M",
"images": [
{}
]
},
"variant": {
"id": "clx1a2b3c4d5e6f7g8h9",
"name": "Black / M",
"sku": "TSHIRT-BLK-M",
"image": {
"url": "string",
"alt": "string"
}
},
"modifiers": [
{
"modifierId": "clx1a2b3c4d5e6f7g8h9",
"modifierGroupId": "clx1a2b3c4d5e6f7g8h9",
"name": "Extra cheese",
"priceDelta": "5.00",
"freeApplied": true,
"effectivePrice": "5.00",
"positionInGroup": 0
}
],
"modifiersTotal": "5.00",
"parentCartItemId": "clx1a2b3c4d5e6f7g8h9",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"itemCount": 2,
"hasPriceChanges": true,
"hasUnavailableItems": true,
"unavailableItemIds": [
"string"
],
"expiresAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"reservation": {
"hasReservation": true,
"expiresAt": "2019-08-24T14:15:22Z",
"remainingSeconds": 540,
"strategy": "ON_PAYMENT",
"countdownMessage": "Your items are reserved for 9 minutes"
},
"recommendations": {
"recommendations": [
{
"id": "string",
"name": "string",
"slug": "string",
"basePrice": "string",
"salePrice": "string",
"images": [
{
"url": "string",
"alt": "string"
}
],
"type": "SIMPLE",
"inventory": {
"total": 0,
"available": 0,
"trackingMode": "TRACKED",
"inStock": true,
"canPurchase": true
},
"relationType": "string",
"targetVariantId": "string",
"requiresVariantSelection": true,
"pinnedVariant": {
"id": "string",
"name": "string",
"attributes": {}
},
"variants": [
{
"id": "string",
"name": "string",
"attributes": {},
"image": {
"url": "string",
"alt": "string"
},
"price": "string",
"salePrice": "string"
}
]
}
]
},
"upgrades": {
"upgrades": {}
},
"bundles": {
"bundles": [
{
"id": "string",
"name": "string",
"description": "string",
"triggerProductId": "string",
"productIds": [
"string"
],
"offeredProducts": [
{
"id": "string",
"name": "string",
"slug": "string",
"basePrice": "string",
"salePrice": "string",
"images": [
{
"url": "string",
"alt": "string"
}
],
"type": "SIMPLE",
"variantId": "string",
"requiresVariantSelection": true,
"pinnedVariant": {
"id": "string",
"name": "string",
"attributes": {}
},
"variants": [
{
"id": "string",
"name": "string",
"attributes": {},
"image": {
"url": "string",
"alt": "string"
},
"price": "string",
"salePrice": "string"
}
],
"originalPrice": "string",
"discountedPrice": "string"
}
],
"discountType": "PERCENTAGE",
"discountValue": "string",
"totalOriginalPrice": "string",
"totalDiscountedPrice": "string"
}
]
}
}{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/cart/customer/{customerId}"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/cart/customer/{customerId}"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}