Revoke Earned Cart Promotion

This API is used to revoke an already earned cart promotion

Example request

curl --location 'https://{Host}/api_gateway/v1/promotions/revokeEarn' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '
{
  "customerId": 566881933,
  "earnRevokeDetails": [
    {
      "promotionId": "69117663b1cfc114606fd7fb",
      "earnIds": [
        "6911eaf1f57b486147effac0"
      ]
    },
    {
      "promotionId": "69058646b1cfc114606f7bbe",
      "earnIds": [
        "68f869d94a314550c4b46047"
      ]
    }
  ]
}
'
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions/revokeEarn' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYMGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=cc8Wgks3OrtzAV5WVi0XvYs2zw.tj0w-1762861404837-0.0.1.1-604800000' \
--data '
{
  "customerId": 566881933,
  "earnRevokeDetails": [
    {
      "promotionId": "68f9f2904a314550c4b46dc0",
      "earnIds": [
        "string"
      ]
    }
  ]
}
'

Prerequisites

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

Resource information

PaginationNo
Batch supportNo

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.

Request body parameters

Field

Type

Required

Description

customerId

Number

Yes

Specifies the unique identifier for the customer.

earnRevokeDetails

Array

Yes

Defines a list of cart promotion and earn ID details to be revoked.

..promotionId

String

Yes

Specifies the unique identifier of the cart promotion.

..earnIds

Array

Yes

Defines a list of specific earn transaction IDs to be revoked.

Maximum earnIds supported in a single request : 1000

Example : "earnIds": [ "earned_id_1A2B3C", "earned_id_4D5E6F", "earned_id_7G8H9I" ]

Example response

{
    "data": {
        "customerId": 566881933,
        "revokedDetails": [
          {
            "promotionId": "69117663b1cfc114606fd7fb",
            "revokedEarnIds": [
              "6911eaf1f57b486147effac0"
            ],
            "status": "SUCCESS"
          },
          {
            "promotionId": "69058646b1cfc114606f7bbe",
            "revokedEarnIds": [
              "68f869d94a314550c4b46047"
            ],
            "status": "SUCCESS"
          }
    T   ]
    },
    "errors": []
}

Response parameters

FieldTypeDescription
dataObjectIndicates the result of the revocation attempt.
..customerIdNumberIndicates customer ID for whom the revocation was processed.
..revokedDetailsArraySpecifies a list of objects detailing the outcome for each cart promotion.
....promotionIdStringIndicates the cart promotion ID for this specific revocation result.
....revokedEarnIdsArrayIndicates a list of earn IDs that were successfully revoked.
....statusStringIndicates status of the revocation.
errorsArraySpecifies a list of errors, if any, encountered during the request.
..codeNumberIndicates the error code.
..messageStringSpecifies a descriptive error message.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!