# List all customers

List all Direct Debit customers associated with your account

Endpoint: GET /customers/
Version: 1.0.0
Security: ApiKeyAuth, ApiKeySecret

## Query parameters:

  - `page` (integer)
    A page number within the paginated result set.
    Example: 1

  - `limit` (integer)
    Indicates how many results to return per page. By default we return 20 results
per page.


ℹ️ The minimum number of results returned per page is 1 and the maximum is 100.
If you enter a value greater than 100, our API will default to the maximum
value (100).
    Example: 15

  - `search` (string)
    Return results that match the email, firstname, lastname, or documentNumber you searched for. 

Note:

This filter supports both full and partial search queries.

For example, searching for car may match the following values:

  - carlos.vives@musicamexico.mx (email)
  - Carlos (firstname)
  - Cartregena (lastname)
  - 789-CAR-789456789 (documentNumber)
    Example: "trai"

## Response 200 fields (application/json):

  - `items` (array)
    An array of customer objects.

  - `metadata` (object)
    Additional metadata regarding the paginated result set.

  - `metadata.totalItems` (integer)
    The total number of items in the paginated result set.
    Example: 100

  - `metadata.itemCount` (integer)
    The number of items in the current page.
    Example: 10

  - `metadata.itemsPerPage` (integer)
    The number of items requested per page.
    Example: 10

  - `metadata.totalPages` (integer)
    The total number of pages in the paginated result set.
    Example: 10

  - `metadata.currentPage` (integer)
    The current page number.
    Example: 1

  - `links` (object)
    Links to navigate the paginated result set.

  - `links.first` (string)
    The URL to the first page of the paginated result set.
    Example: "/{resource}?limit=20"

  - `links.last` (string)
    The URL to the last page of the paginated result set.
    Example: "/{resource}?page=4&limit=20"

  - `links.next` (string)
    The URL to the next page of the paginated result set.
    Example: "/{resource}?page=3&limit=20"

  - `links.previous` (string)
    The URL to the previous page of the paginated result set.
    Example: "/{resource}?page=2&limit=20"

## Response 400 fields (application/json):

  - `statusCode` (integer)
    The HTTP status code for this error.
    Example: 400

  - `error` (string)
    The HTTP status code description for this error.
    Example: "Bad Request"

  - `message` (any)
    A short description of the error, indicating what is wrong with the request.
> Note: We return either a string or an array of strings, depending on the validation error(s). 

The description can be (among others):

  - id must be a UUID
  - Not enough balance
  - amount is not a valid decimal number.
  - currency must be one of the following values: cop, mxn, usd
  - reference must be a string
  - Customer not found for merchant
  - documentType is a required field
    Example: "id must be a UUID"

## Response 401 fields (application/json):

  - `statusCode` (integer)
    The HTTP status code for this error.
    Example: 401

  - `error` (string)
    The HTTP status code description for this error.
    Example: "Unauthorized"

  - `message` (string)
    A short description of the error, indicating what is wrong with the request.
In the case of a 401 Unauthorized error, the message is:

  - Unauthorized credentials
    Example: "Unauthorized credentials"


