curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/carts/{id}/items' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"quantity": 2,
"variant_id": "660e8400-e29b-41d4-a716-446655440001"
}'
{
"data": {
"created_at": "2024-12-09T10:30:00Z",
"currency": "USD",
"discount_total": "15.00",
"expires_at": "2024-12-16T10:30:00Z",
"id": "770e8400-e29b-41d4-a716-446655440000",
"shipping_total": "9.99",
"status": "active",
"subtotal": "149.98",
"tax_total": "12.00",
"total": "156.97",
"updated_at": "2024-12-09T11:45:00Z"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Add item to cart
Add item to cart
POST
/
api
/
v1
/
carts
/
{id}
/
items
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/carts/{id}/items' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"quantity": 2,
"variant_id": "660e8400-e29b-41d4-a716-446655440001"
}'
{
"data": {
"created_at": "2024-12-09T10:30:00Z",
"currency": "USD",
"discount_total": "15.00",
"expires_at": "2024-12-16T10:30:00Z",
"id": "770e8400-e29b-41d4-a716-446655440000",
"shipping_total": "9.99",
"status": "active",
"subtotal": "149.98",
"tax_total": "12.00",
"total": "156.97",
"updated_at": "2024-12-09T11:45:00Z"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Path parameters
string (uuid)
required
Cart ID
Request body
AddItemRequest
integer (int32)
required
Quantity to add (minimum 1)
string (uuid)
required
Product variant UUID to add
Response
ApiResponse_CartResponse
object
Show data
Show data
string (date-time)
required
Cart creation timestamp
string
required
Currency code (ISO 4217)
string
required
Total discount amount
string (date-time)
required
Cart expiration timestamp
string (uuid)
required
Cart UUID
string
required
Total shipping cost
CartStatus
required
Cart status (active, abandoned, converted, expired)
string
required
Subtotal before tax, shipping, and discounts
string
required
Total tax amount
string
required
Final total (subtotal + tax + shipping - discounts)
string (date-time)
required
Last update timestamp
array,null
string,null
boolean
required
Status codes
| Code | Meaning |
|---|---|
200 | Item added |
404 | Cart not found |
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/carts/{id}/items' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"quantity": 2,
"variant_id": "660e8400-e29b-41d4-a716-446655440001"
}'
{
"data": {
"created_at": "2024-12-09T10:30:00Z",
"currency": "USD",
"discount_total": "15.00",
"expires_at": "2024-12-16T10:30:00Z",
"id": "770e8400-e29b-41d4-a716-446655440000",
"shipping_total": "9.99",
"status": "active",
"subtotal": "149.98",
"tax_total": "12.00",
"total": "156.97",
"updated_at": "2024-12-09T11:45:00Z"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Last modified on August 31, 2026