Retrieve loyalty account
GET
/v2/loyalty/accounts/{account_id}
Retrieves a loyalty account.
Name | Description |
---|---|
account_
Required
|
The ID of the loyalty account to retrieve. |
Response Fields
Name | Description |
---|---|
errors
|
Any errors that occurred during the request. |
loyalty_
|
The loyalty account. |
Examples
GET
/v2/loyalty/accounts/{account_id}
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/loyalty/accounts/79b807d2-d786-46a9-933b-918028d7a8c5 \
-H 'Square-Version: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Response JSON
{
"loyalty_account": {
"id": "79b807d2-d786-46a9-933b-918028d7a8c5",
"mapping": {
"id": "66aaab3f-da99-49ed-8b19-b87f851c844f",
"phone_number": "+14155551234",
"created_at": "2020-05-08T21:44:32Z"
},
"program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd",
"balance": 10,
"lifetime_points": 20,
"customer_id": "Q8002FAM9V1EZ0ADB2T5609X6NET1H0",
"created_at": "2020-05-08T21:44:32Z",
"updated_at": "2020-05-08T21:44:32Z"
}
}