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.

WhoAgents can call this
RESTGET /v1/pricebook/tasks/cost
MCP toolpricebook_taskCost
Writesno
AreaQuotes (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.

Input

FieldTypeRequired
item_idstring (uuid)yes

Example

GET https://doingwork.work/v1/pricebook/tasks/cost?item_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
item_idstring (uuid)yes
task_code['string', 'null']yes
namestringyes
price_minorintegeryes
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_minorintegeryes
partsarrayyes
parts[].item_idstring (uuid)yes
parts[].namestringyes
parts[].quantitynumberyes
parts[].unit_cost_minor['integer', 'null']yes
parts[].cost_minor['integer', 'null']yes
parts[].archivedbooleanyes
total_cost_minorintegeryes
margin_minorintegeryes
margin_percent['number', 'null']yes
member_margin_minor['integer', 'null']yes
member_margin_percent['number', 'null']yes
missingarrayyes
{
  "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

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.