Create a quote

Create a quote for services at a location, as a draft.

POST https://cotlet.dev/api/v1/servicetrade/locations/{location_id}/quotes

write Confirm

Returns the new quote with its number and status. A draft quote is not sent to the customer; use submit_quote for that. Prices come from the contract and line items in ServiceTrade. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_quote
NameTypeDescription
location_id integer required integer Location where the work is done, from list_locations.
name string required string Quote name.
description string required string Description of the work to be quoted.
job_type string required string A ServiceTrade job type for the job the quote creates, such as repair, inspection_repair or replacement.
service_request_ids array required array Services the quote covers, from list_service_requests. They must belong to the location.
status string string One of draft, new.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/servicetrade/locations/5120/quotes \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Repair: fire pump controller, Harbor Point Mall","description":"Replace the failed pressure switch and retest the fire pump controller.","job_type":"repair","service_request_ids":[77302],"status":"draft"}'
Python
result = client.call("servicetrade", "create_quote", {"location_id":5120,"name":"Repair: fire pump controller, Harbor Point Mall","description":"Replace the failed pressure switch and retest the fire pump controller.","job_type":"repair","service_request_ids":[77302],"status":"draft"})
Node.js
const result = await cotlet.call('servicetrade', 'create_quote', {"location_id":5120,"name":"Repair: fire pump controller, Harbor Point Mall","description":"Replace the failed pressure switch and retest the fire pump controller.","job_type":"repair","service_request_ids":[77302],"status":"draft"});
CLI
cotlet call servicetrade create_quote --data '{"location_id":5120,"name":"Repair: fire pump controller, Harbor Point Mall","description":"Replace the failed pressure switch and retest the fire pump controller.","job_type":"repair","service_request_ids":[77302],"status":"draft"}'

Example response

JSON

{
  "quote_id": 20418,
  "ref_number": "20418",
  "name": "Repair: fire pump controller, Harbor Point Mall",
  "status": "draft",
  "location": {
    "id": 5120,
    "name": "Harbor Point Mall"
  },
  "service_request_ids": [
    77302
  ]
}

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.