Cancel loyalty promotion
POST
/v2/loyalty/programs/{program_id}/promotions/{promotion_id}/cancel
Cancels a loyalty promotion.
Use this endpoint to cancel an ACTIVE
promotion earlier than the
end date, cancel an ACTIVE
promotion when an end date is not specified, or cancel a SCHEDULED
promotion.
Because updating a promotion is not supported, you can also use this endpoint to cancel a promotion before
you create a new one.
This endpoint sets the loyalty promotion to the CANCELED
state
Name | Description |
---|---|
promotion_
Required
|
The ID of the loyalty promotion to cancel. You can cancel a
promotion that has an |
program_
Required
|
The ID of the base loyalty program. |
Response Fields
Name | Description |
---|---|
errors
|
Any errors that occurred during the request. |
loyalty_
|
The canceled loyalty promotion. |
Examples
POST
/v2/loyalty/programs/{program_id}/promotions/{promotion_id}/cancel
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/loyalty/programs/d619f755-2d17-41f3-990d-c04ecedd64dd/promotions/loypromo_f0f9b849-725e-378d-b810-511237e07b67/cancel \
-X POST \
-H 'Square-Version: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Response JSON
{
"loyalty_promotion": {
"id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67",
"name": "Tuesday Happy Hour Promo",
"incentive": {
"type": "POINTS_MULTIPLIER",
"points_multiplier_data": {
"points_multiplier": 3
}
},
"available_time": {
"start_date": "2022-08-16",
"time_periods": [
"BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ=WEEKLY;BYDAY=TU\nEND:VEVENT"
]
},
"trigger_limit": {
"times": 1,
"interval": "DAY"
},
"minimum_spend_amount_money": {
"currency": "USD",
"amount": 2000
},
"qualifying_category_ids": [
"XTQPYLR3IIU9C44VRCB3XD12"
],
"status": "CANCELED",
"created_at": "2022-08-16T08:38:54Z",
"canceled_at": "2022-08-17T12:42:49Z",
"updated_at": "2022-08-17T12:42:49Z",
"loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd"
}
}