Product API: These endpoints are part of the Loyalty API (also used for Stamps). All endpoints begin with: /api/v1/loyalty/

List Cards

GET List Cards
card_read
/api/v1/loyalty/cards

List all loyalty cards accessible to this API key.

When to Use

Call this endpoint when you need to:

  • Display a list of loyalty programs to customers
  • Get card IDs for use in other endpoints
  • Verify which cards your API key can access

Response

{
  "success": true,
  "data": {
    "cards": [
      {
        "id": 5,
        "unique_identifier": "abc123",
        "name": "Coffee Rewards",
        "head": "Earn points with every purchase",
        "is_active": true,
        "points_per_currency": 1,
        "currency_unit_amount": 1.00,
        "club_id": 10
      }
    ],
    "total": 1
  }
}

Get Card Info

GET Get Card Info
card_read
/api/v1/loyalty/cards/{card_id}

Get detailed information about a specific loyalty card.

URL Parameter: card_id (integer, required) - The card ID

Response Fields

Field Type Description
id integer Unique card identifier
name string Card display name
points_per_currency integer Points earned per currency unit
currency_unit_amount decimal Currency amount for point calculation
is_active boolean Whether card is currently active

List Card Rewards

GET List Card Rewards
card_read
/api/v1/loyalty/cards/{card_id}/rewards

Get all active rewards available for a specific card.

Step-by-Step: Displaying Rewards

1

Fetch Rewards List

Call this endpoint with your card_id to get available rewards.

2

Display to Member

Show reward names, point costs, and descriptions to the member.

3

Handle Redemption

When a member selects a reward, use the Claims endpoints to process redemption.

Response

{
  "success": true,
  "data": {
    "card_id": 5,
    "rewards": [
      {
        "id": 1,
        "name": "Free Coffee",
        "title": {"en": "Free Coffee"},
        "points": 100,
        "reward_type": "discount",
        "is_active": true
      },
      {
        "id": 2,
        "name": "20% Discount",
        "title": {"en": "20% Off Next Purchase"},
        "points": 200,
        "reward_type": "percentage_discount",
        "is_active": true
      }
    ],
    "total": 2
  }
}
ESC