POST

Create Account


Creates a loyalty account for one of a site's contacts.

To create a new loyalty account, the customer must first be a site contact with a contact ID. See the Contacts API to learn more about a site's contacts. The site must also have an active loyalty program before loyalty accounts can be created. See the activate loyalty program endpoint to activate a site's loyalty program.

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

Body Params
contactIdstringRequiredformat GUID

Contact ID for a Wix site contact. See the Contacts API to learn more about a site's contacts.

Response Object
accountAccount

Loyalty account.

Create an account for the contact
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-accounts/v1/accounts' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \ --data-raw '{ "contactId": "88615e02-3e8a-4297-8939-5d0a432b322a" }'
Response
JSON
{ "account": { "id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7", "contactId": "88615e02-3e8a-4297-8939-5d0a432b322a", "memberId": "3c7267de-204d-4f6c-b5a5-5d060bc3b21c", "points": { "balance": 0, "earned": 0, "redeemed": 0, "adjusted": 0 }, "rewardAvailable": false, "createdDate": "2021-12-06T14:33:19.114Z", "updatedDate": "2021-12-06T14:33:19.114Z", "revision": "1", "tier": { "id": "1415f107-640c-4e04-870f-149cdd562093", "updatedDate": "2021-12-07T07:30:23.749Z", "recalculationDate": null, "points": 15 }, "lastActivityDate": "2021-12-07T07:30:23.749Z", "contact": { "id": "7728152f-7deb-45f8-913f-7fdff4abbebe", "name": "Johna Linskey", "picture": null, "email": "johna.linskey@yopmail.com", "displayName": "Johna Linskey" }, "points_expiration": null } }
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?