inspections
Safety module · 5 operations
List inspection rows
GET/inspections
An inspection performed from a template, with sign-off. Returns a cursor page of inspection rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.
Create an inspection
POST/inspections
An inspection performed from a template, with sign-off. Creates an inspection. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
Get an inspection
GET/inspections/{id}
An inspection performed from a template, with sign-off. Returns one inspection with its `ETag`. A inspection the caller may not see returns 404.
Update an inspection
PATCH/inspections/{id}
An inspection performed from a template, with sign-off. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.
Sign off an inspection
POST/inspections/{id}/sign-off
Signs off the inspection. Every item needs a result first. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.