Get Pending Carts Details (Cart Promotion)

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

PaginationNo
Batch supportNo

Path parameters

FieldTypeRequiredDescription
customerIdStringYesUnique 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

FieldTypeDescription
dataObjectDefines the main container for the response data.
.tempRedemptionDetailsArrayIndicates the list of pending redemption details for the customer's cart.
..cartEvaluationIdStringIndicates the unique identifier for the specific cart evaluation session.
..startTimeNumber

Indicates the date and time when the evaluation or lock started.

Time format: Epoch milliseconds.

Note: This field returns an epoch milliseconds timestamp.

..validTillTimeNumber

Indicates when the pending evaluation/redemption expires.

Time format: Epoch milliseconds.

Note: This field returns an epoch milliseconds timestamp.

..appliedPromotionsArrayIndicates the list of promotions applied during this evaluation.
...promotionIdStringIndicates the unique system identifier for the promotion.
...promoCodeStringSpecifies the coupon code used to trigger the promotion.
...promotionNameStringName of the promotion.
...redemptionCountNumberIndicates the number of times this promotion was applied or redeemed in this evaluation.
...discountStringIndicates the calculated discount amount for this promotion.

Error codes

CodeDescription
400Invalid request. Check required parameters. Ensure all required parameters, including a valid customerId, are provided and valid.
404Customer or pending cart evaluation not found. Use a valid and existing customerId and evaluation data.
707The passed promotion type is not supported. Change the promotion type to one supported by the system.
116Maximum pending open carts exceeded. Reduce the number of open carts for this customer.
120Pending cart not found for the cart evaluation. Check if there is an active pending cart to evaluate.
500Internal server error. Retry the request after a short delay, and contact support if the error persists.

Query Params
string
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json