Create Cart
Create a new cart for a customer with optional initial items, prescription context, and discount codes. Returns full cart context and calculated totals (placeholder logic).
Overview
- Method: POST
- Path:
/brand/cart/create-cart - Tags: brand
Use Cases
- Initialize a shopping session for a customer.
- Preload a cart with promotional or recommended items.
- Set region or currency context prior to checkout.
- Support guest checkout by creating a cart without a customer ID.
- Attach prescription and insurance context for pharmacy workflows.
- Apply welcome or partner discounts at cart initialization.
Parameters
No parameters required.
Request Body
- Content Type:
application/json - Required: Yes
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| customerId | string | No | |
| patientId | string | No | |
| channel | object | No | |
| source | string | No | |
| clinicId | string | No | |
| regionId | string | No | |
| currencyCode | string | No | |
| prescriptionId | string | No | |
| discounts | string | Yes | |
| notes | string | No | |
| metadata | record<string, object> | Yes | |
| items | array<object> | No |
items
- Type:
object
Responses
200
Successful response
Content Type: application/json
{
"cartId": "string",
"status": {},
"context": "string",
"currencyCode": "string",
"channel": "string",
"source": "string",
"clinicId": "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/create-cart \
-H "Content-Type: application/json" \
-d '{"example": "data"}'