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

# List all cardholders

> This endpoint get list of cardholders.

### Header

<ParamField header="x-client-id" type="string" required>
  `x-client-id`.
</ParamField>

<ParamField header="x-auth-token" type="string" required>
  Bearer `YOUR_TOKEN_HERE`.
</ParamField>

### Parameters

<ParamField query="page_num" type="number" required>
  Page number, starts from 1.
</ParamField>

<ParamField query="page_size" type="number" required>
  Number of results per page.<br />
  `Maximum 50`
</ParamField>

<ParamField query="direct_id" type="string">
  Direct Account id this transaction is associated with.
</ParamField>

<ParamField query="account_id" type="string">
  The id of the account for the card.
</ParamField>

<ParamField query="card_holder_status" type="number">
  Filter on status of cardholder.<br />
  One of `-1=FAILED, 0-PENDING, 1-SUCCESS, 2-INCOMPLETE`
</ParamField>

<ParamField query="holder_name" type="string">
  Fuzzy search by name of the cardholder.
</ParamField>

### Response

<ResponseField name="code" type="number">
  Indicates whether the call was successful. 200 if successful, 400 if not.
</ResponseField>

<ResponseField name="message" type="string">
  Response Message. "Success" if successful, others not.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="details" defaultOpen>
    <ResponseField name="total_item" type="number">
      Total items.
    </ResponseField>

    <ResponseField name="total_page" type="number">
      Total pages.
    </ResponseField>

    <ResponseField name="item_list" type="array">
      <Expandable title="details" defaultOpen>
        <ResponseField name="card_holder_id" type="string">
          The id of the cardholder for the card.
        </ResponseField>

        <ResponseField name="card_holder_status" type="string">
          Status of cardholder.<br />
          One of `FAILED`, `PENDING`, `SUCCESS`, `INCOMPLETE`
        </ResponseField>

        <ResponseField name="card_num" type="number">
          The number of cards under the cardholder.
        </ResponseField>

        <ResponseField name="create_time" type="string">
          Create time of cardholder.
        </ResponseField>

        <ResponseField name="first_name" type="string">
          First name of cardholder.
        </ResponseField>

        <ResponseField name="last_name" type="string">
          Last name of cardholder.
        </ResponseField>

        <ResponseField name="update_time" type="string">
          Update time of cardholder.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/cardholders?page_num=1&page_size=10' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "total_item": 1,
          "total_page": 1,
          "item_list": [
              {
                  "card_holder_id": "7c4ff2cd-1bf6-4aaa-bf16-266771425011",
                  "card_holder_status": "SUCCESS",
                  "card_num": 0,
                  "create_time": "2023-09-15T10:02:17+08:00",
                  "first_name": "Emily",
                  "last_name": "Johnson",
                  "update_time": "2023-09-15T10:02:17+08:00"
              }
          ]
      }
  }
  ```
</ResponseExample>
