Searches the customer profiles associated with a Square account using one or more supported query filters.
POST
/v2/customers/search
Searches the customer profiles associated with a Square account using one or more supported query filters.
Calling SearchCustomers
without any explicit query filter returns all customer profiles ordered alphabetically based on given_name
and family_name
.
Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages.
Include the pagination cursor in subsequent calls to this endpoint to retrieve the next set of results associated with the original query.
For more information, see Pagination.
The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results. If the specified limit is invalid, Square returns a 400 VALUE_TOO_LOW
or 400 VALUE_TOO_HIGH
error. The default value is 100.
For more information, see Pagination.
The filtering and sorting criteria for the search request. If a query is not specified, Square returns all customer profiles ordered alphabetically by given_name
and family_name
.
The customer profiles that match the search query. If any search condition is not met, the result is an empty object ({}
). Only customer profiles with public information (given_name
, family_name
, company_name
, email_address
, or phone_number
) are included in the response.
A pagination cursor that can be used during subsequent calls to SearchCustomers
to retrieve the next set of results associated with the original query. Pagination cursors are only present when a request succeeds and additional results are available.
For more information, see Pagination.
The total count of customers associated with the Square account that match the search query. Only customer profiles with public information (given_name
, family_name
, company_name
, email_address
, or phone_number
) are counted. This field is present only if count
is set to true
in the request.