POST /v2/loyalty/rewards
Creates a loyalty reward. In the process, the endpoint does following:
- Uses the
reward_tier_id
in the request to determine the number of points to lock for this reward. - If the request includes
order_id
, it adds the reward and related discount to the order.
After a reward is created, the points are locked and not available for the buyer to redeem another reward.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
reward |
Object | Yes |
Represents a contract to redeem loyalty points for a reward tier discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. For more information, see Redeem loyalty rewards. |
reward.id |
String | No |
The Square-assigned ID of the loyalty reward. |
reward.loyalty_account_id |
String | Yes |
The Square-assigned ID of the loyalty account to which the reward belongs. |
reward.order_id |
String | No |
The Square-assigned ID of the order to which the reward is attached. |
reward.points |
Integer | No |
The number of loyalty points used for the reward. |
reward.reward_tier_id |
String | Yes |
The Square-assigned ID of the reward tier used to create the reward. |
reward.status |
String | No |
The status of a loyalty reward. |
reward.redeemed_at |
String | No |
The timestamp when the reward was redeemed, in RFC 3339 format. |
reward.created_at |
String | No |
The timestamp when the reward was created, in RFC 3339 format. |
reward.updated_at |
String | No |
The timestamp when the reward was last updated, in RFC 3339 format. |
idempotency_key |
String | Yes |
A unique string that identifies this |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.