# Lists customers

<span class="api-endpoint">GET {{<a href="#urlbases">baseURL</a>}}/pay-api/v1/customers</span>
This endpoint lists the partner's customers.
The search can specify filters to better target intended customers.
<span class="api-seealso">See Also:</span><br>
To find a customer by identifier, see `GET /pay-api/v1/customers/{{customerId}}`.<br>
To create a customer, see `POST /pay-api/v1/customers`.<br>
To delete a customer, see `DELETE /pay-api/v1/customers/{{customerId}}`.<br>
To update a customer's information, see `PUT /pay-api/v1/customers/{{customerId}}`.
<span style="font-size: 9pt;">
Navigation:
[ <span style="color: #999;">Headers</span> ]
[ <a href="#pay_api_v1_customers_parameters">Query</a> ]
[ <span style="color: #999;">Request body</span> ]
[ <a href="#pay_api_v1_customers_response">Response body</a> ]
[ <a href="#pay_api_v1_customers_errors">Response codes</a> ]
</span>
<a id="pay_api_v1_customers_parameters"></a>

Endpoint: GET /pay-api/v1/customers
Version: V1
Security: Bearer

## Query parameters:

  - `search` (string)
    Specifies the search string.

This performs a case insensitive, matching, or partially matching search.

Fields does not have to be specified.
If the results are to be sorted, the field `orderby` to specify the sort field.

firstName<br>
lastName<br>
companyName<br>
email<br>
mobilePhoneNumber<br>
id<br>
createdOn<br>
lastTransactionDate<br>
contactName

  - `customerIds` (string)
    Specifies a single customer's identifier.

  - `orderBy` (string)
    Specifies the field the results get ordered by.

The sort order is specified by the `asc` value.

Example: contactName

  - `asc` (boolean)
    Specifies the sort order is ascending.

The sort field is specified by the `orderBy` value.

If `true`, the sort order is ascending.<br>
If `false`, the sort order is descending.

Example: true

  - `dateFrom` (string)
    Specifies returning items on or after this date (in an ISO 8601 date-time format).

If `dateFrom` only is specified, the search returns all available items from the `dateFrom` value to the present.
The fields `dateFrom` and `dateTo` may be used together to create an exclusive range.
We recommend creating an exclusive range to avoid a potentially excessive number of returns.

  - `dateTo` (string)
    Specifies returning items on or to this date (in an ISO 8601 date-time format).

If `dateTo` only is specified, the search returns all available items up to the `dateTo` value.
The fields `dateFrom` and `dateTo` may be used together to create an exclusive range.
We recommend creating an exclusive range to avoid a potentially excessive number of returns.

  - `page` (integer)
    Specifies the page number of the returned search results.

A page is considered each set of the `pageSize` value.

The maximum page value is the `pageSize` divided by the `total` count rounded up.
The count is zero-based.
For example, if `pageSize` is 50 and the `total` is 130, there are three pages.
The maximum `page` value is 2.

Values above the maximum page value will complete successfully but not return any items.

Example: 0

  - `pageSize` (integer)
    Specifies the number of items for each page of the returned search results.

A page is considered each set of the `pageSize` value.

The maximum page value is the `pageSize` divided by the `total` count rounded up.
The count is zero-based.
For example, if `pageSize` is 50 and the `total` is 130, there are three pages.
The maximum `page` value is 2.

Example: 50

## Response 200 fields (application/json):

  - `items` (array)

  - `items.id` (string)
    Indicates the customer identifier.

Example: 019bf058-960f-72a0-8194-6d554c7d6004
    Example: 019bf058-960f-72a0-8194-6d554c7d6004

  - `items.createdOn` (string)
    Indicates the date the customer was created (in an ISO 8601 date-time UTC format).

Examples: 2025-01-27T12:05:54.322587Z
    Example: 2025-01-27T12:05:54.322587Z

  - `items.modifiedOn` (string)
    Indicates the date the customer information was last modified (in an ISO 8601 date-time UTC format).
Examples:
2025-01-27T12:05:54.322587Z
    Example: 2025-01-27T12:05:54.322587Z

  - `items.lastTransactionDate` (string)
    Indicates the date of the customer's last transaction (in an ISO 8601 date-time UTC format).
Examples:
2025-01-27T12:05:54.322587Z
    Example: 2025-01-27T12:05:54.322587Z

  - `items.lastTransactionAmount` (number)
    Indicates the amount of the customer's last transaction.
Examples:
1600
249.99

  - `items.activeSubscriptionsAmount` (number)
    Indicates the amount of all active subscriptions.

Example: 1236.83

  - `items.contactName` (string)
    Indicates the customer's contact name.

Example: Alexandro Peppared
    Example: Alexandro Peppared

  - `items.firstName` (string)
    Indicates the customer's first name.

Example: Alexandro
    Example: Alexandro

  - `items.lastName` (string)
    Indicates the customer's last name.

Example: Peppared
    Example: Peppared

  - `items.companyName` (string)
    Indicates the name of the customer's company or organization.

Example: Peppared Street Cafe
    Example: Peppared Street Cafe

  - `items.email` (string)
    Indicates the customer's email.
Example: peppared@example.com
    Example: peppared@example.com

  - `items.mobilePhoneNumber` (string)
    Indicates the customer's mobile phone number.
Example: +14155552309
    Example: +14155552309

  - `items.isMobileNumberSmsNotificationsEnabled` (boolean)
    Indicates the customer's SMS notification is enabled.
If `true`, the customer's SMS notification is enabled.
If `false`, the customer's SMS notification is not enabled.
If missing or omitted, the information is not available.
Example: true

  - `items.billingAddress` (object)

  - `items.billingAddress.addressLine1` (string)
    Indicates the street address.

Example: 21 E. Main Street
    Example: 21 E. Main Street

  - `items.billingAddress.addressLine2` (string)
    Indicates additional street address information.

Example: Office 3
    Example: Office 3

  - `items.billingAddress.city` (string)
    Indicates the name of the city.

Example: Chicago
    Example: Chicago

  - `items.billingAddress.zip` (string)
    Indicates the postal or ZIP code.
Examples:
60612
60612-0001
    Example: 60612

  - `items.billingAddress.stateName` (string)
    Indicates the full state name.
Examples:
Texas
Washington
Illinois
    Example: Illinois

  - `items.billingAddress.state` (object)

  - `items.billingAddress.state.id` (integer)
    Indicates the state identifier.

Example: 13

  - `items.billingAddress.state.code` (string)
    Indicates the state identifier (in two-letter USPS [United States Postal Service] postal code).
Examples:
IL
TX
MA
    Example: IL

  - `items.billingAddress.state.name` (string)
    Indicates the name of the state.

Example: Illinois
    Example: Illinois

  - `items.billingAddress.country` (object)

  - `items.billingAddress.country.id` (integer)
    Indicates the country identifier.

Example: 1
    Example: 1

  - `items.billingAddress.country.isoCode` (string)
    Indicates the country identifier (in two letter ISO 3166-1 format).

Example: US
    Example: US

  - `items.billingAddress.country.name` (string)
    Indicates the name of the country.

Example: United States
    Example: United States

  - `items.paymentMethodsCount` (integer)
    Indicates the number of the customer's payment methods.

Example: 2

  - `total` (integer)
    Indicates the total number of customers found.

Example: 5
    Example: 5

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

## Response 500 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

