Skip to content

Get Rewards By Account (GET /v1/rewards/{accountId})

Retrieves all rewards that belong to a specific Loyalty Account.

URL test:

https://test.lightcms.io/loyalty/v1/rewards/{accountId}

Method:

GET

Path Items

/v1/rewards/{accountId}

Parameters

Name Location Type Required Description
accountId path integer (int64) Yes Identifier of the Loyalty Account whose rewards are being fetched.
dateFrom query string (date‑time) No Include rewards created from this timestamp (inclusive).
dateTo query string (date‑time) No Include rewards created up to this timestamp (inclusive).
trancoreId query integer (int64) No Filter rewards by the originating transaction (Trancore) ID.
ruleId query integer (int64) No Filter rewards by the rule that generated them.
rewardType query string No Filter by reward type (PERCENTAGE, FLAT_AMOUNT, LOYALTY_POINTS).
page query integer (int32) No Zero‑based page index (default 0).
size query integer (int32) No Number of items per page (default 20).
sort query string No Sorting expression, e.g., createdAt,desc.
accept header string Yes Media types acceptable for the response (e.g., */*).

Example cURL

    curl -X GET "https://test.lightcms.io/loyalty/v1/rewards/987?page=0&size=20&sort=createdAt,desc" \
         -H "accept: */*"

Responses:

200 - OK

Status Code: 200 OK

[
  {
    "id": 101,
    "rewardType": "LOYALTY_POINTS",
    "rewardAmount": 150,
    "rewardCurrency": "USD",
    "previousRewardAmount": 120,
    "customerMessage": "Congratulations! You've earned points.",
    "ruleId": 5,
    "trancoreId": 2001,
    "loyaltyEventId": 301,
    "loyaltyAccountId": 987,
    "createdAt": "2024-06-01T10:00:00Z",
    "updatedAt": "2024-06-01T10:05:00Z"
  }
]

Parameter Location Type Description
id body integer (int64) Unique identifier of the reward record.
rewardType body string Type of reward (PERCENTAGE, FLAT_AMOUNT, LOYALTY_POINTS).
rewardAmount body number Monetary or point value of the reward granted.
rewardCurrency body string Currency code for monetary rewards (e.g., USD).
previousRewardAmount body number Reward amount before the current update (if applicable).
customerMessage body string Message shown to the customer regarding the reward.
ruleId body integer (int64) Identifier of the rule that generated the reward.
trancoreId body integer (int64) Transaction ID in Trancore associated with the reward.
loyaltyEventId body integer (int64) Identifier of the Loyalty Event that produced the reward.
loyaltyAccountId body integer (int64) Identifier of the Loyalty Account receiving the reward (matches the path parameter).
createdAt body string (date‑time) Timestamp when the reward record was created.
updatedAt body string (date‑time) Timestamp of the last update to the reward record.
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.