DocsAPI ReferenceCart/api/v1/cart/buy
postCartPublic API v1

/api/v1/cart/buy

Adds a product (optionally a specific variant) to the cart. If the product already exists in the cart, its quantity is increased.

cartpostApiV1CartBuy

Parameters

1 query · 5 body

6 total
Query · 1
apiKeystringRequired

Your BizKitHub API key (passed as GET parameter).

Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more

Body · 5
cartIdstringRequired
identityIdstring

Use customer identity cookies value when is logged in.

quantitynumber
productCodestringRequired
productVariantCodestring

Request

POST /api/v1/cart/buy

post
curl -X POST "https://api.bizkithub.com/api/v1/cart/buy?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "cartId": "b411056d304d9y6mHe2SoMFBL2Apxfnb",
  "identityId": "9jq49ZE1xoKI7S5ys4J0a70y3Xp2hQqc",
  "quantity": 2,
  "productCode": "coca-cola",
  "productVariantCode": "coca-cola-zero"
}'

Response

JSON payload

{
  "success": true
}

All response codes

1 status code documented

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key