Add To Cart
Add a product variant to a specific cart. Includes the cart item details such as ID, cart ID, variant ID, quantity, unit price, total price, prescription ID, customizations, and timestamp.
Overview
- Method: POST
- Path:
/brand/cart/add-to-cart - Tags: brand
Parameters
No parameters required.
Request Body
- Content Type:
application/json - Required: Yes
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| productVariantId | string | Yes | |
| quantity | number | Yes | |
| prescriptionId | string | No | |
| customizations | string | Yes |
Responses
200
Successful response
Content Type: application/json
{
"cartItemId": "string",
"cartId": "string",
"productVariantId": "string",
"quantity": 123,
"unitPrice": 123,
"totalPrice": 123,
"prescriptionId": "string",
"customizations": "string",
"added_at": "string"
}400
Bad Request
Content Type: application/json
{}401
Unauthorized
404
Not Found
500
Internal Server Error
Example Usage
curl -X POST \
https://api.pillexa.com/brand/cart/add-to-cart \
-H "Content-Type: application/json" \
-d '{"example": "data"}'