API Reference
Customers
List Customer [GET]

List Customers

https://sandboxapi.onbrails.com/api/v2/customers (opens in a new tab)

List all your customers

Query Parameters

ParameterTypeRequiredDescription
firstNamestringFilter by first name
lastNamestringFilter by last name
emailstringFilter by email
phonestringFilter by phone
limitintegerNumber of results to return (default 50, max 100)
nextCursorstringCursor for the next page of results
prevCursorstringCursor for the previous page of results

Request

Customers/List Customer [GET]
curl --request GET \
     --url https://sandboxapi.onbrails.com/api/v2/customers \
     --header 'Authorization: Bearer YOUR_SECRET_KEY' \
     --header 'accept: application/json'

Responses

🟢 200 - Result example
{
  "status": true,
  "message": "successfully fetched all customers",
  "data": {
      "data": [
          {
              "id": "c38f9555-6cd6-4e2b-9d7c-e4d4f2063843",
              "createdAt": "2023-08-16T16:54:50.747Z",
              "updatedAt": "2023-08-16T16:54:50.747Z",
              "firstName": null,
              "lastName": null,
              "email": "Jamie_Boyer22@hotmail.com",
              "phone": null,
              "countryCode": null,
              "blacklisted": false,
              "businessName": null,
              "isDefault": false,
              "companyId": "65f8ecbc-f7dd-4753-9cd4-dda9a3e396cb"
          }
      ],
      "meta": {
          "limit": 50,
          "nextCursor": "eyJpZCI6ImMzOGY5NTU1LTZjZDYtNGUyYi05ZDdjLWU0ZDRmMjA2Mzg0MyJ9",
          "prevCursor": null,
          "hasNextPage": true,
          "hasPreviousPage": false
      }
  }
}