permitRequirements
Safety module · 5 operations
List permit requirement rows
GET/permit-requirements
A permit requirement generated by the jurisdiction permit engine. An unpopulated jurisdiction returns no answer. Returns a cursor page of permit requirement rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.
Get a permit requirement
GET/permit-requirements/{id}
A permit requirement generated by the jurisdiction permit engine. An unpopulated jurisdiction returns no answer. Returns one permit requirement with its `ETag`. A permit requirement the caller may not see returns 404.
Run the permit engine
POST/permit-requirements/generate
Runs the jurisdiction permit engine for a project and writes its permit requirements. An unpopulated jurisdiction returns a 422 `NO_ANSWER` refusal; it never passes. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
Transition the permit state
POST/permit-requirements/{id}/transitions
Moves the permit lifecycle to another state through its transition RPC, which writes the transition ledger. Uses compare-and-set on `expected_state`; a disallowed transition returns a 422 refusal. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
Track a permit requirement
POST/permit-requirements/{id}/track
Opens the Permit record that tracks the requirement (app.track_permit_requirement), titled with the canon permit, in one transaction. A requirement already tracked returns a 422 `permit_requirement_tracked` refusal. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.