List customers
Look up customers in your account with filters and cursor pagination.
Looks up customers registered in the authenticated company and environment. Use the filters to find a customer by identifier, name, email, CPF/CNPJ or the external reference from your system.
Start without a cursor, process list and, while page.has_next is true,
copy page.next_after to after, keeping the filters. Copy the entire
cursor without interpreting or calculating its contents. See
Listing and pagination to go back with before.
See how filters and sorting work in List customers.
Query Params
Number of customers per page. Positive integers above the maximum use the maximum. An omitted, empty, zero, negative, or invalid value uses 10.
From 1 to 100
Copy page.next_after from the previous response to move forward. Use the cursor unchanged, keep the same filters, and do not send before together with it.
Up to 128 characters
Copy page.previous_before from the previous response to move back one page. Keep the same filters and do not send after together with it.
Up to 128 characters
The customer's public identifier, with the cus_ prefix.
Up to 100 characters
Searches by customer name, with the most recent records first. Leave empty to ignore this filter.
2 to 120 characters
Filters by the customer's complete email.
Up to 254 characters
Filters by the customer's complete CPF or CNPJ, with or without periods, slash, hyphen, and spaces.
Up to 20 characters
Filters by the customer's current reference in your system, matching the complete value, including letter case and accents. Can be combined with other filters. After creating or editing the customer, the search can take a few seconds to reflect the reference. Keep the value when navigating by cursor.
Up to 120 characters
Responses
Response Body
Page of customers. If no customers match the filters, list is an empty array.
Customers found in the authenticated company and environment.
Public customer identifier.
Customer's full name.
Customer's first name.
Rest of the customer's name.
Customer's email.
Customer's CPF or CNPJ.
Tax ID type: cpf or cnpj.
Phone's international dialing code.
Phone number without the dialing code, digits only.
Address postal code.
Street.
Address number.
Address complement, when provided.
Neighborhood.
City.
State abbreviation.
Creation time in Unix UTC seconds.
Record update time in Unix UTC seconds.
Customer identifier in your system, when provided.
Integration data associated with the resource. Returns {} when there are no values. This map is not used as a search filter or automatically included in webhook events.
Information for moving forward or back in the list.
Page size applied to the query.
Indicates whether there are customers on the next page.
Indicates whether there are customers on the previous page.
Cursor to continue with after; null when there is no next page.
Cursor to go back with before; null when there is no previous page.
Response Body
Invalid query parameters. Check the fields and reasons in error.details. Providing after and before together returns MUTUALLY_EXCLUSIVE. If you receive INVALID_CURSOR, restart listing without a cursor, keeping the desired filters.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
For common errors, see HTTP response codes.