Skip to main content
Version: 2019-05-29 (Current)

List All Customers

Retrieve a paginated list of all customers in your account with optional filtering by date range and ordering.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Additional - 2 fieldsPagination Parameters
Additional - 3 fieldsFiltering & Sorting

Responsesโ€‹

200

Customer list retrieved successfully

List object containing customer objects and pagination information.

Response includes:
  • object - Object type (always "list")
  • data - Array of customer objects
  • limit - Number of items per page
  • offset - Number of items skipped
  • total - Total number of customers matching filters
  • order - Sort order applied
  • from - Start date filter applied
  • to - End date filter applied

400

Bad request

Invalid parameters provided.

Common causes:
  • Invalid date format (must be ISO 8601)
  • Invalid order value
  • Limit exceeds maximum (100)
  • Negative offset value

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

Code samplesโ€‹

curl https://api.omise.co/customers?limit=20&offset=0&order=reverse_chronological \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
bad_requestInvalid parametersCheck date format and parameter values
authentication_failureInvalid API keyVerify your secret key is correct
invalid_parametersInvalid pagination parametersCheck limit and offset values

List Response Fieldsโ€‹

FieldDescription
objectObject type (always "list")
dataArray of customer objects
limitNumber of items per page
offsetNumber of items skipped
totalTotal number of customers
orderSort order applied
fromStart date filter
toEnd date filter

Try it outโ€‹

Additional - 5 fields