Skip to content

Get Loyalty Account (GET /v1/loyalty-accounts/{id})

Retrieves the complete details of a Loyalty Account identified by its id.
If the specified Loyalty Account does not exist, a 404 Not Found response is returned.

URL test:

    https://test.lightcms.io/loyalty/v1/loyalty-accounts/{id}

Method:

GET

Path Items

/v1/loyalty-accounts/{id}

Parameters

Name In Type Required Description
id path integer (int64) Yes Identifier of the Loyalty Account (must be > 0).

Example cURL

    curl -X GET "https://test.lightcms.io/loyalty/v1/loyalty-accounts/{id}" \
         -H "accept: */*"

Responses:

200 - OK

Status Code: 200 OK

{
  "id": 987,
  "loyaltyProgramId": 12,
  "cardId": 345,
  "accountId": 678,
  "holderId": "holder-abc-123",
  "holderFirstName": "Jane",
  "holderSurname": "Doe",
  "totalRewards": 1500.75,
  "totalRewardsCurrency": "USD",
  "createdAt": "2024-05-10T14:30:00Z",
  "updatedAt": "2025-01-22T09:15:00Z"
}

Parameter Location Type Description
id body integer (int64) Unique identifier of the Loyalty Account.
loyaltyProgramId body integer (int64) Identifier of the Loyalty Program the account belongs to.
cardId body integer (int64) Identifier of the associated Card.
accountId body integer (int64) Identifier of the underlying account (if any).
holderId body string External identifier of the account holder.
holderFirstName body string First name of the account holder.
holderSurname body string Surname of the account holder.
totalRewards body number Accumulated reward amount for the account.
totalRewardsCurrency body string Currency code for the total rewards (e.g., USD).
createdAt body string (date‑time) Timestamp when the Loyalty Account was created.
updatedAt body string (date‑time) Timestamp of the last update to the Loyalty Account.
404 - Not Found

Status Code: 404 Not Found

{
  "timestamp": "2026-02-03T17:09:02.825396155",
  "status": 404,
  "error": "Resource Not Found",
  "message": "Loyalty account not found with id: 2"
}

Parameter Location Type Description
timestamp body string (date‑time) Time when the error response was generated.
status body integer HTTP status code (404).
error body string Short error label (“Resource Not Found”).
message body string Detailed error message indicating the missing ID.