younifyd
Menu

Get Loyalty Cards

List loyalty cards

GET/v1/loyalty_programs/{loyaltyProgramId}/cards

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Loyalty Cards action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getLoyaltyCards.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.

Query parameters

pageSizeinteger (int64)

The number of items in the response.

Default 1000

skipinteger (int64)

The number of items to skip when paging through large result sets.

sortstring

The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations.

identifierstring

The card code by which to filter loyalty cards in the response. **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`.

profileIdinteger (int64)

Filter results by customer profile ID.

batchIdstring

Filter results by loyalty card batch ID.

Response

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

hasMoreboolean
dataarray<object>
idinteger (int64)required

The internal ID of this entity.

createdstring (date-time)required

The time this entity was created.

programIDinteger (int64)required

The ID of the loyalty program that owns this entity.

programNamestring

The integration name of the loyalty program that owns this entity.

programTitlestring

The Campaign Manager-displayed name of the loyalty program that owns this entity.

statusstringrequired

Status of the loyalty card. Can be `active` or `inactive`.

blockReasonstring

Reason for transferring and blocking the loyalty card.

identifierstringrequired

The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`.

usersPerCardLimitinteger (int64)required

The max amount of customer profiles that can be linked to the card. 0 means unlimited.

profilesarray<object>2 fields

Integration IDs of the customers profiles linked to the card.

ledgerobject11 fields

The balance in a Loyalty Program for some Customer.

subledgersobject

Displays point balances of the card in the subledgers of the loyalty program.

modifiedstring (date-time)

Timestamp of the most recent update of the loyalty card.

oldCardIdentifierstring

The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`.

newCardIdentifierstring

The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`.

batchIdstring

The ID of the batch in which the loyalty card was created.

json
{
  "hasMore": true,
  "data": [
    {
      "ledger": {
        "pendingBalance": 10,
        "nextTierName": "Silver",
        "negativeBalance": 10,
        "currentBalance": 100,
        "spentBalance": 0,
        "tentativeCurrentBalance": 100,
        "tentativePendingBalance": 20,
        "pointsToNextTier": 20,
        "expiredBalance": 0,
        "currentTier": {
          "expiryDate": {},
          "downgradePolicy": "one_down",
          "name": "bronze",
          "id": 11,
          "startDate": {}
        },
        "tentativeNegativeBalance": 100
      },
      "identifier": "summer-loyalty-card-0543",
      "oldCardIdentifier": "summer-loyalty-card-0543",
      "usersPerCardLimit": 111,
      "created": {},
      "profiles": [
        {
          "integrationId": "R195412",
          "timestamp": {}
        },
        {
          "integrationId": "R195412",
          "timestamp": {}
        }
      ],
      "subledgers": {
        "key": {
          "pendingBalance": 10,
          "nextTierName": "Silver",
          "negativeBalance": 10,
          "currentBalance": 100,
          "spentBalance": 0,
          "tentativeCurrentBalance": 100,
          "tentativePendingBalance": 20,
          "pointsToNextTier": 20,
          "expiredBalance": 0,
          "currentTier": {
            "expiryDate": {},
            "downgradePolicy": "one_down",
            "name": "bronze",
            "id": 11,
            "startDate": {}
          },
          "tentativeNegativeBalance": 100
        }
      },
      "batchId": "wdefpov",
      "programTitle": "Loyalty program",
      "programName": "Loyalty_program",
      "modified": {},
      "id": 6,
      "blockReason": "Current card lost. Customer needs a new card.",
      "newCardIdentifier": "summer-loyalty-card-0543",
      "programID": 125,
      "status": "active"
    }
  ]
}

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