POST /v2/loyalty/accounts/{account_id}/accumulate
Adds points to a loyalty account.
- If you are using the Orders API to manage orders, you only provide the
order_id
. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders,
you first perform a client-side computation to compute the points.
For spend-based and visit-based programs, you can first call CalculateLoyaltyPoints to compute the points
that you provide to this endpoint.
Note: The country of the seller's Square account determines whether tax is included in the purchase amount when accruing points for spend-based and visit-based programs. For more information, see Availability of Square Loyalty.
Servers
- https://connect.squareup.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
account_id |
String | Yes |
The loyalty account ID to which to add the points. |
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 |
---|---|---|---|
location_id |
String | Yes |
The location where the purchase was made. |
accumulate_points |
Object | Yes |
Provides metadata when the event |
accumulate_points.order_id |
String | No |
The ID of the order for which the buyer accumulated the points. This field is returned only if the Orders API is used to process orders. |
accumulate_points.points |
Integer | No |
The number of points accumulated by the event. |
accumulate_points.loyalty_program_id |
String | No |
The ID of the loyalty program. |
idempotency_key |
String | Yes |
A unique string that identifies the |
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.