Retrieve customers

Request

Retrieves a list of customers.

Security
SecretApiKey or JWT or ApplicationJWT
Query
limitinteger, [ 0 .. 1000 ]

Limit the number of collection items to be returned. Use 0 to return an empty collection and still receive the count of matching items in Pagination-Total.

offsetinteger, [ 0 .. 1000 ]

Specifies the starting point within the collection of items to be returned.

filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

qstring

Use this field to perform a partial search of text fields.

expandstring

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Embedded resources.

fieldsstring

Limits the returned fields to the specified list, each field separated by a comma. The ID value is always returned.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/customers?limit=0&offset=0&filter=string&q=string&expand=string&fields=string&sort=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

List of customers retrieved.

Headers
Pagination-Totalinteger

Total number of items that match the request. The value is independent of limit, including when limit is 0.

Example:332
Pagination-Limitinteger

Maximum number of items per page.

Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 charactersread-only

ID of the customer.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
emailstring or null, (email)read-only

Customer's email address.

firstNamestring or nullread-only

Customer's first name.

lastNamestring or nullread-only

Customer's last name.

websiteIdstring, <= 50 characters(WebsiteId)

ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.

Example:"web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
defaultPaymentInstrumentobject or nullread-only

Default payment instrument of the customer.

The default payment instrument is used to automatically pay subscription renewals, and for transaction requests where a specific payment instrument is not provided.

preferredPayoutInstrumentIdstring or null, <= 50 characters

ID of the customer's preferred payment instrument for payouts.

Default:null
Example:"inst_0YVB8KPKNXCBR9EDX7JHSED75N"
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

customFieldsobject(ResourceCustomFields)

Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.

Default:{}
Example:
{ "foo": "bar" }
primaryAddressContactObject (object) or null
One of:

Contact's information.

companyobject or null(Company)read-only

Company information that is associated with the customer's primary email address domain.

This is a paid feature, to enable it contact Rebilly.

averageValueobject(CustomerAverageValue)read-only

Average customer value.

paymentCountintegerread-only

Total number of approved payments made by the customer. Payments are the result of sale or capture transactions.

lastPaymentTimestring or null, (date-time)read-only

Date and time when the customer made their last approved payment. Payments are the result of sale or capture transactions.

lifetimeRevenueobject(CustomerLifetimeRevenue)read-only

Customer's lifetime revenue.

invoiceCountintegerread-only

Total number of invoices issued to the customer. This value is auto-incrementing. If this value is 0, the record relates to a lead. A lead is a customer who has not made a payment yet. If this value is greater than or equal to 1 the record relates to a customer.

tagsArray of objects(Tag)read-only

List of customer tags.

revisionintegerread-only

Number of times the customer's data has been modified.

Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.

hasFulfilledKycbooleanread-only

Specifies if the customer has accepted and reviewed identity and address documents, or an accepted credit file document.

organizationIdstring, <= 50 characters(OrganizationId)read-only

Unique organization identifier. An organization is an entity that represents a company. For more information, see Obtain an organization ID.

Example:"org_0YVDM8RC7GDADADSBSMW124JA8"
localestring or null

Language locale identifier in RFC 5646 format.

Default:null
Example:"fr-FR"
taxNumbersArray of objects or null(TaxNumber)

Tax numbers of the customer.

personIdstring or null, <= 50 characters

ID of the associated person.

Example:"prs_0YV7DDSDD1C8DA64KHH2W33CPF"
notificationEmailsArray of strings, (email)

Email addresses for notification delivery in event-based email notifications. When you configure event-based email notifications, you can send to these addresses, the customer's primary email address, or another email address you specify. For more information, see Manage notification emails.

_embeddedobjectread-only

Embedded objects that are requested using the expand query string parameter.

]
Response
[ { "id": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "email": "user@example.com", "firstName": "string", "lastName": "string", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "defaultPaymentInstrument": { … }, "preferredPayoutInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "customFields": { … }, "primaryAddress": { … }, "company": { … }, "averageValue": { … }, "paymentCount": 0, "lastPaymentTime": "2019-08-24T14:15:22Z", "lifetimeRevenue": { … }, "invoiceCount": 0, "tags": [ … ], "revision": 0, "hasFulfilledKyc": true, "organizationId": "org_0YVDM8RC7GDADADSBSMW124JA8", "locale": "fr-FR", "taxNumbers": [ … ], "personId": "prs_0YV7DDSDD1C8DA64KHH2W33CPF", "notificationEmails": [ … ], "_links": [ … ], "_embedded": { … } } ]