List Virtual Discounts
List virtual discounts applied to a specific cart.
Overview
- Method: GET
- Path:
/brand/cart/list-virtual-discount/<cartId> - Tags: brand
Use Cases
- Preview active or dynamic virtual discounts for a cart before checkout.
- Support admin review or customer review of applied promotions.
- Ensure accurate discount data for pricing calculations and reporting.
- Facilitate dynamic pricing adjustments without altering actual cart totals until checkout.
Parameters
cartId (path)
- Type:
string - Required: Yes
- Description: cartId parameter
Request Body
No request body required.
Responses
200
Successful response
Content Type: application/json
{
"virtualDiscounts": "string",
"code": "string",
"type": "string",
"value": 123,
"is_dynamic": true,
"is_disabled": true,
"starts_at": "2024-01-01T00:00:00.000Z",
"ends_at": "2024-01-01T00:00:00.000Z",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z",
"metadata": "string"
}400
Bad Request
Content Type: application/json
{
"error": "string",
"details": [
{}
]
}401
Unauthorized
404
Not Found
500
Internal Server Error
Example Usage
curl -X GET \
https://api.pillexa.com/brand/cart/list-virtual-discount/<cartId> \
-H "Content-Type: application/json" \