curl --request POST \
--url https://api.henrylabs.ai/v1/cart/fetch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"cartId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'{
"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": {}
}
}Fetch the current state of a cart by its ID.
curl --request POST \
--url https://api.henrylabs.ai/v1/cart/fetch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"cartId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'{
"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": {}
}
}Unique identifier for the cart
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Was this page helpful?