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

# List Cards

> List all cards with filtering and pagination

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx` or `Bearer eyJ...` (JWT)
</ParamField>

### Query Parameters

<ParamField query="status" type="string">
  Filter by status: `ACTIVE`, `BLOCKED`, `UNASSIGNED`, `LOST`
</ParamField>

<ParamField query="type" type="string">
  Filter by type: `PARENT` or `CHILD`
</ParamField>

<ParamField query="subscriber_id" type="string">
  Filter by subscriber UUID
</ParamField>

<ParamField query="search" type="string">
  Search by serial number or MAC address
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Results per page (max 100)
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Pagination offset
</ParamField>

***

## Response

<ResponseField name="cards" type="array">
  Array of card objects
</ResponseField>

<ResponseField name="total_count" type="integer">
  Total matching cards
</ResponseField>

<ResponseField name="limit" type="integer">
  Current page size
</ResponseField>

<ResponseField name="offset" type="integer">
  Current offset
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL - All Cards theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/cards" \
    -H "Authorization: Bearer olive_live_xxx"
  ```

  ```bash cURL - Active Only theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/cards?status=ACTIVE&limit=20" \
    -H "Authorization: Bearer olive_live_xxx"
  ```

  ```bash cURL - Unassigned theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/cards?status=UNASSIGNED" \
    -H "Authorization: Bearer olive_live_xxx"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "cards": [
      {
        "serial": "OLIV0001",
        "mac_address": "AA:BB:CC:DD:EE:01",
        "type": "PARENT",
        "status": "ACTIVE",
        "subscriber_id": "sub_abc123",
        "subscriber_name": "John Doe",
        "linked_at": "2025-01-15T10:30:00Z"
      },
      {
        "serial": "OLIV0002",
        "mac_address": "AA:BB:CC:DD:EE:02",
        "type": "CHILD",
        "status": "ACTIVE",
        "subscriber_id": "sub_abc123",
        "parent_serial": "OLIV0001",
        "daily_limit": 5000000,
        "linked_at": "2025-01-16T14:00:00Z"
      },
      {
        "serial": "OLIV0003",
        "mac_address": "AA:BB:CC:DD:EE:03",
        "type": null,
        "status": "UNASSIGNED",
        "subscriber_id": null,
        "created_at": "2025-01-01T00:00:00Z"
      }
    ],
    "total_count": 1500,
    "limit": 50,
    "offset": 0
  }
  ```
</ResponseExample>

***

## Common Filters

| Use Case             | Query                       |
| -------------------- | --------------------------- |
| Available cards      | `?status=UNASSIGNED`        |
| All blocked cards    | `?status=BLOCKED`           |
| Child cards only     | `?type=CHILD`               |
| Cards for subscriber | `?subscriber_id=sub_abc123` |

***

## Errors

| Status | Code             | Description                |
| ------ | ---------------- | -------------------------- |
| 401    | `UNAUTHORIZED`   | Invalid or missing API key |
| 403    | `FORBIDDEN`      | Insufficient permissions   |
| 500    | `INTERNAL_ERROR` | Server error               |


## OpenAPI

````yaml olive-openapi.json GET /cards
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /cards:
    get:
      tags:
        - Cards
      summary: List all cards
      description: Get a paginated list of all NFC cards with optional filters
      parameters:
        - description: Page number (default 1)
          name: page
          in: query
          schema:
            type: integer
        - description: Page size (default 50)
          name: page_size
          in: query
          schema:
            type: integer
        - description: Filter by status (active, blocked, pending)
          name: status
          in: query
          schema:
            type: string
        - description: Filter by card type (parent, child)
          name: card_type
          in: query
          schema:
            type: string
        - description: Filter by subscriber ID
          name: subscriber_id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of cards
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API Key for third-party integrations (WhatsApp, Smart PAY, VULT).
        Format: 'Bearer olive_live_xxxxxxxxxxxxx'
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      description: >-
        JWT token from admin login for administrative operations. Format:
        'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
      type: apiKey
      name: Authorization
      in: header

````