List\Create Customers
List Customers
A filter query in RSQL format to retrieve customers. The returned customers are limited to those that can be retrieved by the user.
Filterable fields:
| Criteria | Type | Operators |
|---|---|---|
| billing.address_1 | string | ==, !=, =in=, =out=, =regex= |
| billing.address_2 | string | ==, !=, =in=, =out=, =regex= |
| billing.address_3 | string | ==, !=, =in=, =out=, =regex= |
| billing.city | string | ==, !=, =in=, =out=, =regex= |
| billing.country_code | string | ==, !=, =in=, =out=, =regex= |
| billing.first_name | string | ==, !=, =in=, =out=, =regex= |
| billing.middle_name | string | ==, !=, =in=, =out=, =regex= |
| billing.last_name | string | ==, !=, =in=, =out=, =regex= |
| billing.phone | string | ==, !=, =in=, =out=, =regex= |
| billing.postal_code | string | ==, !=, =in=, =out=, =regex= |
| billing.state | string | ==, !=, =in=, =out=, =regex= |
| company_name | string | ==, !=, =in=, =out=, =regex= |
| company_registration_number | string | ==, !=, =in=, =out=, =regex= |
| email_address | string | ==, !=, =in=, =out=, =regex= |
| entity_id | string | ==, !=, =in=, =out=, =regex= |
| id | string | ==, !=, =in=, =out=, =regex= |
| phone_number | string | ==, !=, =in=, =out=, =regex= |
| shipping.address_1 | string | ==, !=, =in=, =out=, =regex= |
| shipping.address_2 | string | ==, !=, =in=, =out=, =regex= |
| shipping.address_3 | string | ==, !=, =in=, =out=, =regex= |
| shipping.city | string | ==, !=, =in=, =out=, =regex= |
| shipping.country_code | string | ==, !=, =in=, =out=, =regex= |
| shipping.first_name | string | ==, !=, =in=, =out=, =regex= |
| shipping.middle_name | string | ==, !=, =in=, =out=, =regex= |
| shipping.last_name | string | ==, !=, =in=, =out=, =regex= |
| shipping.phone | number | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
| shipping.postal_code | string | ==, !=, =in=, =out=, =regex= |
| shipping.state | string | ==, !=, =in=, =out=, =regex= |
| title | string | ==, !=, =in=, =out=, =regex= |
| work_phone | string | ==, !=, =in=, =out=, =regex= |
| tax.identifier | string | ==, !=, =in=, =out=, =regex= |
| created_at | date | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
| updated_at | date | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
| language | string | ==, !=, =in=, =out=, =regex= |
Operators:
| Operator | Description |
|---|---|
| == | equal |
| != | not equal |
| =lt= | less than |
| =le= | less than and equal to |
| =gt= | greater than |
| =ge= | greater than and equal to |
| =regex= | pattern matching |
| =in= | multiple arguments search |
| =out= | exclude |
| ; | Logical AND |
| , | Logical OR |
Note: Logical AND (;) has higher precedence than Logical OR (,). Use parentheses () to
override operator precedence.
Examples:
/v2/customer?search=id==123&order_by=ASC&order_criteria=email_address&page_size=1&page_number=2
/v2/customer?search=id==123435&order_by=DESC&order_criteria=billing.address_1&page_size=10&page_number=1
/v2/customer?search=id==dg373&order_by=ASC&order_criteria=company_name&page_size=1&page_number=2
The field to order results by. If not specified, results are ordered by created date.
Allowed values: billing.address_1, billing.address_2, billing.address_3, billing.city,
billing.country_code, billing.first_name, billing.middle_name, billing.last_name,
billing.phone, billing.postal_code, billing.state, company_name,
company_registration_number, email_address, entity_id, id, phone_number,
shipping.address_1, shipping.address_2, shipping.address_3, shipping.city,
shipping.country_code, shipping.first_name, shipping.last_name, shipping.phone,
shipping.postal_code, shipping.state, title, work_phone, tax.identifier, created_at
The sort direction. Defaults to DESC if not specified.
Page number to retrieve. Defaults to 1 if not specified.
Number of results per page. Defaults to 50 if not specified.
Successful
Customer UUID.
Company name of the customer. Required when billing.first_name and billing.last_name are not provided.
Unique identifier of the company recognised by the government. Known as CoC (Chamber of Commerce) number in some countries.
Consumer's email address.
Note: Required for 3DS. Please refer to the 3D Secure API specification for format requirements.
Entity ID on which the customer is created.
Cardholder's phone number.
^[0-9\s\-+().-]+$Customer's title (e.g. Mr, Mrs, Dr).
^[a-zA-Z\-\s.]+$Consumer's work phone number.
^[0-9\s\-+().-]+$Customer language preference for Invoice documents. See Localisation for details.
Timestamp when this customer was created.
Timestamp when this customer was last updated.
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
RSQL Filter Reference
Create Customer
Company name of the customer. Required when billing.first_name and billing.last_name are not provided.
Unique identifier of the company recognised by the government. Known as CoC (Chamber of Commerce) number in some countries.
Consumer's email address.
Field required for: Klarna, PayPal
Note: Required for 3DS. Please refer to the 3D Secure API specification for format requirements.
Entity ID on which the customer is created. The Entity ID can be found at the organisation level as Organisation ID (Administration > Organizations > [Organization] > Organisation ID).
Cardholder's phone number.
^[0-9\s\-+().-]+$Customer's title (e.g. Mr, Mrs, Dr).
^[a-zA-Z\-\s.]+$Consumer's work phone number.
^[0-9\s\-+().-]+$Customer language preference for Invoice documents. See Localisation for details.
Successful
Customer UUID.
Company name of the customer. Required when billing.first_name and billing.last_name are not provided.
Unique identifier of the company recognised by the government. Known as CoC (Chamber of Commerce) number in some countries.
Consumer's email address.
Note: Required for 3DS. Please refer to the 3D Secure API specification for format requirements.
Entity ID on which the customer is created.
Cardholder's phone number.
^[0-9\s\-+().-]+$Customer's title (e.g. Mr, Mrs, Dr).
^[a-zA-Z\-\s.]+$Consumer's work phone number.
^[0-9\s\-+().-]+$Customer language preference for Invoice documents. See Localisation for details.
Timestamp when this customer was created.
Timestamp when this customer was last updated.
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Request field reference
Response — capturing the customer UUID
Was this helpful?
