Square: Loyalty schemas
76 Square schemas with complete fields and constraints.
← Loyalty operations · All schemas
Accumulate Loyalty Points — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an [AccumulateLoyaltyPoints](api-endpoint:Loyalty-AccumulateLoyaltyPoints) request. |
accumulate_points | Model | Required within parent | Expand Accumulate Loyalty Points — request body — body accumulate points The points to add to the account. If you are using the Orders API to manage orders, specify the order ID. Otherwise, specify the points to add. |
idempotency_key | string | Required within parent | A unique string that identifies the `AccumulateLoyaltyPoints` request. Keys can be any valid string but must be unique for every request. Maximum length: 128 Minimum length: 1 |
location_id | string | Required within parent | The [location](entity:Location) where the purchase was made. |
Referenced models: Accumulate Loyalty Points — request body — body accumulate points
Accumulate Loyalty Points — request body — body accumulate points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `ACCUMULATE_POINTS`. |
loyalty_program_id | string | Optional | The ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Read only: true |
order_id | JSON | Optional | |
order_id (anyOf 1) | string | Alternative | The ID of the [order](entity:Order) for which the buyer accumulated the points. This field is returned only if the Orders API is used to process orders. |
order_id (anyOf 2) | null | Alternative | |
points | JSON | Optional | |
points (anyOf 1) | integer | Alternative | The number of points accumulated by the event. Minimum: 1 |
points (anyOf 2) | null | Alternative |
Accumulate Loyalty Points — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an [AccumulateLoyaltyPoints](api-endpoint:Loyalty-AccumulateLoyaltyPoints) response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
event | Model | Optional | Expand Adjust Loyalty Points — response body — event The resulting loyalty event. Starting in Square version 2022-08-17, this field is no longer returned. |
events | array | Optional | The resulting loyalty events. If the purchase qualifies for points, the `ACCUMULATE_POINTS` event is always included. When using the Orders API, the `ACCUMULATE_PROMOTION_POINTS` event is included if the purchase also qualifies for a loyalty promotion. |
events[] | Model | Each item | Expand Adjust Loyalty Points — response body — event |
Referenced models: Get Shift — response body — errors item, Adjust Loyalty Points — response body — event
Adjust Loyalty Points — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an [AdjustLoyaltyPoints](api-endpoint:Loyalty-AdjustLoyaltyPoints) request. |
adjust_points | Model | Required within parent | Expand Adjust Loyalty Points — request body — body adjust points The points to add or subtract and the reason for the adjustment. To add points, specify a positive integer. To subtract points, specify a negative integer. |
allow_negative_balance | JSON | Optional | |
allow_negative_balance (anyOf 1) | boolean | Alternative | Indicates whether to allow a negative adjustment to result in a negative balance. If `true`, a negative balance is allowed when subtracting points. If `false`, Square returns a `BAD_REQUEST` error when subtracting the specified number of points would result in a negative balance. The default value is `false`. |
allow_negative_balance (anyOf 2) | null | Alternative | |
idempotency_key | string | Required within parent | A unique string that identifies this `AdjustLoyaltyPoints` request. Keys can be any valid string, but must be unique for every request. Maximum length: 128 Minimum length: 1 |
Referenced models: Adjust Loyalty Points — request body — body adjust points
Adjust Loyalty Points — request body — body adjust points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `ADJUST_POINTS`. |
loyalty_program_id | string | Optional | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Read only: true |
points | integer | Required within parent | The number of points added or removed. |
reason | JSON | Optional | |
reason (anyOf 1) | string | Alternative | The reason for the adjustment of points. Maximum length: 3500 |
reason (anyOf 2) | null | Alternative |
Adjust Loyalty Points — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an [AdjustLoyaltyPoints](api-endpoint:Loyalty-AdjustLoyaltyPoints) request. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
event | Model | Optional | Expand Adjust Loyalty Points — response body — event The resulting event data for the adjustment. |
Referenced models: Get Shift — response body — errors item, Adjust Loyalty Points — response body — event
Adjust Loyalty Points — response body — event
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides information about a loyalty event. For more information, see [Search for Balance-Changing Loyalty Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events). |
accumulate_points | Model | Optional | Expand Adjust Loyalty Points — response body — event accumulate points Provides metadata when the event `type` is `ACCUMULATE_POINTS`. Read only: true |
accumulate_promotion_points | Model | Optional | Expand Adjust Loyalty Points — response body — event accumulate promotion points Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. Read only: true |
adjust_points | Model | Optional | Expand Adjust Loyalty Points — response body — event adjust points Provides metadata when the event `type` is `ADJUST_POINTS`. Read only: true |
create_reward | Model | Optional | Expand Adjust Loyalty Points — response body — event create reward Provides metadata when the event `type` is `CREATE_REWARD`. Read only: true |
created_at | string | Required within parent | The timestamp when the event was created, in RFC 3339 format. Minimum length: 1 Read only: true |
delete_reward | Model | Optional | Expand Adjust Loyalty Points — response body — event delete reward Provides metadata when the event `type` is `DELETE_REWARD`. Read only: true |
expire_points | Model | Optional | Expand Adjust Loyalty Points — response body — event expire points Provides metadata when the event `type` is `EXPIRE_POINTS`. Read only: true |
id | string | Required within parent | The Square-assigned ID of the loyalty event. Minimum length: 1 Read only: true |
location_id | string | Optional | The ID of the [location](entity:Location) where the event occurred. Read only: true |
loyalty_account_id | string | Required within parent | The ID of the [loyalty account](entity:LoyaltyAccount) associated with the event. Maximum length: 36 Minimum length: 1 Read only: true |
other_event | Model | Optional | Expand Adjust Loyalty Points — response body — event other event Provides metadata when the event `type` is `OTHER`. Read only: true |
redeem_reward | Model | Optional | Expand Adjust Loyalty Points — response body — event redeem reward Provides metadata when the event `type` is `REDEEM_REWARD`. Read only: true |
source | string | Required within parent | Defines whether the event was generated by the Square Point of Sale. Defines whether the event was generated by the Square Point of Sale. See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values Known values: SQUARE, LOYALTY_API Read only: true |
type | string | Required within parent | The type of the loyalty event. The type of the loyalty event. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values Known values: ACCUMULATE_POINTS, CREATE_REWARD, REDEEM_REWARD, DELETE_REWARD, ADJUST_POINTS, EXPIRE_POINTS, OTHER, ACCUMULATE_PROMOTION_POINTS Read only: true |
Referenced models: Adjust Loyalty Points — response body — event redeem reward, Adjust Loyalty Points — response body — event accumulate points, Adjust Loyalty Points — response body — event accumulate promotion points, Adjust Loyalty Points — response body — event adjust points, Adjust Loyalty Points — response body — event create reward, Adjust Loyalty Points — response body — event delete reward, Adjust Loyalty Points — response body — event expire points, Adjust Loyalty Points — response body — event other event
Adjust Loyalty Points — response body — event accumulate points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `ACCUMULATE_POINTS`. |
loyalty_program_id | string | Optional | The ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Read only: true |
order_id | JSON | Optional | |
order_id (anyOf 1) | string | Alternative | The ID of the [order](entity:Order) for which the buyer accumulated the points. This field is returned only if the Orders API is used to process orders. |
order_id (anyOf 2) | null | Alternative | |
points | JSON | Optional | |
points (anyOf 1) | JSON | Alternative | |
points (anyOf 1) (anyOf 1) | integer | Alternative | The number of points accumulated by the event. Minimum: 1 |
points (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
points (anyOf 2) | null | Alternative |
Adjust Loyalty Points — response body — event accumulate promotion points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. |
loyalty_program_id | string | Optional | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Read only: true |
loyalty_promotion_id | string | Optional | The Square-assigned ID of the [loyalty promotion](entity:LoyaltyPromotion). Maximum length: 255 Minimum length: 1 Read only: true |
order_id | string | Required within parent | The ID of the [order](entity:Order) for which the buyer earned the promotion points. Only applications that use the Orders API to process orders can trigger this event. Minimum length: 1 Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The number of points earned by the event. Read only: true |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Adjust Loyalty Points — response body — event adjust points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `ADJUST_POINTS`. |
loyalty_program_id | string | Optional | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The number of points added or removed. |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
reason | JSON | Optional | |
reason (anyOf 1) | string | Alternative | The reason for the adjustment of points. Maximum length: 3500 |
reason (anyOf 2) | null | Alternative |
Adjust Loyalty Points — response body — event create reward
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `CREATE_REWARD`. |
loyalty_program_id | string | Required within parent | The ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Minimum length: 1 Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The loyalty points used to create the reward. Read only: true |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
reward_id | string | Optional | The Square-assigned ID of the created [loyalty reward](entity:LoyaltyReward). This field is returned only if the event source is `LOYALTY_API`. Maximum length: 36 Read only: true |
Adjust Loyalty Points — response body — event delete reward
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `DELETE_REWARD`. |
loyalty_program_id | string | Required within parent | The ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Minimum length: 1 Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The number of points returned to the loyalty account. Read only: true |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
reward_id | string | Optional | The ID of the deleted [loyalty reward](entity:LoyaltyReward). This field is returned only if the event source is `LOYALTY_API`. Maximum length: 36 Read only: true |
Adjust Loyalty Points — response body — event expire points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `EXPIRE_POINTS`. |
loyalty_program_id | string | Required within parent | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Minimum length: 1 Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The number of points expired. |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Adjust Loyalty Points — response body — event other event
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `OTHER`. |
loyalty_program_id | string | Required within parent | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Minimum length: 1 Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The number of points added or removed. |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Adjust Loyalty Points — response body — event redeem reward
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides metadata when the event `type` is `REDEEM_REWARD`. |
loyalty_program_id | string | Required within parent | The ID of the [loyalty program](entity:LoyaltyProgram). Maximum length: 36 Minimum length: 1 Read only: true |
order_id | string | Optional | The ID of the [order](entity:Order) that redeemed the reward. This field is returned only if the Orders API is used to process orders. Read only: true |
reward_id | string | Optional | The ID of the redeemed [loyalty reward](entity:LoyaltyReward). This field is returned only if the event source is `LOYALTY_API`. Maximum length: 36 Read only: true |
Calculate Loyalty Points — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [CalculateLoyaltyPoints](api-endpoint:Loyalty-CalculateLoyaltyPoints) request. |
loyalty_account_id | JSON | Optional | |
loyalty_account_id (anyOf 1) | string | Alternative | The ID of the target [loyalty account](entity:LoyaltyAccount). Optionally specify this field if your application uses the Orders API to process orders. If specified, the `promotion_points` field in the response shows the number of points the buyer would earn from the purchase. In this case, Square uses the account ID to determine whether the promotion's `trigger_limit` (the maximum number of times that a buyer can trigger the promotion) has been reached. If not specified, the `promotion_points` field shows the number of points the purchase qualifies for regardless of the trigger limit. Maximum length: 36 Minimum length: 1 |
loyalty_account_id (anyOf 2) | null | Alternative | |
order_id | JSON | Optional | |
order_id (anyOf 1) | string | Alternative | The [order](entity:Order) ID for which to calculate the points. Specify this field if your application uses the Orders API to process orders. Otherwise, specify the `transaction_amount_money`. |
order_id (anyOf 2) | null | Alternative | |
transaction_amount_money | JSON | Optional | |
transaction_amount_money (anyOf 1) | Model | Alternative | Expand Create Payment — request body — body tip money The purchase amount for which to calculate the points. Specify this field if your application does not use the Orders API to process orders. Otherwise, specify the `order_id`. |
transaction_amount_money (anyOf 2) | null | Alternative |
Referenced models: Create Payment — request body — body tip money
Calculate Loyalty Points — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [CalculateLoyaltyPoints](api-endpoint:Loyalty-CalculateLoyaltyPoints) response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
points | JSON | Optional | |
points (anyOf 1) | integer | Alternative | The number of points that the buyer can earn from the base loyalty program. |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
promotion_points | JSON | Optional | |
promotion_points (anyOf 1) | integer | Alternative | The number of points that the buyer can earn from a loyalty promotion. To be eligible to earn promotion points, the purchase must first qualify for program points. When `order_id` is not provided in the request, this value is always 0. |
promotion_points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Get Shift — response body — errors item
Cancel Loyalty Promotion — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [CancelLoyaltyPromotion](api-endpoint:Loyalty-CancelLoyaltyPromotion) response. Either `loyalty_promotion` or `errors` is present in the response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_promotion | Model | Optional | Expand Cancel Loyalty Promotion — response body — loyalty promotion The canceled loyalty promotion. |
Referenced models: Get Shift — response body — errors item, Cancel Loyalty Promotion — response body — loyalty promotion
Cancel Loyalty Promotion — response body — loyalty promotion
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a promotion for a [loyalty program](entity:LoyaltyProgram). Loyalty promotions enable buyers to earn extra points on top of those earned from the base program. A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` or `SCHEDULED` status. |
available_time | Model | Required within parent | Expand Cancel Loyalty Promotion — response body — loyalty promotion available time The scheduling information that defines when purchases can qualify to earn points from an `ACTIVE` promotion. |
canceled_at | string | Optional | The timestamp of when the promotion was canceled, in RFC 3339 format. Read only: true |
created_at | string | Optional | The timestamp of when the promotion was created, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID of the promotion. Maximum length: 255 Minimum length: 1 Read only: true |
incentive | Model | Required within parent | Expand Cancel Loyalty Promotion — response body — loyalty promotion incentive The points incentive for the promotion. This field defines whether promotion points are earned by multiplying base program points or by adding a specified number of points. |
loyalty_program_id | string | Optional | The ID of the [loyalty program](entity:LoyaltyProgram) associated with the promotion. Read only: true |
minimum_spend_amount_money | JSON | Optional | |
minimum_spend_amount_money (anyOf 1) | Model | Alternative | Expand Pay Order — response body — order total money The minimum purchase amount required to earn promotion points. If specified, this amount is positive. |
minimum_spend_amount_money (anyOf 2) | null | Alternative | |
name | string | Required within parent | The name of the promotion. Maximum length: 70 Minimum length: 1 |
qualifying_category_ids | JSON | Optional | |
qualifying_category_ids (anyOf 1) | array | Alternative | The IDs of any qualifying `CATEGORY` [catalog objects](entity:CatalogObject). If specified, the purchase must include at least one item from one of these categories to qualify for the promotion. This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule. With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded. You can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both. |
qualifying_category_ids (anyOf 1)[] | string | Each item | |
qualifying_category_ids (anyOf 2) | null | Alternative | |
qualifying_item_variation_ids | JSON | Optional | |
qualifying_item_variation_ids (anyOf 1) | array | Alternative | The IDs of any qualifying `ITEM_VARIATION` [catalog objects](entity:CatalogObject). If specified, the purchase must include at least one of these items to qualify for the promotion. This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule. With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded. You can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both. |
qualifying_item_variation_ids (anyOf 1)[] | string | Each item | |
qualifying_item_variation_ids (anyOf 2) | null | Alternative | |
status | string | Optional | Indicates the status of a [loyalty promotion](entity:LoyaltyPromotion). The current status of the promotion. See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for possible values Known values: ACTIVE, ENDED, CANCELED, SCHEDULED Read only: true |
trigger_limit | JSON | Optional | |
trigger_limit (anyOf 1) | Model | Alternative | Expand Cancel Loyalty Promotion — response body — loyalty promotion trigger limit interval, times The number of times a buyer can earn promotion points during a specified interval. If not specified, buyers can trigger the promotion an unlimited number of times. |
trigger_limit (anyOf 2) | null | Alternative | |
updated_at | string | Optional | The timestamp when the promotion was last updated, in RFC 3339 format. Read only: true |
Referenced models: Cancel Loyalty Promotion — response body — loyalty promotion available time, Cancel Loyalty Promotion — response body — loyalty promotion incentive, Cancel Loyalty Promotion — response body — loyalty promotion trigger limit interval, times, Pay Order — response body — order total money
Cancel Loyalty Promotion — response body — loyalty promotion available time
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents scheduling information that determines when purchases can qualify to earn points from a [loyalty promotion](entity:LoyaltyPromotion). |
end_date | string | Optional | The date that the promotion ends, in `YYYY-MM-DD` format. Square populates this field based on the provided `time_periods`. If an end date is not specified, an `ACTIVE` promotion remains available until it is canceled. Read only: true |
start_date | string | Optional | The date that the promotion starts, in `YYYY-MM-DD` format. Square populates this field based on the provided `time_periods`. Read only: true |
time_periods | array | Required within parent | A list of [iCalendar (RFC 5545) events](https://tools.ietf.org/html/rfc5545#section-3.6.1) (`VEVENT`). Each event represents an available time period per day or days of the week. A day can have a maximum of one available time period. Only `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and `DURATION` are required and timestamps must be in local (unzoned) time format. Include `RRULE` to specify recurring promotions, an end date (using the `UNTIL` keyword), or both. For more information, see [Available time](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#available-time). Note that `BEGIN:VEVENT` and `END:VEVENT` are optional in a `CreateLoyaltyPromotion` request but are always included in the response. |
time_periods[] | string | Each item |
Cancel Loyalty Promotion — response body — loyalty promotion incentive
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) are calculated, either by multiplying the points earned from the base program or by adding a specified number of points to the points earned from the base program. |
points_addition_data | JSON | Optional | |
points_addition_data (anyOf 1) | Model | Alternative | Expand Cancel Loyalty Promotion — response body — loyalty promotion incentive points addition data points addition Additional data for a `POINTS_ADDITION` incentive type. |
points_addition_data (anyOf 2) | null | Alternative | |
points_multiplier_data | JSON | Optional | |
points_multiplier_data (anyOf 1) | Model | Alternative | Expand Cancel Loyalty Promotion — response body — loyalty promotion incentive points multiplier data multiplier, points multiplier Additional data for a `POINTS_MULTIPLIER` incentive type. |
points_multiplier_data (anyOf 2) | null | Alternative | |
type | string | Required within parent | Indicates the type of points incentive for a [loyalty promotion](entity:LoyaltyPromotion), which is used to determine how buyers can earn points from the promotion. The type of points incentive. See [LoyaltyPromotionIncentiveType](#type-loyaltypromotionincentivetype) for possible values Known values: POINTS_MULTIPLIER, POINTS_ADDITION |
Referenced models: Cancel Loyalty Promotion — response body — loyalty promotion incentive points addition data points addition, Cancel Loyalty Promotion — response body — loyalty promotion incentive points multiplier data multiplier, points multiplier
Cancel Loyalty Promotion — response body — loyalty promotion incentive points addition data points addition
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion incentive](entity:LoyaltyPromotionIncentive). |
points_addition | JSON | Required within parent | |
points_addition (anyOf 1) | integer | Alternative | The number of additional points to earn each time the promotion is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program. If the purchase also qualifies for a `POINTS_ADDITION` promotion incentive with a `points_addition` of 3, the buyer earns a total of 8 points (5 program points + 3 promotion points = 8 points). Minimum: 1 |
points_addition (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Cancel Loyalty Promotion — response body — loyalty promotion incentive points multiplier data multiplier, points multiplier
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty promotion incentive](entity:LoyaltyPromotionIncentive). |
multiplier | JSON | Optional | |
multiplier (anyOf 1) | string | Alternative | The multiplier used to calculate the number of points earned each time the promotion is triggered, specified as a string representation of a decimal. Square supports multipliers up to 10x, with three point precision for decimal multipliers. For example, suppose a purchase qualifies for 4 points from the base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `multiplier` of "1.5", the buyer earns a total of 6 points (4 program points x 1.5 promotion multiplier = 6 points). Fractional points are dropped. One of the following is required when specifying a points multiplier: - (Recommended) This `multiplier` field. - The deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier` with the equivalent value. Maximum length: 5 |
multiplier (anyOf 2) | null | Alternative | |
points_multiplier | JSON | Optional | |
points_multiplier (anyOf 1) | JSON | Alternative | |
points_multiplier (anyOf 1) (anyOf 1) | integer | Alternative | The multiplier used to calculate the number of points earned each time the promotion is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier` of 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier = 15 points). DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field. One of the following is required when specifying a points multiplier: - (Recommended) The `multiplier` field. - This deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier` with the equivalent value. Maximum: 10 Minimum: 2 |
points_multiplier (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
points_multiplier (anyOf 2) | null | Alternative |
Cancel Loyalty Promotion — response body — loyalty promotion trigger limit interval, times
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the number of times a buyer can earn points during a [loyalty promotion](entity:LoyaltyPromotion). If this field is not set, buyers can trigger the promotion an unlimited number of times to earn points during the time that the promotion is available. A purchase that is disqualified from earning points because of this limit might qualify for another active promotion. |
interval | JSON | Optional | |
interval (anyOf 1) | string | Alternative | Indicates the time period that the [trigger limit](entity:LoyaltyPromotionTriggerLimit) applies to, which is used to determine the number of times a buyer can earn points for a [loyalty promotion](entity:LoyaltyPromotion). The time period the limit applies to. See [LoyaltyPromotionTriggerLimitInterval](#type-loyaltypromotiontriggerlimitinterval) for possible values Known values: ALL_TIME, DAY |
interval (anyOf 2) | null | Alternative | |
times | JSON | Required within parent | |
times (anyOf 1) | integer | Alternative | The maximum number of times a buyer can trigger the promotion during the specified `interval`. Maximum: 30 Minimum: 1 |
times (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Create Loyalty Account — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to create a new loyalty account. |
idempotency_key | string | Required within parent | A unique string that identifies this `CreateLoyaltyAccount` request. Keys can be any valid string, but must be unique for every request. Maximum length: 128 Minimum length: 1 |
loyalty_account | Model | Required within parent | Expand Create Loyalty Account — request body — body loyalty account The loyalty account to create. |
Referenced models: Create Loyalty Account — request body — body loyalty account
Create Loyalty Account — request body — body loyalty account
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). For more information, see [Create and Retrieve Loyalty Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts). |
balance | integer | Optional | The available point balance in the loyalty account. If points are scheduled to expire, they are listed in the `expiring_point_deadlines` field. Your application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange. Read only: true |
created_at | string | Optional | The timestamp when the loyalty account was created, in RFC 3339 format. Read only: true |
customer_id | JSON | Optional | |
customer_id (anyOf 1) | string | Alternative | The Square-assigned ID of the [customer](entity:Customer) that is associated with the account. |
customer_id (anyOf 2) | null | Alternative | |
enrolled_at | JSON | Optional | |
enrolled_at (anyOf 1) | string | Alternative | The timestamp when the buyer joined the loyalty program, in RFC 3339 format. This field is used to display the **Enrolled On** or **Member Since** date in first-party Square products. If this field is not set in a `CreateLoyaltyAccount` request, Square populates it after the buyer's first action on their account (when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). In first-party flows, Square populates the field when the buyer agrees to the terms of service on Square Point of Sale. If this field is set in a `CreateLoyaltyAccount` request, it is meant to be used when there is a loyalty migration from another system and into Square. In that case, the timestamp can reflect when the buyer originally enrolled in the previous system. It may represent a current or past date, but cannot be set in the future. Note: Setting this field in this scenario does not, by itself, impact the first-party enrollment flow on Square Point of Sale. |
enrolled_at (anyOf 2) | null | Alternative | |
expiring_point_deadlines | JSON | Optional | |
expiring_point_deadlines (anyOf 1) | array | Alternative | The schedule for when points expire in the loyalty account balance. This field is present only if the account has points that are scheduled to expire. The total number of points in this field equals the number of points in the `balance` field. |
expiring_point_deadlines (anyOf 1)[] | Model | Each item | Expand Create Loyalty Account — request body — body loyalty account expiring point deadlines array item |
expiring_point_deadlines (anyOf 2) | null | Alternative | |
id | string | Optional | The Square-assigned ID of the loyalty account. Maximum length: 36 Read only: true |
lifetime_points | integer | Optional | The total points accrued during the lifetime of the account. Read only: true |
mapping | JSON | Optional | |
mapping (anyOf 1) | Model | Alternative | Expand Create Loyalty Account — response body — loyalty account mapping created at, id, phone number The mapping that associates the loyalty account with a buyer. Currently, a loyalty account can only be mapped to a buyer by phone number. To create a loyalty account, you must specify the `mapping` field, with the buyer's phone number in the `phone_number` field. |
mapping (anyOf 2) | null | Alternative | |
program_id | string | Required within parent | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) to which the account belongs. Maximum length: 36 Minimum length: 1 |
updated_at | string | Optional | The timestamp when the loyalty account was last updated, in RFC 3339 format. Read only: true |
Referenced models: Create Loyalty Account — request body — body loyalty account expiring point deadlines array item, Create Loyalty Account — response body — loyalty account mapping created at, id, phone number
Create Loyalty Account — request body — body loyalty account expiring point deadlines array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a set of points for a loyalty account that are scheduled to expire on a specific date. |
expires_at | string | Required within parent | The timestamp of when the points are scheduled to expire, in RFC 3339 format. Minimum length: 1 |
points | integer | Required within parent | The number of points scheduled to expire at the `expires_at` timestamp. |
Create Loyalty Account — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes loyalty account created. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_account | Model | Optional | Expand Create Loyalty Account — response body — loyalty account The newly created loyalty account. |
Referenced models: Get Shift — response body — errors item, Create Loyalty Account — response body — loyalty account
Create Loyalty Account — response body — loyalty account
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). For more information, see [Create and Retrieve Loyalty Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts). |
balance | JSON | Optional | |
balance (anyOf 1) | integer | Alternative | The available point balance in the loyalty account. If points are scheduled to expire, they are listed in the `expiring_point_deadlines` field. Your application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange. Read only: true |
balance (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created_at | string | Optional | The timestamp when the loyalty account was created, in RFC 3339 format. Read only: true |
customer_id | JSON | Optional | |
customer_id (anyOf 1) | string | Alternative | The Square-assigned ID of the [customer](entity:Customer) that is associated with the account. |
customer_id (anyOf 2) | null | Alternative | |
enrolled_at | JSON | Optional | |
enrolled_at (anyOf 1) | string | Alternative | The timestamp when the buyer joined the loyalty program, in RFC 3339 format. This field is used to display the **Enrolled On** or **Member Since** date in first-party Square products. If this field is not set in a `CreateLoyaltyAccount` request, Square populates it after the buyer's first action on their account (when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). In first-party flows, Square populates the field when the buyer agrees to the terms of service on Square Point of Sale. If this field is set in a `CreateLoyaltyAccount` request, it is meant to be used when there is a loyalty migration from another system and into Square. In that case, the timestamp can reflect when the buyer originally enrolled in the previous system. It may represent a current or past date, but cannot be set in the future. Note: Setting this field in this scenario does not, by itself, impact the first-party enrollment flow on Square Point of Sale. |
enrolled_at (anyOf 2) | null | Alternative | |
expiring_point_deadlines | JSON | Optional | |
expiring_point_deadlines (anyOf 1) | array | Alternative | The schedule for when points expire in the loyalty account balance. This field is present only if the account has points that are scheduled to expire. The total number of points in this field equals the number of points in the `balance` field. |
expiring_point_deadlines (anyOf 1)[] | Model | Each item | Expand Create Loyalty Account — response body — loyalty account expiring point deadlines array item |
expiring_point_deadlines (anyOf 2) | null | Alternative | |
id | string | Optional | The Square-assigned ID of the loyalty account. Maximum length: 36 Read only: true |
lifetime_points | JSON | Optional | |
lifetime_points (anyOf 1) | integer | Alternative | The total points accrued during the lifetime of the account. Read only: true |
lifetime_points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
mapping | JSON | Optional | |
mapping (anyOf 1) | Model | Alternative | Expand Create Loyalty Account — response body — loyalty account mapping created at, id, phone number The mapping that associates the loyalty account with a buyer. Currently, a loyalty account can only be mapped to a buyer by phone number. To create a loyalty account, you must specify the `mapping` field, with the buyer's phone number in the `phone_number` field. |
mapping (anyOf 2) | null | Alternative | |
program_id | string | Required within parent | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) to which the account belongs. Maximum length: 36 Minimum length: 1 |
updated_at | string | Optional | The timestamp when the loyalty account was last updated, in RFC 3339 format. Read only: true |
Referenced models: Create Loyalty Account — response body — loyalty account mapping created at, id, phone number, Create Loyalty Account — response body — loyalty account expiring point deadlines array item
Create Loyalty Account — response body — loyalty account expiring point deadlines array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a set of points for a loyalty account that are scheduled to expire on a specific date. |
expires_at | string | Required within parent | The timestamp of when the points are scheduled to expire, in RFC 3339 format. Minimum length: 1 |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The number of points scheduled to expire at the `expires_at` timestamp. |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Create Loyalty Account — response body — loyalty account mapping created at, id, phone number
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the mapping that associates a loyalty account with a buyer. Currently, a loyalty account can only be mapped to a buyer by phone number. For more information, see [Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview). |
created_at | string | Optional | The timestamp when the mapping was created, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID of the mapping. Maximum length: 36 Read only: true |
phone_number | JSON | Optional | |
phone_number (anyOf 1) | string | Alternative | The phone number of the buyer, in E.164 format. For example, "+14155551111". |
phone_number (anyOf 2) | null | Alternative |
Create Loyalty Promotion — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [CreateLoyaltyPromotion](api-endpoint:Loyalty-CreateLoyaltyPromotion) request. |
idempotency_key | string | Required within parent | A unique identifier for this request, which is used to ensure idempotency. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). Maximum length: 128 Minimum length: 1 |
loyalty_promotion | Model | Required within parent | Expand Create Loyalty Promotion — request body — body loyalty promotion The loyalty promotion to create. |
Referenced models: Create Loyalty Promotion — request body — body loyalty promotion
Create Loyalty Promotion — request body — body loyalty promotion
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a promotion for a [loyalty program](entity:LoyaltyProgram). Loyalty promotions enable buyers to earn extra points on top of those earned from the base program. A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` or `SCHEDULED` status. |
available_time | Model | Required within parent | Expand Cancel Loyalty Promotion — response body — loyalty promotion available time The scheduling information that defines when purchases can qualify to earn points from an `ACTIVE` promotion. |
canceled_at | string | Optional | The timestamp of when the promotion was canceled, in RFC 3339 format. Read only: true |
created_at | string | Optional | The timestamp of when the promotion was created, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID of the promotion. Maximum length: 255 Minimum length: 1 Read only: true |
incentive | Model | Required within parent | Expand Create Loyalty Promotion — request body — body loyalty promotion incentive The points incentive for the promotion. This field defines whether promotion points are earned by multiplying base program points or by adding a specified number of points. |
loyalty_program_id | string | Optional | The ID of the [loyalty program](entity:LoyaltyProgram) associated with the promotion. Read only: true |
minimum_spend_amount_money | JSON | Optional | |
minimum_spend_amount_money (anyOf 1) | Model | Alternative | Expand Create Payment — request body — body tip money The minimum purchase amount required to earn promotion points. If specified, this amount is positive. |
minimum_spend_amount_money (anyOf 2) | null | Alternative | |
name | string | Required within parent | The name of the promotion. Maximum length: 70 Minimum length: 1 |
qualifying_category_ids | JSON | Optional | |
qualifying_category_ids (anyOf 1) | array | Alternative | The IDs of any qualifying `CATEGORY` [catalog objects](entity:CatalogObject). If specified, the purchase must include at least one item from one of these categories to qualify for the promotion. This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule. With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded. You can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both. |
qualifying_category_ids (anyOf 1)[] | string | Each item | |
qualifying_category_ids (anyOf 2) | null | Alternative | |
qualifying_item_variation_ids | JSON | Optional | |
qualifying_item_variation_ids (anyOf 1) | array | Alternative | The IDs of any qualifying `ITEM_VARIATION` [catalog objects](entity:CatalogObject). If specified, the purchase must include at least one of these items to qualify for the promotion. This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule. With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded. You can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both. |
qualifying_item_variation_ids (anyOf 1)[] | string | Each item | |
qualifying_item_variation_ids (anyOf 2) | null | Alternative | |
status | string | Optional | Indicates the status of a [loyalty promotion](entity:LoyaltyPromotion). The current status of the promotion. See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for possible values One of: ACTIVE, ENDED, CANCELED, SCHEDULED Read only: true |
trigger_limit | JSON | Optional | |
trigger_limit (anyOf 1) | Model | Alternative | Expand Create Loyalty Promotion — request body — body loyalty promotion trigger limit interval, times The number of times a buyer can earn promotion points during a specified interval. If not specified, buyers can trigger the promotion an unlimited number of times. |
trigger_limit (anyOf 2) | null | Alternative | |
updated_at | string | Optional | The timestamp when the promotion was last updated, in RFC 3339 format. Read only: true |
Referenced models: Cancel Loyalty Promotion — response body — loyalty promotion available time, Create Loyalty Promotion — request body — body loyalty promotion incentive, Create Loyalty Promotion — request body — body loyalty promotion trigger limit interval, times, Create Payment — request body — body tip money
Create Loyalty Promotion — request body — body loyalty promotion incentive
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) are calculated, either by multiplying the points earned from the base program or by adding a specified number of points to the points earned from the base program. |
points_addition_data | JSON | Optional | |
points_addition_data (anyOf 1) | Model | Alternative | Expand Create Loyalty Promotion — request body — body loyalty promotion incentive points addition data points addition Additional data for a `POINTS_ADDITION` incentive type. |
points_addition_data (anyOf 2) | null | Alternative | |
points_multiplier_data | JSON | Optional | |
points_multiplier_data (anyOf 1) | Model | Alternative | Expand Create Loyalty Promotion — request body — body loyalty promotion incentive points multiplier data multiplier, points multiplier Additional data for a `POINTS_MULTIPLIER` incentive type. |
points_multiplier_data (anyOf 2) | null | Alternative | |
type | string | Required within parent | Indicates the type of points incentive for a [loyalty promotion](entity:LoyaltyPromotion), which is used to determine how buyers can earn points from the promotion. The type of points incentive. See [LoyaltyPromotionIncentiveType](#type-loyaltypromotionincentivetype) for possible values One of: POINTS_MULTIPLIER, POINTS_ADDITION |
Referenced models: Create Loyalty Promotion — request body — body loyalty promotion incentive points addition data points addition, Create Loyalty Promotion — request body — body loyalty promotion incentive points multiplier data multiplier, points multiplier
Create Loyalty Promotion — request body — body loyalty promotion incentive points addition data points addition
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion incentive](entity:LoyaltyPromotionIncentive). |
points_addition | integer | Required within parent | The number of additional points to earn each time the promotion is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program. If the purchase also qualifies for a `POINTS_ADDITION` promotion incentive with a `points_addition` of 3, the buyer earns a total of 8 points (5 program points + 3 promotion points = 8 points). Minimum: 1 |
Create Loyalty Promotion — request body — body loyalty promotion incentive points multiplier data multiplier, points multiplier
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty promotion incentive](entity:LoyaltyPromotionIncentive). |
multiplier | JSON | Optional | |
multiplier (anyOf 1) | string | Alternative | The multiplier used to calculate the number of points earned each time the promotion is triggered, specified as a string representation of a decimal. Square supports multipliers up to 10x, with three point precision for decimal multipliers. For example, suppose a purchase qualifies for 4 points from the base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `multiplier` of "1.5", the buyer earns a total of 6 points (4 program points x 1.5 promotion multiplier = 6 points). Fractional points are dropped. One of the following is required when specifying a points multiplier: - (Recommended) This `multiplier` field. - The deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier` with the equivalent value. Maximum length: 5 |
multiplier (anyOf 2) | null | Alternative | |
points_multiplier | JSON | Optional | |
points_multiplier (anyOf 1) | integer | Alternative | The multiplier used to calculate the number of points earned each time the promotion is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier` of 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier = 15 points). DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field. One of the following is required when specifying a points multiplier: - (Recommended) The `multiplier` field. - This deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier` with the equivalent value. Maximum: 10 Minimum: 2 |
points_multiplier (anyOf 2) | null | Alternative |
Create Loyalty Promotion — request body — body loyalty promotion trigger limit interval, times
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the number of times a buyer can earn points during a [loyalty promotion](entity:LoyaltyPromotion). If this field is not set, buyers can trigger the promotion an unlimited number of times to earn points during the time that the promotion is available. A purchase that is disqualified from earning points because of this limit might qualify for another active promotion. |
interval | JSON | Optional | |
interval (anyOf 1) | string | Alternative | Indicates the time period that the [trigger limit](entity:LoyaltyPromotionTriggerLimit) applies to, which is used to determine the number of times a buyer can earn points for a [loyalty promotion](entity:LoyaltyPromotion). The time period the limit applies to. See [LoyaltyPromotionTriggerLimitInterval](#type-loyaltypromotiontriggerlimitinterval) for possible values One of: ALL_TIME, DAY |
interval (anyOf 2) | null | Alternative | |
times | integer | Required within parent | The maximum number of times a buyer can trigger the promotion during the specified `interval`. Maximum: 30 Minimum: 1 |
Create Loyalty Promotion — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [CreateLoyaltyPromotion](api-endpoint:Loyalty-CreateLoyaltyPromotion) response. Either `loyalty_promotion` or `errors` is present in the response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_promotion | Model | Optional | Expand Cancel Loyalty Promotion — response body — loyalty promotion The new loyalty promotion. |
Referenced models: Get Shift — response body — errors item, Cancel Loyalty Promotion — response body — loyalty promotion
Create Loyalty Reward — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to create a loyalty reward. |
idempotency_key | string | Required within parent | A unique string that identifies this `CreateLoyaltyReward` request. Keys can be any valid string, but must be unique for every request. Maximum length: 128 Minimum length: 1 |
reward | Model | Required within parent | Expand Create Loyalty Reward — request body — body reward The reward to create. |
Referenced models: Create Loyalty Reward — request body — body reward
Create Loyalty Reward — request body — body reward
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a contract to redeem loyalty points for a [reward tier](entity:LoyaltyProgramRewardTier) discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. For more information, see [Manage loyalty rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards). |
created_at | string | Optional | The timestamp when the reward was created, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID of the loyalty reward. Maximum length: 36 Read only: true |
loyalty_account_id | string | Required within parent | The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) to which the reward belongs. Maximum length: 36 Minimum length: 1 |
order_id | JSON | Optional | |
order_id (anyOf 1) | string | Alternative | The Square-assigned ID of the [order](entity:Order) to which the reward is attached. |
order_id (anyOf 2) | null | Alternative | |
points | integer | Optional | The number of loyalty points used for the reward. Minimum: 1 Read only: true |
redeemed_at | string | Optional | The timestamp when the reward was redeemed, in RFC 3339 format. Read only: true |
reward_tier_id | string | Required within parent | The Square-assigned ID of the [reward tier](entity:LoyaltyProgramRewardTier) used to create the reward. Maximum length: 36 Minimum length: 1 |
status | string | Optional | The status of the loyalty reward. The status of a loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values One of: ISSUED, REDEEMED, DELETED Read only: true |
updated_at | string | Optional | The timestamp when the reward was last updated, in RFC 3339 format. Read only: true |
Create Loyalty Reward — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes the loyalty reward created. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
reward | Model | Optional | Expand Create Loyalty Reward — response body — reward The loyalty reward created. |
Referenced models: Get Shift — response body — errors item, Create Loyalty Reward — response body — reward
Create Loyalty Reward — response body — reward
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a contract to redeem loyalty points for a [reward tier](entity:LoyaltyProgramRewardTier) discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. For more information, see [Manage loyalty rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards). |
created_at | string | Optional | The timestamp when the reward was created, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID of the loyalty reward. Maximum length: 36 Read only: true |
loyalty_account_id | string | Required within parent | The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) to which the reward belongs. Maximum length: 36 Minimum length: 1 |
order_id | JSON | Optional | |
order_id (anyOf 1) | string | Alternative | The Square-assigned ID of the [order](entity:Order) to which the reward is attached. |
order_id (anyOf 2) | null | Alternative | |
points | JSON | Optional | |
points (anyOf 1) | integer | Alternative | The number of loyalty points used for the reward. Minimum: 1 Read only: true |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
redeemed_at | string | Optional | The timestamp when the reward was redeemed, in RFC 3339 format. Read only: true |
reward_tier_id | string | Required within parent | The Square-assigned ID of the [reward tier](entity:LoyaltyProgramRewardTier) used to create the reward. Maximum length: 36 Minimum length: 1 |
status | string | Optional | The status of the loyalty reward. The status of a loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values Known values: ISSUED, REDEEMED, DELETED Read only: true |
updated_at | string | Optional | The timestamp when the reward was last updated, in RFC 3339 format. Read only: true |
Delete Loyalty Reward — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response returned by the API call. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Shift — response body — errors item
List Loyalty Programs — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that contains all loyalty programs. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
programs | array | Optional | A list of `LoyaltyProgram` for the merchant. |
programs[] | Model | Each item | Expand Retrieve Loyalty Program — response body — program |
Referenced models: Get Shift — response body — errors item, Retrieve Loyalty Program — response body — program
List Loyalty Promotions — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) response. One of `loyalty_promotions`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `loyalty_promotions`. |
cursor | string | Optional | The cursor to use in your next call to this endpoint to retrieve the next page of results for your original request. This field is present only if the request succeeded and additional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_promotions | array | Optional | The retrieved loyalty promotions. |
loyalty_promotions[] | Model | Each item | Expand Cancel Loyalty Promotion — response body — loyalty promotion |
Referenced models: Get Shift — response body — errors item, Cancel Loyalty Promotion — response body — loyalty promotion
Redeem Loyalty Reward — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to redeem a loyalty reward. |
idempotency_key | string | Required within parent | A unique string that identifies this `RedeemLoyaltyReward` request. Keys can be any valid string, but must be unique for every request. Maximum length: 128 Minimum length: 1 |
location_id | string | Required within parent | The ID of the [location](entity:Location) where the reward is redeemed. Minimum length: 1 |
Redeem Loyalty Reward — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes the `LoyaltyEvent` published for redeeming the reward. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
event | Model | Optional | Expand Adjust Loyalty Points — response body — event The `LoyaltyEvent` for redeeming the reward. |
Referenced models: Get Shift — response body — errors item, Adjust Loyalty Points — response body — event
Retrieve Loyalty Account — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes the loyalty account. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_account | Model | Optional | Expand Create Loyalty Account — response body — loyalty account The loyalty account. |
Referenced models: Get Shift — response body — errors item, Create Loyalty Account — response body — loyalty account
Retrieve Loyalty Program — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that contains the loyalty program. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
program | Model | Optional | Expand Retrieve Loyalty Program — response body — program The loyalty program that was requested. |
Referenced models: Get Shift — response body — errors item, Retrieve Loyalty Program — response body — program
Retrieve Loyalty Program — response body — program
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a Square loyalty program. Loyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview). |
accrual_rules | JSON | Optional | |
accrual_rules (anyOf 1) | array | Alternative | Defines how buyers can earn loyalty points from the base loyalty program. To check for associated [loyalty promotions](entity:LoyaltyPromotion) that enable buyers to earn extra points, call [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions). |
accrual_rules (anyOf 1)[] | Model | Each item | Expand Retrieve Loyalty Program — response body — program accrual rules array item |
accrual_rules (anyOf 2) | null | Alternative | |
created_at | string | Optional | The timestamp when the program was created, in RFC 3339 format. Read only: true |
expiration_policy | JSON | Optional | |
expiration_policy (anyOf 1) | Model | Alternative | Expand Retrieve Loyalty Program — response body — program expiration policy Describes when the loyalty program expires If present, details for how points expire. |
expiration_policy (anyOf 2) | null | Alternative | |
id | string | Optional | The Square-assigned ID of the loyalty program. Updates to the loyalty program do not modify the identifier. Maximum length: 36 Read only: true |
location_ids | JSON | Optional | |
location_ids (anyOf 1) | array | Alternative | The [locations](entity:Location) at which the program is active. |
location_ids (anyOf 1)[] | string | Each item | |
location_ids (anyOf 2) | null | Alternative | |
reward_tiers | JSON | Optional | |
reward_tiers (anyOf 1) | array | Alternative | The list of rewards for buyers, sorted by ascending points. |
reward_tiers (anyOf 1)[] | Model | Each item | Expand Retrieve Loyalty Program — response body — program reward tiers array item |
reward_tiers (anyOf 2) | null | Alternative | |
status | JSON | Optional | |
status (anyOf 1) | string | Alternative | Indicates whether the program is currently active. Whether the program is currently active. See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible values Known values: INACTIVE, ACTIVE |
status (anyOf 2) | null | Alternative | |
terminology | JSON | Optional | |
terminology (anyOf 1) | Model | Alternative | Expand Retrieve Loyalty Program — response body — program terminology Represents the naming used for loyalty points A cosmetic name for the “points” currency. |
terminology (anyOf 2) | null | Alternative | |
updated_at | string | Optional | The timestamp when the reward was last updated, in RFC 3339 format. Read only: true |
Referenced models: Retrieve Loyalty Program — response body — program expiration policy Describes when the loyalty program expires, Retrieve Loyalty Program — response body — program terminology Represents the naming used for loyalty points, Retrieve Loyalty Program — response body — program accrual rules array item, Retrieve Loyalty Program — response body — program reward tiers array item
Retrieve Loyalty Program — response body — program accrual rules array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an accrual rule, which defines how buyers can earn points from the base [loyalty program](entity:LoyaltyProgram). |
accrual_type | string | Required within parent | The type of the accrual rule that defines how buyers can earn points. The type of the accrual rule that defines how buyers can earn points. See [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) for possible values Known values: VISIT, SPEND, ITEM_VARIATION, CATEGORY |
category_data | JSON | Optional | |
category_data (anyOf 1) | Model | Alternative | Expand Retrieve Loyalty Program — response body — program accrual rules array item category data category id Additional data for rules with the `CATEGORY` accrual type. |
category_data (anyOf 2) | null | Alternative | |
item_variation_data | JSON | Optional | |
item_variation_data (anyOf 1) | Model | Alternative | Expand Retrieve Loyalty Program — response body — program accrual rules array item item variation data item variation id Additional data for rules with the `ITEM_VARIATION` accrual type. |
item_variation_data (anyOf 2) | null | Alternative | |
points | JSON | Optional | |
points (anyOf 1) | JSON | Alternative | |
points (anyOf 1) (anyOf 1) | integer | Alternative | The number of points that buyers earn based on the `accrual_type`. Minimum: 1 |
points (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
points (anyOf 2) | null | Alternative | |
spend_data | JSON | Optional | |
spend_data (anyOf 1) | Model | Alternative | Expand RetrieveLoyaltyProgram — response body — program / accrual_rules / array / item / spend_data / tax_mode: BEFORE TAX, AFTER TAX Additional data for rules with the `SPEND` accrual type. |
spend_data (anyOf 2) | null | Alternative | |
visit_data | JSON | Optional | |
visit_data (anyOf 1) | Model | Alternative | Expand RetrieveLoyaltyProgram — response body — program / accrual_rules / array / item / visit_data / tax_mode: BEFORE TAX, AFTER TAX Additional data for rules with the `VISIT` accrual type. |
visit_data (anyOf 2) | null | Alternative |
Referenced models: Retrieve Loyalty Program — response body — program accrual rules array item category data category id, Retrieve Loyalty Program — response body — program accrual rules array item item variation data item variation id, RetrieveLoyaltyProgram — response body — program / accrual_rules / array / item / spend_data / tax_mode: BEFORE TAX, AFTER TAX, RetrieveLoyaltyProgram — response body — program / accrual_rules / array / item / visit_data / tax_mode: BEFORE TAX, AFTER TAX
Retrieve Loyalty Program — response body — program accrual rules array item category data category id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents additional data for rules with the `CATEGORY` accrual type. |
category_id | string | Required within parent | The ID of the `CATEGORY` [catalog object](entity:CatalogObject) that buyers can purchase to earn points. Minimum length: 1 |
Retrieve Loyalty Program — response body — program accrual rules array item item variation data item variation id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents additional data for rules with the `ITEM_VARIATION` accrual type. |
item_variation_id | string | Required within parent | The ID of the `ITEM_VARIATION` [catalog object](entity:CatalogObject) that buyers can purchase to earn points. Minimum length: 1 |
Retrieve Loyalty Program — response body — program expiration policy Describes when the loyalty program expires
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Describes when the loyalty program expires. |
expiration_duration | string | Required within parent | The number of months before points expire, in `P[n]M` RFC 3339 duration format. For example, a value of `P12M` represents a duration of 12 months. Points are valid through the last day of the month in which they are scheduled to expire. For example, with a `P12M` duration, points earned on July 6, 2020 expire on August 1, 2021. Minimum length: 1 |
Retrieve Loyalty Program — response body — program reward tiers array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a reward tier in a loyalty program. A reward tier defines how buyers can redeem points for a reward, such as the number of points required and the value and scope of the discount. A loyalty program can offer multiple reward tiers. |
created_at | string | Optional | The timestamp when the reward tier was created, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID of the reward tier. Maximum length: 36 Read only: true |
name | string | Optional | The name of the reward tier. Read only: true |
points | JSON | Required within parent | |
points (anyOf 1) | integer | Alternative | The points exchanged for the reward tier. Minimum: 1 |
points (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pricing_rule_reference | Model | Required within parent | Expand Retrieve Loyalty Program — response body — program reward tiers array item pricing rule reference A reference to the specific version of a `PRICING_RULE` catalog object that contains information about the reward tier discount. Use `object_id` and `catalog_version` with the [RetrieveCatalogObject](api-endpoint:Catalog-RetrieveCatalogObject) endpoint to get discount details. Make sure to set `include_related_objects` to true in the request to retrieve all catalog objects that define the discount. For more information, see [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). |
Referenced models: Retrieve Loyalty Program — response body — program reward tiers array item pricing rule reference
Retrieve Loyalty Program — response body — program reward tiers array item pricing rule reference
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A reference to a Catalog object at a specific version. In general this is used as an entry point into a graph of catalog objects, where the objects exist at a specific version. |
catalog_version | JSON | Optional | |
catalog_version (anyOf 1) | JSON | Alternative | |
catalog_version (anyOf 1) (anyOf 1) | integer | Alternative | The version of the object. Format: int64 |
catalog_version (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
catalog_version (anyOf 2) | null | Alternative | |
object_id | JSON | Optional | |
object_id (anyOf 1) | string | Alternative | The ID of the referenced object. |
object_id (anyOf 2) | null | Alternative |
Retrieve Loyalty Program — response body — program terminology Represents the naming used for loyalty points
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the naming used for loyalty points. |
one | string | Required within parent | A singular unit for a point (for example, 1 point is called 1 star). Minimum length: 1 |
other | string | Required within parent | A plural unit for point (for example, 10 points is called 10 stars). Minimum length: 1 |
Retrieve Loyalty Promotion — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_promotion | Model | Optional | Expand Cancel Loyalty Promotion — response body — loyalty promotion The retrieved loyalty promotion. |
Referenced models: Get Shift — response body — errors item, Cancel Loyalty Promotion — response body — loyalty promotion
Retrieve Loyalty Reward — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes the loyalty reward. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
reward | Model | Optional | Expand Create Loyalty Reward — response body — reward The loyalty reward retrieved. |
Referenced models: Get Shift — response body — errors item, Create Loyalty Reward — response body — reward
RetrieveLoyaltyProgram — response body — program / accrual_rules / array / item / spend_data / tax_mode: BEFORE TAX, AFTER TAX
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents additional data for rules with the `SPEND` accrual type. |
amount_money | Model | Required within parent | Expand Pay Order — response body — order total money The amount that buyers must spend to earn points. For example, given an "Earn 1 point for every $10 spent" accrual rule, a buyer who spends $105 earns 10 points. |
excluded_category_ids | JSON | Optional | |
excluded_category_ids (anyOf 1) | array | Alternative | The IDs of any `CATEGORY` catalog objects that are excluded from points accrual. You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) endpoint to retrieve information about the excluded categories. |
excluded_category_ids (anyOf 1)[] | string | Each item | |
excluded_category_ids (anyOf 2) | null | Alternative | |
excluded_item_variation_ids | JSON | Optional | |
excluded_item_variation_ids (anyOf 1) | array | Alternative | The IDs of any `ITEM_VARIATION` catalog objects that are excluded from points accrual. You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) endpoint to retrieve information about the excluded item variations. |
excluded_item_variation_ids (anyOf 1)[] | string | Each item | |
excluded_item_variation_ids (anyOf 2) | null | Alternative | |
tax_mode | string | Required within parent | Indicates how taxes should be treated when calculating the purchase amount used for loyalty points accrual. This setting applies only to `SPEND` accrual rules or `VISIT` accrual rules that have a minimum spend requirement. Indicates how taxes should be treated when calculating the purchase amount used for points accrual. See [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) for possible values Known values: BEFORE_TAX, AFTER_TAX |
Referenced models: Pay Order — response body — order total money
RetrieveLoyaltyProgram — response body — program / accrual_rules / array / item / visit_data / tax_mode: BEFORE TAX, AFTER TAX
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents additional data for rules with the `VISIT` accrual type. |
minimum_amount_money | JSON | Optional | |
minimum_amount_money (anyOf 1) | Model | Alternative | Expand Pay Order — response body — order total money The minimum purchase required during the visit to quality for points. |
minimum_amount_money (anyOf 2) | null | Alternative | |
tax_mode | string | Required within parent | Indicates how taxes should be treated when calculating the purchase amount used for loyalty points accrual. This setting applies only to `SPEND` accrual rules or `VISIT` accrual rules that have a minimum spend requirement. Indicates how taxes should be treated when calculating the purchase amount to determine whether the visit qualifies for points. This setting applies only if `minimum_amount_money` is specified. See [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) for possible values Known values: BEFORE_TAX, AFTER_TAX |
Referenced models: Pay Order — response body — order total money
Search Loyalty Accounts — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to search for loyalty accounts. |
cursor | string | Optional | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
limit | integer | Optional | The maximum number of results to include in the response. The default value is 30. Maximum: 200 Minimum: 1 |
query | Model | Optional | Expand Search Loyalty Accounts — request body — body query The search criteria for the request. |
Referenced models: Search Loyalty Accounts — request body — body query
Search Loyalty Accounts — request body — body query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The search criteria for the loyalty accounts. |
customer_ids | JSON | Optional | |
customer_ids (anyOf 1) | array | Alternative | The set of customer IDs to use in the loyalty account search. This cannot be combined with `mappings`. Max: 30 customer IDs |
customer_ids (anyOf 1)[] | string | Each item | |
customer_ids (anyOf 2) | null | Alternative | |
mappings | JSON | Optional | |
mappings (anyOf 1) | array | Alternative | The set of mappings to use in the loyalty account search. This cannot be combined with `customer_ids`. Max: 30 mappings |
mappings (anyOf 1)[] | Model | Each item | Expand Create Loyalty Account — response body — loyalty account mapping created at, id, phone number |
mappings (anyOf 2) | null | Alternative |
Referenced models: Create Loyalty Account — response body — loyalty account mapping created at, id, phone number
Search Loyalty Accounts — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes loyalty accounts that satisfy the search criteria. |
cursor | string | Optional | The pagination cursor to use in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
loyalty_accounts | array | Optional | The loyalty accounts that met the search criteria, in order of creation date. |
loyalty_accounts[] | Model | Each item | Expand Create Loyalty Account — response body — loyalty account |
Referenced models: Get Shift — response body — errors item, Create Loyalty Account — response body — loyalty account
Search Loyalty Events — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to search for loyalty events. |
cursor | string | Optional | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
limit | integer | Optional | The maximum number of results to include in the response. The last page might contain fewer events. The default is 30 events. Maximum: 30 Minimum: 1 |
query | Model | Optional | Expand Search Loyalty Events — request body — body query A set of one or more predefined query filters to apply when searching for loyalty events. The endpoint performs a logical AND to evaluate multiple filters and performs a logical OR on arrays that specifies multiple field values. |
Referenced models: Search Loyalty Events — request body — body query
Search Loyalty Events — request body — body query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a query used to search for loyalty events. |
filter | JSON | Optional | |
filter (anyOf 1) | Model | Alternative | Expand Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter The query filter criteria. |
filter (anyOf 2) | null | Alternative |
Referenced models: Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter
Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The filtering criteria. If the request specifies multiple filters, the endpoint uses a logical AND to evaluate them. |
date_time_filter | JSON | Optional | |
date_time_filter (anyOf 1) | Model | Alternative | Expand Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter date time filter Filter events by date time range Filter events by date time range. For each range, the start time is inclusive and the end time is exclusive. |
date_time_filter (anyOf 2) | null | Alternative | |
location_filter | JSON | Optional | |
location_filter (anyOf 1) | Model | Alternative | Expand Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter location filter Filter events by location Filter events by location. |
location_filter (anyOf 2) | null | Alternative | |
loyalty_account_filter | JSON | Optional | |
loyalty_account_filter (anyOf 1) | Model | Alternative | Expand Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter loyalty account filter Filter events by loyalty account Filter events by loyalty account. |
loyalty_account_filter (anyOf 2) | null | Alternative | |
order_filter | JSON | Optional | |
order_filter (anyOf 1) | Model | Alternative | Expand Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter order filter order id Filter events by the order associated with the event. |
order_filter (anyOf 2) | null | Alternative | |
type_filter | JSON | Optional | |
type_filter (anyOf 1) | Model | Alternative | Expand Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter type filter Filter events by event type Filter events by event type. |
type_filter (anyOf 2) | null | Alternative |
Referenced models: Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter date time filter Filter events by date time range, Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter location filter Filter events by location, Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter loyalty account filter Filter events by loyalty account, Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter order filter order id, Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter type filter Filter events by event type
Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter date time filter Filter events by date time range
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Filter events by date time range. |
created_at | Model | Required within parent | Expand Search Availability — request body — body query filter start at range The `created_at` date time range used to filter the result. |
Referenced models: Search Availability — request body — body query filter start at range
Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter location filter Filter events by location
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Filter events by location. |
location_ids | array | Required within parent | The [location](entity:Location) IDs for loyalty events to query. If multiple values are specified, the endpoint uses a logical OR to combine them. |
location_ids[] | string | Each item |
Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter loyalty account filter Filter events by loyalty account
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Filter events by loyalty account. |
loyalty_account_id | string | Required within parent | The ID of the [loyalty account](entity:LoyaltyAccount) associated with loyalty events. Minimum length: 1 |
Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter order filter order id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Filter events by the order associated with the event. |
order_id | string | Required within parent | The ID of the [order](entity:Order) associated with the event. Minimum length: 1 |
Search Loyalty Events — request body — body query filter date time filter, location filter, loyalty account filter, order filter, type filter type filter Filter events by event type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Filter events by event type. |
types | array | Required within parent | The loyalty event types used to filter the result. If multiple values are specified, the endpoint uses a logical OR to combine them. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values |
types[] | string | Each item | The type of the loyalty event. One of: ACCUMULATE_POINTS, CREATE_REWARD, REDEEM_REWARD, DELETE_REWARD, ADJUST_POINTS, EXPIRE_POINTS, OTHER, ACCUMULATE_PROMOTION_POINTS |
Search Loyalty Events — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that contains loyalty events that satisfy the search criteria, in order by the `created_at` date. |
cursor | string | Optional | The pagination cursor to be used in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
events | array | Optional | The loyalty events that satisfy the search criteria. |
events[] | Model | Each item | Expand Adjust Loyalty Points — response body — event |
Referenced models: Get Shift — response body — errors item, Adjust Loyalty Points — response body — event
Search Loyalty Rewards — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to search for loyalty rewards. |
cursor | string | Optional | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
limit | integer | Optional | The maximum number of results to return in the response. The default value is 30. Maximum: 30 Minimum: 1 |
query | Model | Optional | Expand Search Loyalty Rewards — request body — body query The search criteria for the request. If empty, the endpoint retrieves all loyalty rewards in the loyalty program. |
Referenced models: Search Loyalty Rewards — request body — body query
Search Loyalty Rewards — request body — body query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The set of search requirements. |
loyalty_account_id | string | Required within parent | The ID of the [loyalty account](entity:LoyaltyAccount) to which the loyalty reward belongs. Minimum length: 1 |
status | JSON | Optional | |
status (anyOf 1) | string | Alternative | The status of the loyalty reward. The status of the loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values One of: ISSUED, REDEEMED, DELETED |
status (anyOf 2) | null | Alternative |
Search Loyalty Rewards — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A response that includes the loyalty rewards satisfying the search criteria. |
cursor | string | Optional | The pagination cursor to be used in a subsequent request. If empty, this is the final response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
rewards | array | Optional | The loyalty rewards that satisfy the search criteria. These are returned in descending order by `updated_at`. |
rewards[] | Model | Each item | Expand Create Loyalty Reward — response body — reward |
Referenced models: Get Shift — response body — errors item, Create Loyalty Reward — response body — reward