We provide a number of methods for fetching customers:

  1. Get customers (To fetch more than one customer at a time)
  2. Get customer by ID
  3. Get customer by email

All of these endpoints require the following permissions:

  • customer:read

Get customers

Our API allows you to fetch customers as a collection using getCustomers in our SDKs or the customers query in GraphQL. In both cases this endpoint supports Pagination.

This is a very flexible endpoint which supports a variety of options for filtering and sorting, for full details try our API explorer or Typescript SDK.

Get customer by ID

If you already have the ID of a customer from within Plain or one of our other endpoints you can fetch more details about them using getCustomerById in our SDKs or the customer query in GraphQL.

Get customer by email

To fetch a customer by email you can use getCustomerByEmail in our SDKs or the customerByEmail query in GraphQL.