> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loyalty.lt/llms.txt
> Use this file to discover all available pages before exploring further.

# List Loyalty Cards

> Get paginated list of partner's loyalty card templates

# List Loyalty Cards

Retrieve a paginated list of loyalty card templates (partner cards) configured for your partner account. These are the card designs and configurations that users can receive.

<Info>
  This endpoint requires **Shop API authentication** (X-API-Key and X-API-Secret headers).
</Info>

## Path Parameters

<ParamField path="locale" type="string" required>
  Language code for localized content (e.g., `en`, `lt`)
</ParamField>

## Query Parameters

<ParamField query="per_page" type="integer" default="15">
  Number of items per page (max 50)
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

<ParamField query="is_active" type="boolean" default="true">
  Filter by active status

  * `true` - Only active cards
  * `false` - Only inactive cards
</ParamField>

<ParamField query="shop_id" type="integer">
  Filter cards applicable to specific shop
</ParamField>

<ParamField query="card_type" type="string">
  Filter by card type

  * `third_party` - External integrated cards
  * `loyalty` - Standard loyalty cards
</ParamField>

<ParamField query="search" type="string">
  Search by card name or card number
</ParamField>

## Authentication

<ParamField header="X-API-Key" type="string" required>
  API key from Partners Portal
</ParamField>

<ParamField header="X-API-Secret" type="string" required>
  API secret from Partners Portal
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="array">
  Array of partner card objects

  <Expandable title="Partner Card Object">
    <ResponseField name="id" type="integer">
      Unique card template identifier
    </ResponseField>

    <ResponseField name="partner_id" type="integer">
      Partner's unique identifier
    </ResponseField>

    <ResponseField name="title" type="object">
      Localized card title (JSON object with language keys)

      ```json theme={null}
      { "lt": "Lojalumo kortelė", "en": "Loyalty Card" }
      ```
    </ResponseField>

    <ResponseField name="description" type="object">
      Localized card description (JSON object)
    </ResponseField>

    <ResponseField name="card_design" type="object">
      Card visual design configuration (colors, logos, etc.)
    </ResponseField>

    <ResponseField name="is_active" type="boolean">
      Whether the card template is active
    </ResponseField>

    <ResponseField name="shop_ids" type="array">
      Array of shop IDs this card applies to (empty = all shops)
    </ResponseField>

    <ResponseField name="auto_assign" type="boolean">
      Whether to automatically assign this card to new users
    </ResponseField>

    <ResponseField name="points_enabled" type="boolean">
      Whether points earning is enabled
    </ResponseField>

    <ResponseField name="initial_bonus_points" type="integer">
      Points awarded when user receives the card
    </ResponseField>

    <ResponseField name="points_expiration_days" type="integer">
      Days until earned points expire (0 = never)
    </ResponseField>

    <ResponseField name="points_per_currency" type="number">
      Points earned per currency unit spent
    </ResponseField>

    <ResponseField name="currency_amount" type="number">
      Currency amount that earns `points_per_currency` points
    </ResponseField>

    <ResponseField name="round_points_up" type="boolean">
      Whether to round calculated points up
    </ResponseField>

    <ResponseField name="min_points_per_purchase" type="integer">
      Minimum points awarded per transaction
    </ResponseField>

    <ResponseField name="max_points_per_purchase" type="integer">
      Maximum points awarded per transaction
    </ResponseField>

    <ResponseField name="points_per_visit" type="integer">
      Bonus points per visit/transaction
    </ResponseField>

    <ResponseField name="points_redemption_enabled" type="boolean">
      Whether points can be redeemed for discounts
    </ResponseField>

    <ResponseField name="points_per_currency_redemption" type="number">
      Points required per currency unit discount
    </ResponseField>

    <ResponseField name="currency_amount_redemption" type="number">
      Currency discount per redemption unit
    </ResponseField>

    <ResponseField name="min_points_for_redemption" type="integer">
      Minimum points required to redeem
    </ResponseField>

    <ResponseField name="max_points_per_redemption" type="integer">
      Maximum points per redemption
    </ResponseField>

    <ResponseField name="terms_conditions" type="object">
      Localized terms and conditions (JSON object)
    </ResponseField>

    <ResponseField name="qr_code" type="string">
      QR code identifier for the card template
    </ResponseField>

    <ResponseField name="partner" type="object">
      Partner information
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 creation timestamp
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 last update timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  Pagination metadata

  <Expandable title="meta">
    <ResponseField name="current_page" type="integer">
      Current page number
    </ResponseField>

    <ResponseField name="last_page" type="integer">
      Total number of pages
    </ResponseField>

    <ResponseField name="per_page" type="integer">
      Items per page
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total number of items
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://staging-api.loyalty.lt/en/shop/loyalty-cards?per_page=10&is_active=true" \
    -H "X-API-Key: your_api_key" \
    -H "X-API-Secret: your_api_secret"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://staging-api.loyalty.lt/en/shop/loyalty-cards?per_page=10&is_active=true',
    {
      method: 'GET',
      headers: {
        'X-API-Key': 'your_api_key',
        'X-API-Secret': 'your_api_secret'
      }
    }
  );

  const data = await response.json();
  console.log(`Found ${data.meta.total} loyalty cards`);

  data.data.forEach(card => {
    console.log(`${card.title.en}: ${card.points_per_currency} points per €${card.currency_amount}`);
  });
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => 'https://staging-api.loyalty.lt/en/shop/loyalty-cards?per_page=10&is_active=true',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'X-API-Key: your_api_key',
          'X-API-Secret: your_api_secret'
      ]
  ]);

  $response = curl_exec($curl);
  curl_close($curl);

  $data = json_decode($response, true);
  echo "Total cards: " . $data['meta']['total'];
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response (200) theme={null}
  {
    "success": true,
    "data": [
      {
        "id": 1,
        "partner_id": 45,
        "title": {
          "lt": "Kavos mėgėjo kortelė",
          "en": "Coffee Lover Card"
        },
        "description": {
          "lt": "Rink taškus už kiekvieną pirkinį ir gauk nemokamą kavą!",
          "en": "Collect points with every purchase and get free coffee!"
        },
        "card_design": {
          "background_color": "#2D1810",
          "text_color": "#FFFFFF",
          "logo_url": "https://staging-api.loyalty.lt/storage/logos/coffee-card.png"
        },
        "is_active": true,
        "shop_ids": [],
        "auto_assign": true,
        "points_enabled": true,
        "initial_bonus_points": 50,
        "points_expiration_days": 365,
        "points_per_currency": 10,
        "currency_amount": 1.00,
        "round_points_up": true,
        "min_points_per_purchase": 1,
        "max_points_per_purchase": 500,
        "points_per_visit": 5,
        "points_redemption_enabled": true,
        "points_per_currency_redemption": 100,
        "currency_amount_redemption": 1.00,
        "min_points_for_redemption": 100,
        "max_points_per_redemption": 1000,
        "terms_conditions": {
          "lt": "Taškai galioja 1 metus nuo gavimo datos.",
          "en": "Points are valid for 1 year from earning date."
        },
        "qr_code": "CARD-001-ABC123",
        "partner": {
          "id": 45,
          "name": "Coffee Paradise",
          "logo": "https://staging-api.loyalty.lt/storage/logos/coffee-paradise.png"
        },
        "created_at": "2024-01-01T10:00:00.000Z",
        "updated_at": "2024-06-15T14:30:00.000Z"
      }
    ],
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 10,
      "total": 1
    }
  }
  ```

  ```json Unauthorized (401) theme={null}
  {
    "message": "Partner not authenticated"
  }
  ```
</ResponseExample>

## Points Calculation Example

Given the following card configuration:

* `points_per_currency`: 10
* `currency_amount`: 1.00
* `points_per_visit`: 5
* `round_points_up`: true

For a €15.50 purchase:

1. Base points: (15.50 / 1.00) × 10 = 155 points
2. Plus visit bonus: 155 + 5 = **160 points**

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Get Card Details" icon="id-card" href="/api-reference/endpoints/shop/loyalty-cards/get">
    Get specific card template details
  </Card>

  <Card title="Get Loyalty Card Info" icon="magnifying-glass" href="/api-reference/endpoints/shop/loyalty-cards/info">
    Get user's card by number or ID
  </Card>

  <Card title="Create Transaction" icon="coins" href="/api-reference/endpoints/shop/transactions/create">
    Award points via transaction
  </Card>
</CardGroup>
