pricebook.taskCost
What a flat rate task costs the shop: its parts at cost plus estimated labor minutes at the shop's default hourly cost, and the margin at the price and at the member price (owner or office, needs see_costs). Parts or a labor rate with no cost set are listed in missing.
| |
|---|
| Who | Agents can call this |
| REST | GET /v1/pricebook/tasks/cost |
| MCP tool | pricebook_taskCost |
| Writes | no |
| Area | Quotes (unlimited) |
When to use it
A flat rate task is a price book item with kind task: one price for the whole job, with an optional task_code, member_price_minor for customers on an active maintenance plan, est_minutes, warranty_note and parts (materials from the price book with a quantity, used for costing only; they do not take stock). Save tasks with pricebook.saveItem, or bring a book in with imports.historyPreview and imports.historyRun using kind flat_rate (presets jobber and housecall_pro; their column names are our best guess, so check the suggested mapping).
What to tell the owner
Tell them what you found in plain words. Don't read back raw fields.
| Field | Type | Required |
|---|
item_id | string (uuid) | yes |
Example
GET https://doingwork.work/v1/pricebook/tasks/cost?item_id=00000000-0000-4000-8000-000000000000
Output
| Field | Type | Always there |
|---|
item_id | string (uuid) | yes |
task_code | ['string', 'null'] | yes |
name | string | yes |
price_minor | integer | yes |
member_price_minor | ['integer', 'null'] | yes |
est_minutes | ['integer', 'null'] | yes |
labor_rate_per_hour_minor | ['integer', 'null'] | yes |
labor_cost_minor | ['integer', 'null'] | yes |
parts_cost_minor | integer | yes |
parts | array | yes |
parts[].item_id | string (uuid) | yes |
parts[].name | string | yes |
parts[].quantity | number | yes |
parts[].unit_cost_minor | ['integer', 'null'] | yes |
parts[].cost_minor | ['integer', 'null'] | yes |
parts[].archived | boolean | yes |
total_cost_minor | integer | yes |
margin_minor | integer | yes |
margin_percent | ['number', 'null'] | yes |
member_margin_minor | ['integer', 'null'] | yes |
member_margin_percent | ['number', 'null'] | yes |
missing | array | yes |
{
"item_id": "00000000-0000-4000-8000-000000000000",
"task_code": "...",
"name": "Ruiz Plumbing",
"price_minor": 50000,
"member_price_minor": "...",
"est_minutes": "...",
"labor_rate_per_hour_minor": "...",
"labor_cost_minor": "...",
"parts_cost_minor": 50000,
"parts": [
{
"item_id": "00000000-0000-4000-8000-000000000000",
"name": "Ruiz Plumbing",
"quantity": "...",
"unit_cost_minor": "...",
"cost_minor": "...",
"archived": true
}
],
"total_cost_minor": 50000,
"margin_minor": 50000,
"margin_percent": "...",
"member_margin_minor": "...",
"member_margin_percent": "...",
"missing": [
"..."
]
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |