This API retrieves the details of pending cart evaluations for a specific customer. These are carts where promotions have been temporarily reserved for the customer, but the transaction has not yet been completed for the promotion to be redeemed.
Cart locking functionality during cart evaluation, which temporarily reserves the applied promotion exclusively for the customer, is disabled by default. To enable it, you must raise a support ticket with capillary to activate the isLockingEnabled configuration for the particular org.
Example request
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions/customer/566881933/evaluations/pending_carts' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86NjVhWY5MGY1NTY5NDk1YmNkNzUxYmJiY2U=' \
--header 'Cookie: _cfuvid=OgMlxpnYcUTaLvDRPsarD3khviE1Jl3t9uS8-1764069327097-0.0.1.1-604800000'Prerequisites
-
Authentication: Basic or OAuth authentication.
-
Default access group
Resource information
| Pagination | No |
| Batch support | No |
Rate limit
-
Demo and Testing Clusters: 1,000 requests per minute per API key
-
Other Organizations: The rate limit is brand-specific.
To modify the limit, create a ticket with the Capillary Product support team.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| customerId | String | Yes | Unique identifier of the customer whose pending evaluations are being retrieved. |
Example response
{
"data": {
"tempRedemptionDetails": [
{
"cartEvaluationId": "69258fc119bec5537d95b07d",
"startTime": 1764069313846,
"validTillTime": 1764069613949,
"appliedPromotions": [
{
"promotionId": "6914307779e37261fe5d506e",
"promoCode": "BB6N0G",
"promotionName": "code linked 3",
"redemptionCount": 1,
"discount": "12.0"
},
{
"promotionId": "690af07dcd583924435946f6",
"promotionName": "Cart Promotion (OPEN TO ALL)",
"redemptionCount": 1,
"discount": "10.0"
},
{
"promotionId": "6914303f79e37261fe5d506d",
"promotionName": "code link 2",
"redemptionCount": 1,
"discount": "12.0"
}
]
}
]
}
}Response parameters
Field | Type | Description |
|---|---|---|
data | Object | Defines the main container for the response data. |
.tempRedemptionDetails | Array | Indicates the list of pending redemption details for the customer's cart. |
..cartEvaluationId | String | Indicates the unique identifier for the specific cart evaluation session. |
..startTime | Number | Indicates the date and time when the evaluation or lock started in UTC. |
..validTillTime | Number | Indicates when the pending evaluation/redemption expires in UTC. |
..appliedPromotions | Array | Indicates the list of promotions applied during this evaluation. |
...promotionId | String | Indicates the unique system identifier for the promotion. |
...promoCode | String | Specifies the coupon code used to trigger the promotion. |
...promotionName | String | Name of the promotion. |
...redemptionCount | Number | Indicates the number of times this promotion was applied or redeemed in this evaluation. |
...discount | String | Indicates the calculated discount amount for this promotion. |
Error codes
| Code | Description |
|---|---|
| 400 | Invalid request. Check required parameters. Ensure all required parameters, including a valid customerId, are provided and valid. |
| 404 | Customer or pending cart evaluation not found. Use a valid and existing customerId and evaluation data. |
| 707 | The passed promotion type is not supported. Change the promotion type to one supported by the system. |
| 116 | Maximum pending open carts exceeded. Reduce the number of open carts for this customer. |
| 120 | Pending cart not found for the cart evaluation. Check if there is an active pending cart to evaluate. |
| 500 | Internal server error. Retry the request after a short delay, and contact support if the error persists. |
