POST /v2/loyalty/rewards

Creates a loyalty reward. In the process, the endpoint does following:

After a reward is created, the points are locked and not available for the buyer to redeem another reward.

Servers

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 CreateLoyaltyReward request. Keys can be any valid string, but must be unique for every request.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.