v1
BOM Tree

Get Sufficiency

Changed on

The context wheel: how much of what this job needs known is on file.

With question (the message the person just sent in the chat), it is how much of what answering THAT question needs is on file: the ledger as the baseline, plus the tree or the material lines where the question needs them (bom_sufficiency.get_or_compute).

NOT gated on work_streams, unlike every other route in this file. The wheel renders in the AI chat panel and the spec is that anyone who can open that panel can see it (user, 2026-10-14); the chat routes themselves carry get_current_user and no module permission at all. Gating this on work_streams would hide the wheel from exactly the people the panel is for. The shop check below is what stops it leaking: _resolve_deliverable_scope 404s a job belonging to another shop, so this is no more readable than the chat it sits in.

Keyed on the DELIVERABLE, which is the grain the chat panel opens on: one id covers a quote and a project, and the panel does not have to know which kind of job it is attached to in order to ask.

force=true is the on-demand refresh. An ordinary call already recomputes when the inputs have changed, so nothing needs to invalidate this on a source change; force is for a user who wants the number re-asked now.

204 when there is nothing to show, which happens only if a job has never been estimated AND the model pass fails. The wheel renders nothing in that case rather than a 0%, because "we could not work it out" and "we know nothing about this job" are different answers and the second is alarming.

get/api/v1/bom/sufficiency

Request

  • Base URL
    https://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Query parameters

deliverable_id, string required
force, boolean
question, string nullable

Response

Successful Response

unknown required

Changes