Applies to: Customers API
Learn how to retrieve and list customers profiles stored in a Square account.
Developers can use the following endpoints in the Customers API to get detailed information about customer profiles stored in a seller's Customer Directory:
RetrieveCustomer
- Retrieves a single customer profile by ID.BulkRetrieveCustomers
- Retrieves multiple customer profiles by IDs.ListCustomers
- Lists the customer profiles in a seller account.
Note
The SearchCustomers
endpoint in the Customers API can be used to find and view customer profiles based on phone number, email address, or other query filters. For more information, see Search for Customer Profiles.
Several list and search endpoints in other Square APIs return objects that are associated with a customer, such as orders, bookings, cards on file, and custom attributes. For more information, see Customer ID integration points.
Use SearchCustomers with a large customer base - Although the
ListCustomers
endpoint can be used to retrieve all customers in the Customer Directory, it might not be practical with a large customer base. Using the SearchCustomers endpoint with one or more query filters is a more efficient method for retrieving customers when you don't know their IDs. For more information, see Search for Customer Profiles.Synchronizing customer data - To synchronize customer data from the Customer Directory to your application, you can use customer webhooks to be notified of changes in addition to polling periodically with the
SearchCustomers
orListCustomers
endpoint.Custom attributes not included in Customer API responses - The
RetrieveCustomer
,BulkRetrieveCustomers
, andListCustomers
endpoints cannot be used to retrieve custom attributes for customer profiles. However, you can use the customer ID with theRetrieveCustomerCustomAttribute
orListCustomerCustomAttributes
endpoint to retrieve or list custom attributes for a specified customer profile, including seller-defined custom fields. For more information, see Create and Manage Customer Custom Attributes.Customer profiles have multiple sources - Customer profiles returned in
RetrieveCustomer
,BulkRetrieveCustomers
, andListCustomers
responses include customers created using the Square Dashboard, Square Point of Sale, the Customers API, and other flows. For example, a customer profile might be created for loyalty accounts and instant profiles might be created for payments. For information about how to create customer profiles using the Customers API, see Manage Customer Profiles.Sometimes Square creates instant profiles that have no public information. These instant profiles aren't included in
ListCustomers
orSearchCustomers
responses.