Skip to main content
POST
/
cart
/
create
Cart Create
curl --request POST \
  --url https://api.henrylabs.ai/v1/cart/create \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "items": [
    {
      "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",
      "quantity": 2,
      "variant": {
        "size": "10",
        "color": "Black"
      },
      "metadata": {
        "creatorSource": "Frank Herbert"
      }
    }
  ],
  "settings": {
    "options": {
      "allowPartialPurchase": true,
      "collectBuyerEmail": "required",
      "collectBuyerAddress": "optional",
      "collectBuyerPhone": "off"
    },
    "commissionFeeFixed": {
      "value": 1.99,
      "currency": "USD"
    },
    "commissionFeePercent": 10,
    "events": []
  }
}
'
{
  "success": true,
  "status": "<string>",
  "message": "<string>",
  "data": {
    "cartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "checkoutUrl": "<string>",
    "data": {
      "items": [
        {
          "link": "<string>",
          "quantity": 1,
          "variant": "select the black shoe (ID: 4639822147), size M 10",
          "shippingOption": {
            "id": "<string>",
            "value": "<string>"
          },
          "coupons": [
            "<string>"
          ],
          "metadata": {}
        }
      ],
      "settings": {
        "options": {
          "allowPartialPurchase": true,
          "collectBuyerEmail": "off",
          "collectBuyerAddress": "off",
          "collectBuyerPhone": "off"
        },
        "commissionFeeFixed": {
          "value": 1,
          "currency": "USD"
        },
        "commissionFeePercent": 50,
        "events": [
          {
            "type": "order",
            "data": [
              {
                "type": "<string>",
                "points": 123
              }
            ],
            "conditional": {
              "type": "<string>",
              "operator": "equals",
              "value": "<string>"
            }
          }
        ]
      }
    },
    "metadata": {}
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
items
object[]
required

Items to include in the cart

Minimum array length: 1
settings
object

Response

Cart created successfully

success
boolean
required
status
string
required
message
string
required
data
object
required