Deactivate Cart Promotion for Customer

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

This API is used to deactivate an individual customer's participation in an active campaign. It can also be used to revoke specific rewards that have been earned, by passing the earnId.

Example request

curl --location --request POST 'https://{Host}/api_gateway/v1/promotions/`{promotionId}`/deactivate?customerId=566881933&earnId=null' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1GFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=DWAI.W93CwD8Hhdi33884bJoUrRqwVps-1761979737913-0.0.1.1-604800000' \
--data ''

Prerequisites

  • Authentication: Basic or OAuth authentication.

  • Default access group

Resource information

PaginationNo
Batch supportNo

Path parameters

FieldTypeRequiredDescription
promotionIdStringYesUnique identifier for the promotion to be deactivated.

Query parameters

FieldTypeRequiredDescription
customerIdNumberYesThe unique identifier of the customer.
earnIdStringOptionalThe specific earn ID to deactivate. Required for PAYMENT_VOUCHER modes.

Example response

{
    "data": true,
    "errors": []
}

Response parameters

FieldTypeDescription
dataBooleanReturns true if the deactivation was successful.
errorsArrayA list of error objects (empty on success).

Error codes

CodeDescription
400GLOBAL.INVALID_INPUT: Required parameters are missing or invalid.
404GLOBAL.PROMOTION_NOT_FOUND: The promotion does not exist or is not active.
707PROMO.UNSUPPORTED_PROMOTION_TYPE: Cannot deactivate preferences for POS or CODE promotions.
731PROMO.EARN_ID_INVALID: The provided earnId is invalid.
736PROMO.UNSUPPORTED_PREFERENCE_CHANGE: Incorrect combination of earnId and promotion mode.
737PROMO.UNSUPPORTED_PREFERENCE_CHANGE_PENDING_CART: Cannot change status while the customer has an open cart.
500GLOBAL.UNEXPECTED_ERROR: Internal server error.
Path Params
string
required
Query Params
string
string | null
Body Params
Headers
string
Defaults to Basic Z2VvcmdlLmRvY2RlbW86NjVhMDgzYjk1MWY5MGY1NTY5NDk1YmNkNzUxYm
Response
200

Successful response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!