List locations
List customer locations by name, company or status.
GET https://cotlet.dev/api/v1/servicetrade/locations
read
Returns the id, name, reference number, address and status of each location. Use the id in list_jobs, list_deficiencies and create_quote.
Parameters
| Name | Type | Description |
|---|---|---|
| name string | string | Part of the location name or store number. |
| company_id integer | integer | Only locations of this company. |
| status string | string | One of active, inactive, pending. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/servicetrade/locations \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("servicetrade", "list_locations") const result = await cotlet.call('servicetrade', 'list_locations'); cotlet call servicetrade list_locations Example response
{
"locations": [
{
"id": 5120,
"name": "Harbor Point Mall",
"ref_number": "HPM",
"address": {
"street": "100 Harbor Point Rd",
"city": "Baltimore",
"state": "MD",
"postal_code": "21230"
},
"status": "active"
}
],
"next_cursor": null
}