Brand
Cart
Add To Cart

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

FieldTypeRequiredDetails
productVariantIdstringYes
quantitynumberYes
prescriptionIdstringNo
customizationsstringYes

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"}'