Loyalty
CreateLoyaltyAccount
Creates a loyalty account. To create a loyalty account, you must provide the program_id and a mapping with the phone_number of the buyer.
post/v2/loyalty/accounts
Request body
Example request
{
"request_body": {
"idempotency_key": "ec78c477-b1c3-4899-a209-a4e71337c996",
"loyalty_account": {
"mapping": {
"phone_number": "+14155551234"
},
"program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd"
}
}
}Response
Success
Example response
{
"loyalty_account": {
"balance": 0,
"created_at": "2020-05-08T21:44:32Z",
"id": "79b807d2-d786-46a9-933b-918028d7a8c5",
"lifetime_points": 0,
"mapping": {
"created_at": "2020-05-08T21:44:32Z",
"id": "66aaab3f-da99-49ed-8b19-b87f851c844f",
"phone_number": "+14155551234"
},
"program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd",
"updated_at": "2020-05-08T21:44:32Z"
}
}