customer.list
This method is used to get a list of customers using filters.
Arguments
This method has the path /customer/<version>/customer.list
and
follows the MicroBase API calling conventions.
Argument | Required | Type | Example | Description |
---|---|---|---|---|
id | no | String List | r1h2uQ4rx | Customer identifier. |
no | String List | john.doe@gmail.com | Customer email. | |
status | no | String List | ACTIVE | Status of the customer. ACTIVE or INACTIVE. |
tags | no | String List | VIP | Tags associated to the customer. |
limit | no | Number | 5 | Maximum number of documents to return. Defaults to 10 |
skip | no | Number | 10 | Skips over the first specified number of documents. Defaults to 0 . |
Response
Returns a customer object:
{
"ok": true,
"page": {
"limit": 10,
"skip": 0
},
"data": [{
"email": "john.doe@gmail.com",
"firstName": "John",
"lastName": "Doe",
"status": "ACTIVE",
"tags": [
"VIP"
],
"addresses": [
{
"name": "Work",
"firstName": "John",
"lastName": "Doe",
"address_1": "1650 Bolman Court",
"address_2": "Number 10",
"postCode": "61701",
"city": "Bloomington",
"state": "Illinois",
"country": "US",
"company": "My Company",
"phone": 2173203531,
"instructions": "Some Instructions",
"id": "r1h2uQ4rx"
}
],
"id": "HkhhuXESl"
]}
}
Example
curl --request POST \
--url http://localhost:3005/services/customer/v1/customer.list \
--header 'authorization: Bearer xxxxx...' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"id": "HkhhuXESl,HkhhuXES3"
}'