# List all customers

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

Endpoint: GET /customer
Version: 1.0.0
Security: JWT

## Security:

  - `JWT` (unknown)
    http bearer JWT

## Query parameters:

  - `customer_type` (string)
    Type of customer to filter

  - `email_address` (string)
    Filter customers by email address

  - `tax_identification_number` (string)
    **Applicable only to the LRS (Liberalised Remittance Scheme / resident-India remittance) flow.** Filter customers by PAN (tax identification number). Matched exactly on the normalised value (case-insensitive; the value is trimmed and upper-cased before matching), so a partial PAN returns no results. An invalid PAN format returns a 400 error.

  - `before` (string)
    [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp in UTC to filter resources created before this time. Use this to avoid `Page drift` issue. See [Pagination parameters](/platform/pagination#parameters) for more details.

  - `after` (string)
    [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp in UTC to filter resources created after this time. Use this to avoid `Page drift` issue. See [Pagination parameters](/platform/pagination#parameters) for more details.

  - `per_page` (integer)
    Number of resources per page. Should be between 1 and 100.

  - `page` (integer)
    Page number for pagination. Starts from 1. Get the next page number from the `next` field in the response.

## Response 200:

  - `200` (unknown)
    List of customers matching the filters

## Response 200 fields (application/json):

  - `data` (array)

  - `data.id` (string)
    The unique identifier for the customer.
    Example: cust_5JU9yv0lGSUP

  - `data.name` (string)
    The name of the customer.
    Example: John Doe

  - `data.customer_type` (string)
    The type of customer
    Enum: "individual", "business"

  - `data.email` (string)
    The email address of the customer.
    Example: customer@gmail.com

  - `data.phone` (string)
    The phone number of the customer, with country code. Phone number validation is done using the [phonelib](https://github.com/daddyz/phonelib?tab=readme-ov-file) library.
    Example: +91-9023456789

  - `data.dob` (string)
    The date of birth of the customer
    Example: 2003-11-29

  - `data.nationality` (string)
    The nationality of the customer
    Example: IND

  - `data.tax_identification_number` (string)
    **Applicable only to the LRS (Liberalised Remittance Scheme / resident-India remittance) flow.** The customer's PAN (tax identification number), populated only for customers onboarded under LRS and absent otherwise. Searchable via the `tax_identification_number` query parameter on the list-customers endpoint.
    Example: BFQPG7654R

  - `data.address` (string)
    The street address of the customer.
    Example: 123 Main St

  - `data.city` (string)
    The city where the customer is located.
    Example: Anytown

  - `data.state` (string)
    The state where the customer is located.
    Example: Anystate

  - `data.country` (string)
    The country where the customer is located. Country should be sent as a [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code.
    Example: IND

  - `data.pincode` (string)
    The postal code/pincode of the customer's address. [List of countries where pincode is mandatory](/platform/countries#countries-requiring-pincode) are listed here.
    Example: 560048

  - `data.status` (string)
    The status of the customer.
    Example: active

  - `data.created_at` (string)
    Timestamp representing when the customer was created
    Example: 2021-06-01T12:00:00Z

  - `data.updated_at` (string)
    Timestamp representing when the customer was last updated
    Example: 2021-06-01T12:00:00Z

  - `page_meta` (object)

  - `page_meta.current` (integer)
    The current page number.
    Example: 2

  - `page_meta.previous` (integer | null)
    The previous page number.
    Example: 1

  - `page_meta.next` (integer | null)
    The next page number.
    Example: 3

  - `page_meta.per_page` (integer)
    The number of items per page.
    Example: 20

  - `page_meta.pages` (integer)
    The total number of pages.
    Example: 10

  - `page_meta.count` (integer)
    The total number of items.
    Example: 200

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `error` (string)
    Enum: "Bad Request"

  - `message` (string)
    Error message indicating which parameter was invalid

