younifyd
Menu

Get Loyalty Card Balances

Get card's point balances

GET/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Loyalty Card Balances action (under integration).
  3. Fill in the fields below, then reference the result from later steps as {{getLoyaltyCardBalances.response.data}}.

Request

Path parameters

loyaltyProgramIdinteger (int64)required

Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

loyaltyCardIdstringrequired

Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. **Important**: The loyalty card ID requires [URL encoding](https://www.w3schools.com/tags//ref_urlencode.asp) if it contains special characters. For example, you must encode `NewCard2026%` as `NewCard2026%25`.

Query parameters

endDatestring (date-time)

Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. > [!note] **Note** > - This must be an RFC3339 timestamp string. > - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting > considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.

subledgerIdarray<string>

Filter results by one or more subledger IDs. Must be exact match.

Response

Returns 200 with an object. Read it in later steps with {{getLoyaltyCardBalances.response.data.<field>}}.

balanceobject

Point balance of a ledger in the Loyalty Program.

activePointsnumber

Total amount of points awarded to this customer and available to spend.

pendingPointsnumber

Total amount of points awarded to this customer but not available until their start date.

spentPointsnumber

Total amount of points already spent by this customer.

expiredPointsnumber

Total amount of points awarded but never redeemed. They cannot be used anymore.

negativePointsnumber

Total amount of negative points. This implies that `activePoints` is `0`.

subledgerBalancesobject

Map of the loyalty balances of the subledgers of a ledger.

profilesarray<object>

Customer profiles linked to the loyalty card.

integrationIdstringrequired

Integration ID of the customer profile linked to the card.

timestampstring (date-time)required

Timestamp the customer profile was linked to the card.

json
{
  "balance": {
    "negativePoints": 286,
    "activePoints": 286,
    "spentPoints": 150,
    "expiredPoints": 286,
    "pendingPoints": 50
  },
  "subledgerBalances": {
    "mysubledger": {
      "activePoints": 286,
      "pendingPoints": 50,
      "spentPoints": 150,
      "expiredPoints": 25,
      "negativePoints": 0
    }
  },
  "profiles": [
    {
      "integrationId": "R195412",
      "timestamp": {}
    }
  ]
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.