Apply Discount
Apply a discount code to a specific cart. Includes full cart details after applying the discount, such as items, variants, shipping, billing, discounts, customer info, totals, and marketing channel.
Overview
- Method: POST
- Path:
/brand/cart/apply-discount/<cartId> - Tags: brand
Use Cases
- Apply a valid discount code during checkout or cart review.
- Update cart totals, discounts, and virtual promotions dynamically.
- Track marketing channels and associate referral codes if applicable.
- Ensure accurate pricing, taxes, and promotional adjustments before order completion.
Parameters
No parameters required.
Request Body
No request body required.
Responses
200
Successful response
Content Type: application/json
{}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/apply-discount/<cartId> \
-H "Content-Type: application/json" \