Developers

Customers

Markdown

Add or remove loyalty points

Adds points to a customer or removes them, with a reason that shows in their points history.

POST/stores/{storeId}/v1/customers/{id}/loyalty-adjustments

points is a non-zero integer up to 100,000 in either direction, and reason is 3 to 240 characters. The merchant's loyalty program must be on. A customer without a points account gets one, without welcome points. Spending points stays with the customer at checkout.

Path parameters

idstringrequired

Headers

Idempotency-Keystringrequired

Request body

pointsintegerrequired
Positive adds, negative removes, and it cannot be zero.
reasonstringrequired
It shows in the points history of the customer.

Response

dataobjectrequired
customer_idstring
pointsinteger
balanceinteger
The balance after this movement.
executionobject
Who executed the request: the app, version, installation and store. Field names here are camelCase.
appIdstring (uuid)
versionIdstring (uuid)
installationIdstring (uuid)
storeIdstring (uuid)
requestIdstring (uuid)
generationinteger
routeEpochinteger
appAuthEpochinteger
grantRevisioninteger
metaobjectrequired
request_idstring (uuid)
The request ID; include it in any support request.

Errors

HTTPCodeMeaning
400IDEMPOTENCY_KEY_REQUIREDNo Idempotency-Key header.
404RESOURCE_NOT_FOUNDThe ID does not exist in this store.
409INSUFFICIENT_LOYALTY_POINTSThe customer does not have that many points.
409LOYALTY_DISABLEDThe loyalty program is off on this store, or its plan does not include it.
409LOYALTY_EMAIL_INVALIDThe customer has no usable email; points are held by email.
422INVALID_POINTSpoints is zero, not an integer, or too large.
422INVALID_TEXTreason is outside its limits.
403SCOPE_REQUIREDThe token does not carry the required scope.
503APPS_SCOPE_RUNTIME_NOT_READYThe resource is not enabled on this merchant's store yet.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close