List service requests
List the services on jobs and quotes by status, job, location or deficiency.
GET https://cotlet.dev/api/v1/servicetrade/service-requests
read
Returns the description, status, service line, location and the deficiency each service addresses. A quote is made from these ids, and an appointment can carry them.
Parameters
| Name | Type | Description |
|---|---|---|
| status string | string | One or more of open, in_progress, closed, void, canceled, pending, comma-separated. |
| job_id integer | integer | Only services on this job. |
| location_id integer | integer | Only services at this location. |
| deficiency_id integer | integer | Only services meant to repair this deficiency, from list_deficiencies. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/servicetrade/service-requests \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("servicetrade", "list_service_requests") const result = await cotlet.call('servicetrade', 'list_service_requests'); cotlet call servicetrade list_service_requests Example response
{
"service_requests": [
{
"id": 77302,
"description": "Replace failed pressure switch on fire pump controller",
"status": "open",
"service_line": "Fire protection",
"location": {
"id": 5120,
"name": "Harbor Point Mall"
},
"deficiency_id": 9031
}
],
"next_cursor": null
}