POST

Earn Points


Adds points to a loyalty account.

Only a positive amount can be added using the earn points endpoint. To adjust an account's balance for a negative amount, use Adjust Points.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/{accountId}/earn-points

Path Params
accountIdstringRequired

Loyalty account ID.

Body Params
amountintegerminimum 1maximum 9999999

Amount of points to earn. Must be a positive, whole number.

Min: 1

Max: 9999999


descriptionstringminLength 1maxLength 100

Description of how the points were earned.

Max: 100 characters


appIdstringRequiredminLength 1maxLength 100

ID of the app that initiated the transaction.

If points were earned manually, then the appId is the Loyalty app's wixAppId of 553c79f3-5625-4f38-b14b-ef7c0d1e87df. If points were earned in an automatic event, then the appId is from that automation's sourceAppId.


idempotencyKeystringRequiredminLength 1maxLength 256

Unique string identifier generated by the app. Wix uses this identifier to recognize subsequent retries of the same request.

Please use GUID format.


activityTypestringmaxLength 100

Activity type.

If points were earned through automation it should be set to trigger key.


orderIdstringmaxLength 512

Order id which was source of this transaction.


followedSocialMediaFollowedSocialMedia

Followed social media details.

Response Object
accountAccount

Updated loyalty account.


transactionIdstringformat GUID

Transaction ID associated with the points earned.

Add points to account
Request
cURL
Response
JSON
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?