• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Retrieve loyalty account

GET /v2/loyalty/accounts/{account_id}

Retrieves a loyalty account.

Name Description
account_id
string

Required

The ID of the loyalty account to retrieve.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

loyalty_account
LoyaltyAccount

The loyalty account.

Examples

You are viewing an old version of the API
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: 2021-05-13' \
  -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"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?