Skip to content
Wazapin
Esc
navigateopen⌘Jpreview

POST /v1/public/storefronts/{slug}/cart

POST/v1/public/storefronts/{slug}/cart
Path parameters
slugstringrequired
Query parameters
cart_idstring
Optional existing cart id; omit to create
Request body
requiredapplication/json
customer_phonestring
itemsStorefrontCartStoredLine[] | nullrequired
Show properties
Array of StorefrontCartStoredLine
product_slugstringrequired
quantityinteger<int32>required
selected_optionsobject
variant_idstring
Responses
200OK
cart_idstringrequired
expires_atstring<date-time>required
itemsStorefrontCartLineView[] | nullrequired
Show properties
Array of StorefrontCartLineView
image_urlstring
item_keystringrequired
line_subtotal_amountinteger<int64>required
price_amountinteger<int64>required
product_idstringrequired
product_slugstringrequired
quantityinteger<int32>required
selected_option_labelsstring[] | null
selected_optionsobject
titlestringrequired
variant_idstring
variant_titlestring
subtotal_amountinteger<int64>required
total_quantityinteger<int32>required
defaultError
errorErrorBodyrequired
Show properties
codestringrequired
detailsErrorDetail[] | null
Show properties
Array of ErrorDetail
codestring
fieldstring
locationstring
messagestringrequired
messagestringrequired
request_idstring
Request
curl -X POST "/v1/public/storefronts/string/cart" \
  -H "Content-Type: application/json" \
  -d '{
  "customer_phone": "string",
  "items": [
    {
      "product_slug": "string",
      "quantity": 0,
      "selected_options": {},
      "variant_id": "string"
    }
  ]
}'
Response
{
  "cart_id": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "items": [
    {
      "image_url": "string",
      "item_key": "string",
      "line_subtotal_amount": 0,
      "price_amount": 0,
      "product_id": "string",
      "product_slug": "string",
      "quantity": 0,
      "selected_option_labels": [
        "string"
      ],
      "selected_options": {},
      "title": "string",
      "variant_id": "string",
      "variant_title": "string"
    }
  ],
  "subtotal_amount": 0,
  "total_quantity": 0
}