• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
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_id
string

Required

The ID of the loyalty promotion to cancel. You can cancel a promotion that has an ACTIVE or SCHEDULED status.

program_id
string

Required

The ID of the base loyalty program.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

loyalty_promotion
LoyaltyPromotion

The canceled loyalty promotion.

Examples

You are viewing an old version of the API
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: 2022-09-21' \
  -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"
    },
    "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"
  }
}