To retrieve all customers that match the specified criteria, use the following request:
GET /customers
Query Parameters
Query parameters include the following.
| Parameter | Type | Required | Definition |
|---|---|---|---|
| offset | integer | No | Offset. |
name | string | No | Partial, case-insensitive customer name. |
| string | No | Partial, case-insensitive customer email. | |
| custom_tag_name | string | No | Custom tag name (must be set together with custom_tag_value). |
| custom_tag_value | string | No | Partial, case-insensitive custom tag value (must be set together with custom_tag_name). |
Example request
GET /customers?name=rivers&email=x-formation HTTP/1.1 Authorization: Bearer f794846b7c26621688e1e06164975b4eae8ce2f6
Response
The LAC REST API returns the standard HTTP response codes described in the following table.
| Status Code | Description |
|---|---|
| 200 OK | Customers list. |
| Invalid data. | |
| 403 Forbidden | Invalid or expired token provided. |
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "1",
"name": "Rivers Inc",
"description": "desc",
"phone_number": "779.790.4969x1425",
"fax_number": "(536)600-8229",
"street": "008 Santiago Groves Suite 651",
"city": "Shortport",
"country": "USA",
"zip_code": "62448",
"state": "South Carolina",
"creation_time": "2019-08-14 10:57:03",
"update_time": "2019-08-14 10:57:03",
"Contacts": [
{
"id": "1",
"name": "James Taylor",
"email": "nfisher@test.x-formation.com",
"customer_id": "1",
"creation_time": "2019-08-14 10:57:03",
"update_time": "2019-08-14 10:57:03"
},
{
"id": "2",
"name": "Victor Martinez",
"email": "ngallagher@test.x-formation.com",
"customer_id": "1",
"creation_time": "2019-08-14 10:57:03",
"update_time": "2019-08-14 10:57:03"
}
],
"CustomTags": [
{
"tag_name": "custom_tag_1",
"value": "Gouldton",
"creation_time": "2019-08-14 10:57:03",
"update_time": "2019-08-14 10:57:03"
},
{
"tag_name": "custom_tag_2",
"value": "Idaho",
"creation_time": "2019-08-14 10:57:03",
"update_time": "2019-08-14 10:57:03"
}
]
}
]