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

Parameters: list_locations
NameTypeDescription
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
curl https://cotlet.dev/api/v1/servicetrade/locations \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("servicetrade", "list_locations")
Node.js
const result = await cotlet.call('servicetrade', 'list_locations');
CLI
cotlet call servicetrade list_locations

Example response

JSON

{
  "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
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.