Create job
Create a job for a customer with line items and, optionally, a schedule and a dispatched team member.
POST https://cotlet.dev/api/v1/housecall-pro/customers/{customer_id}/jobs
Creates a job for a customer and an address with service line items, notes and tags. Leave schedule out to save it unscheduled. When you schedule it, you must also dispatch at least one team member, the same rule as the New Job page. The call returns the job and the invoice that goes with it. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_id string required | string | Customer ID from list_customers. |
| address_id string | string | Service address from list_customers. Default: the first address. |
| line_items object[] required | object[] | Lines to add: name, quantity and unit_price, or price_book_id from list_price_book. A line that names a price book item uses its price unless you set unit_price. |
| notes string | string | Job notes. |
| scheduled_start datetime | datetime | Start time. Needs team_member_ids. |
| team_member_ids string[] | string[] | Team members to dispatch. Required when scheduled_start is set. |
Request
curl -X POST https://cotlet.dev/api/v1/housecall-pro/customers/customer_8c41d2/jobs \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"line_items":["line items"]}' result = client.call("housecall-pro", "create_job", {"customer_id":"customer_8c41d2","line_items":["line items"]}) const result = await cotlet.call('housecall-pro', 'create_job', {"customer_id":"customer_8c41d2","line_items":["line items"]}); cotlet call housecall-pro create_job --data '{"customer_id":"customer_8c41d2","line_items":["line items"]}' Example response
{
"job_id": "job_91d3a7",
"customer_id": "cus_c710e3",
"status": "unscheduled",
"total": 8400,
"invoice_id": "inv_4b2e00"
}