# Retrieve customers

Retrieves a list of customers.

Endpoint: GET /customers
Version: latest
Security: SecretApiKey, JWT, ApplicationJWT

## Query parameters

- `limit` (integer)
  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`.
- `offset` (integer)
  Specifies the starting point within the collection of items to be returned.
- `filter` (string)
  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](https://www.rebilly.com/docs/dev-docs/search-filters).
- `q` (string)
  Use this field to perform a partial search of text fields.
- `expand` (string)
  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](https://www.rebilly.com/docs/dev-docs/expand-embedded-resources).
- `fields` (string)
  Limits the returned fields to the specified list, each field separated by a comma. The ID value is always returned.
- `sort` (array)
  Sorts and orders the collection of items. To sort in descending order, prefix with `-`. Multiple fields can be sorted by separating each with `,`.

## Response 200 fields

- `id` (string)
  ID of the customer.
  Example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
- `email` (string | null)
  Customer's email address.
- `firstName` (string | null)
  Customer's first name.
- `lastName` (string | null)
  Customer's last name.
- `websiteId` (string)
  ID of the website. A website is where an organization obtains a customer. For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  Example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
- `defaultPaymentInstrument` (object | null)
  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.
- `defaultPaymentInstrument.method` (string, required)
  Payment method.
  Enum: "payment-card", "ach", "cash", "check", "paypal", "AdvCash", "Aera", "Affirm", "Afterpay", "Aircash", "Airpay", "Alfa-click", "Alipay", "AmazonPay", "Apple Pay", "AstroPay Card", "AstroPay-GO", "BankSEND", "BankReferenced", "bank-transfer", "bank-transfer-2", "bank-transfer-3", "bank-transfer-4", "bank-transfer-5", "bank-transfer-6", "bank-transfer-7", "bank-transfer-8", "bank-transfer-9", "Baloto", "Beeline", "Belfius-direct-net", "bitcoin", "Bizum", "Blik", "Boleto", "Boleto-2", "Boleto-3", "cash-deposit", "CASHlib", "CashToCode", "CCAvenue", "China UnionPay", "Clearpay", "Cleo", "CODVoucher", "Conekta-oxxo", "Conekta-spei", "cryptocurrency", "Cupon-de-pagos", "CyberSource", "Dimoco-pay-smart", "Directa24Card", "domestic-cards", "Efecty", "echeck", "ecoPayz", "ecoPayzTurkey", "ecoVoucher", "EPS", "ePay.bg", "Ethereum", "e-wallet", "ezyEFT", "eZeeWallet", "FasterPay", "Flexepin", "Giropay", "Google Pay", "Gpaysafe", "iCashOne Voucher", "iDebit", "iDEAL", "ING-homepay", "INOVAPAY-pin", "INOVAPAY-wallet", "InstaDebit", "InstantPayments", "instant-bank-transfer", "Interac-online", "Interac-eTransfer", "Interac-express-connect", "Interac", "invoice", "iWallet", "Jeton", "JetonCash", "jpay", "KakaoPay", "Khelocard", "Klarna", "KNOT", "Litecoin", "loonie", "LPG-online", "LPG-payment-card", "Matrix", "MaxiCash", "Megafon", "MercadoPago", "MiFinity-eWallet", "miscellaneous", "MobilePay", "Mollie", "Multibanco", "Bancontact", "Bancontact-mobile", "MTS", "MuchBetter", "MuchBetterVoucher", "MyFatoorah", "Neosurf", "Netbanking", "Neteller", "Nordea-Solo", "NordikCoin", "OchaPay", "online-bank-transfer", "Onlineueberweisen", "oriental-wallet", "OXXO", "P24", "Pagadito", "PagoEffectivo", "Pagsmile-lottery", "Pagsmile-deposit-express", "PayCash", "Payco", "Payeer", "PaymentAsia-crypto", "Paysafecard", "PayTabs", "Pay4Fun", "Paynote", "Paymero", "Paymero-QR", "PayU", "PayULatam", "Perfect-money", "Piastrix", "PIX", "PIX-Automatico", "PinPay", "phone", "PhonePe", "POLi", "PostFinance-card", "PostFinance-e-finance", "QIWI", "QPay", "QQPay", "Quickpay", "rapyd-checkout", "rebilly-hosted-payment-form", "Resurs", "reverse-withdrawal", "Ripple", "SafetyPay", "Samsung Pay", "SEPA", "Siirto", "Skrill", "Skrill Rapid Transfer", "SMSVoucher", "Sofort", "SparkPay", "SPEI", "swift-dbt", "Tele2", "Telr", "Terminaly-RF", "Tether", "Thunes-Checkout", "ToditoCash-card", "Trustly", "Tupay", "TWINT", "UniCrypt", "UPayCard", "UPI", "USD-coin", "VCreditos", "VegaWallet", "VenusPoint", "Viva", "voucher", "voucher-2", "voucher-3", "voucher-4", "Wallet88", "Webmoney", "Webpay", "Webpay-2", "Webpay Card", "WeChat Pay", "XPay-P2P", "XPay-QR", "Yandex-money", "Zotapay", "Zimpler", "Zip"
- `defaultPaymentInstrument.paymentInstrumentId` (string, required)
  ID of the payment instrument.
  Example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
- `preferredPayoutInstrumentId` (string | null)
  ID of the customer's preferred payment instrument for payouts.
  Example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
- `createdTime` (string)
  Date and time when the resource is created. This value is set automatically when the resource is created.
- `updatedTime` (string)
  Date and time when the resource is updated. This value is set automatically when the resource is updated.
- `customFields` (object)
  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](https://www.rebilly.com/catalog/all/custom-fields).
  Example: {"foo":"bar"}
- `primaryAddress` (any)
  Customer's primary address.
- `company` (object | null)
  Company information that is associated with the customer's primary email address domain. This is a paid feature, to enable it [contact Rebilly](https://www.rebilly.com/support/).
- `company.name` (string | null)
  Name of the company.
- `company.domain` (string)
  Website domain of the company.
- `company.yearFounded` (number | null)
  Founding year of the company.
- `company.industry` (string | null)
  Industry the company is associated with.
- `company.employeesCount` (number | null)
  Number of employees in the company.
- `company.country` (string | null)
  Country where the company is based.
- `company.locality` (string | null)
  Locality or region where the company is based.
- `company._links` (array)
- `company._links.href` (string)
  Link URL.
- `company._links.rel` (string)
  Type of link.
  Enum: "linkedin"
- `averageValue` (object)
  Average customer value.
- `averageValue.currency` (string)
  Currency code in ISO 4217 format.
  Example: USD
- `averageValue.amount` (number)
  Average amount of approved payments in the merchant's reporting currency.
- `averageValue.amountUsd` (number)
  Average approved payment amount in USD.
- `paymentCount` (integer)
  Total number of approved payments made by the customer. Payments are the result of `sale` or `capture` transactions.
- `lastPaymentTime` (string | null)
  Date and time when the customer made their last approved payment. Payments are the result of `sale` or `capture` transactions.
- `lifetimeRevenue` (object)
  Customer's lifetime revenue.
- `lifetimeRevenue.amount` (number)
  Revenue amount in the merchant's reporting currency.
- `lifetimeRevenue.amountUsd` (number)
  Revenue amount in USD.
- `invoiceCount` (integer)
  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.
- `tags` (array)
  List of customer tags.
- `tags.id` (string)
  Unique resource ID.
  Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
- `tags.name` (string, required)
  Unique name for the tag. Tag names are not case-sensitive.
  Example: New
- `tags.type` (string, required)
  Type of tag. Tags of a specific type can only be assigned to corresponding entity types. For example, you can only use customer tags on customers.
  Enum: "customer", "kyc-document", "aml-check"
- `tags._links` (array)
  Related links.
- `tags._links.href` (string)
  Link URL.
- `tags._links.rel` (string)
  Type of link.
  Enum: "self"
- `revision` (integer)
  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.
- `hasFulfilledKyc` (boolean)
  Specifies if the customer has accepted and reviewed identity and address documents, or an accepted credit file document.
- `organizationId` (string)
  Unique organization identifier. An organization is an entity that represents a company. For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  Example: org_0YVDM8RC7GDADADSBSMW124JA8
- `locale` (string | null)
  Language locale identifier in [RFC 5646](https://tools.ietf.org/html/rfc5646) format.
  Example: fr-FR
- `taxNumbers` (array | null)
  Tax numbers of the customer.
- `taxNumbers.type` (string, required)
  Type of the tax number.
  Enum: "eu-vat", "other"
- `taxNumbers.value` (string, required)
  Value of the tax number.
  Example: GB980780684
- `taxNumbers.isDefault` (boolean)
  Determines if the tax number is selected as default to display on invoices.
  Example: true
- `taxNumbers.isValid` (boolean | null)
  Determines if the tax number passed the EU official [VIES validation](https://ec.europa.eu/taxation_customs/vies/#/vat-validation).
  Example: true
- `leadSource` (object)
  Lead source information.
- `leadSource.medium` (string | null)
  Category of the lead source traffic. For example, the medium could be organic search, Google ads, Display ads, and so on.
- `leadSource.source` (string | null)
  Domain, platform, or channel from which the lead source originates.
- `leadSource.campaign` (string | null)
  Campaign name of the lead source.
- `leadSource.term` (string | null)
  Term associated with a lead source.
- `leadSource.content` (string | null)
  Content contained in the lead source content. For example, content could be graphics, video, and so on.
- `leadSource.affiliate` (string | null)
  Individual or entity that is affiliated with the lead source.
- `leadSource.subAffiliate` (string | null)
  Individual or entity that is associated with a lead source affiliate. In other products, this field may also be referred to as sub ID or click ID in some.
- `leadSource.salesAgent` (string | null)
  Name of the sales agent associated with the lead source.
- `leadSource.clickId` (string | null)
  ID of the lead source click. This value is passed in the ad click URL for tracking and campaign attribution.
- `leadSource.path` (string | null)
  URL from which the lead source originates.
- `leadSource.referrer` (string | null)
  Lead source [`referrer` URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer).
  Example: https://www.rebilly.com
- `leadSource._links` (array)
  Related links.
- `leadSource._links.href` (string)
  Link URL.
- `leadSource._links.rel` (string)
  Type of link.
  Enum: "self", "customer"
- `personId` (string | null)
  ID of the associated person.
  Example: prs_0YV7DDSDD1C8DA64KHH2W33CPF
- `notificationEmails` (array)
  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](https://www.rebilly.com/docs/data-tables/manage-customer-information#manage-notification-emails).
- `_links` (array)
  Related links.
- `_links.href` (string)
  Link URL.
- `_links.rel` (string)
  Type of link.
  Enum: "self", "attachments", "defaultPaymentInstrument", "leadSource", "website"
- `_embedded` (object)
  Embedded objects that are requested using the `expand` query string parameter.
- `_embedded.defaultPaymentInstrument` (object)
- `_embedded.website` (object)
- `_embedded.leadSource` (object)

## Response 401 fields

- `status` (integer)
  HTTP status code.
- `type` (string)
  Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank".
- `title` (string)
  Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
- `detail` (string)
  Human-readable explanation that is specific to this occurrence of the problem.
- `instance` (string)
  URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

## Response 403 fields

- `status` (integer)
  HTTP status code.
- `error` (string)
  Message that describes why the request is forbidden. Most responses use a descriptive message, such as `Not allowed to change security settings`. If the organization requires multi-factor authentication (MFA) and MFA verification has not been completed for the session, this value is `mfa_required`. If the request sets `requireMfa` to `true` and MFA verification has not been completed for the session, this value is `mfa_required_for_caller`.
- `type` (string)
  Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank".
- `title` (string)
  Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
- `detail` (string)
  Human-readable explanation that is specific to this occurrence of the problem.
- `instance` (string)
  URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
