Post Cart Promotions Code link API

This API is used to link the code of the cart promotion earned by the customer to the customer id.

Example request

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions/code/link' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvidt2b9D_Wbvu39g2t0iystT.W9RDJ0-1751522911573-0.0.1.1-604800000; _cfuvid=DWAI.W93CwD8HSqqIDN38lKP84bJoUrRqwVps-1761979737913-0.0.1.1-604800000' \
--data '{
  "customerId": 566881933,
  "code": "DQCV73",
  "mode": "DISCOUNT"
}'

Prerequisites

  • Authentication: Basic or OAuth authentication.
  • Default access group

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.

Body parameters

FieldTypeRequiredDescription
customerIdNumberYesSpecifies the unique identifier for the customer.
codeStringYesSpecifies the promotion code to be linked.
modeStringYesSpecifies the promotion mode. Enum: DISCOUNT, PAYMENT_VOUCHER.

Example response

{
    "data": {
        "id": "68fb18d331d91c625a8d9e52",
        "orgId": 100458,
        "promotionId": "68fb18a431d91c625a8d9e51",
        "promotionName": "eratg",
        "code": "DQCV73",
        "customerId": 566881933,
        "active": true,
        "createdOn": 1761286355257,
        "createdOnISO": "2025-10-24T06:12:35Z",
        "validTill": 1763787599999,
        "validTillISO": "2025-11-22T04:59:59Z",
        "mode": "DISCOUNT",
        "redeemableFrom": 1761286355257,
        "redeemableFromISO": "2025-10-24T06:12:35Z"
    }
}

Response parameters

FieldTypeDescription
dataObjectDefines the primary response object, containing the linked promotion code details.
errorsArrayDefines a list of error objects.
..idStringSpecifies the unique identifier for this specific promotion code record.
..orgIdNumberSpecifies the Organization ID to which the code belongs.
..promotionIdStringSpecifies the unique identifier for the cart promotion that this code activates.
..promotionNameStringSpecifies the name of the cart promotion the code is linked to.
..codeStringSpecifies the cart promotion code itself.
..customerIdNumberSpecifies the Customer identifier that this code is now linked to.
..activeBooleanIndicates whether the code is currently active and available for use.
..createdOnNumberIndicates the creation timestamp in epoch milliseconds.
..createdOnISOStringSpecifies the creation timestamp in ISO 8601 format.
..validTillNumberIndicates the expiration timestamp in epoch milliseconds.
..validTillISOStringSpecifies the expiration timestamp in ISO 8601 format.
..modeStringSpecifies the promotion's operational mode.
..redeemableFromNumberIndicates the timestamp in epoch milliseconds from when the code can be first used.
..redeemableFromISOStringSpecifies the timestamp in ISO 8601 format from when the code is redeemable.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!