Case Management API Reference
Case management: referrals, investigations, cases, case plans, contacts, and court orders — the system of record for casework.
Endpoints
AFCARS Export
Service-to-service: one page of AFCARS person rows (person facts, parent cells and child ledger rows) for the keys craig-reporting names
POST /v1/cases/persons/afcars-export
The body names the keys: children (a person as a child member of one case) are keys 0..children.len() in request order, adults (a person in one asserted adult role) follow. Send the SAME body bar after / limit on every page: the cursor binds it. The window is from (inclusive) to to (exclusive), local midnights on the jurisdiction clock; the period end is the local date before to. as_of is at least five minutes in the past. Rows run by (key_index, kind ordinal, row id); next is the last row’s opaque cursor, null on the last page. A missing person, or a child key whose person was not a child member of its case at as_of (no child membership added at or before it), is one not_found row that releases nothing. Otherwise a key yields a person row (a child’s carries its case’s admin_unit, its date of birth and the abandoned-estimate indicator; an adult’s the birth years; an adoptive parent’s also its date of birth) and its demographic_window rows — a child’s in force at the period end, an adult’s at each anchor, each distinct window once per key. A child key then yields its ledger rows (an adult key none): exactly one parent_cells row (the (c) cells at the period end, from its parent links, its parentage row, the parents' birth years and tribal membership, and each parent’s rights row in force then); its parenting_window, prior_permanency_window, assistance_window and sibling_count_window rows in force at the period end; its icwa_window rows in force at the period end or at one of its anchors, each once; every permanency_plan and review_event row dated on or before the period end; each sibling_link in force at the period end naming the child; and one visit row per contact under the key’s case existing at as_of whose visited child and occurred_at, as they stood at as_of, are the child and before to. As-of classes: (1) every ledger (demographics, the child facts, parent links, parentage, siblings, parental rights, permanency plans, reviews) reads as at as_of: a row recorded after as_of or retired by it is absent, a retirement after as_of reads live, and a window closed after as_of reads open (effective_until null); (2) a contact exists at as_of by its created_at / deleted_at, and its occurred_at, visited_child_id and location read as they stood at as_of (the history starts with this release: an edit made before it kept no prior value); a child membership counts when added at or before as_of; a case’s admin_unit is fixed when the case is created; (3) only persons (a parent’s birth_year included) reads CURRENT: a correction landing mid-walk answers on the pages read after it, so it is the one input where reads at one as_of can disagree. Never a name, an SSN or its digest, a note, an actor id or a recording instant. Each page that releases a person stages exactly one case.person_pii_exported audit before the body is answered, naming each row’s key person (never the other child a sibling_link names) plus the parents of each parent_cells row on that page. Cache-Control: no-store. Service-only: refused unless the caller is the bare craig-reporting service principal.
| Field | Type | Required | Description |
|---|---|---|---|
adults |
array of AfcarsAdultKey |
Yes |
The adult keys, following the children. REQUIRED: send |
after |
string (optional) |
No |
The previous page’s |
as_of |
datetime |
Yes |
The ledger read instant, at least five minutes in the past (RFC 3339). |
children |
array of AfcarsChildKey |
Yes |
The child keys, keys |
from |
datetime |
Yes |
The window’s first instant, inclusive: a local midnight (RFC 3339). |
limit |
integer (optional) |
No |
Rows per page, |
to |
datetime |
Yes |
The window’s end, exclusive: a local midnight after |
-
200: One page of rows;
next= the last row’s opaque cursor when rows remain, null on exhaustion -
400: The body is not syntactically valid JSON (the extractor)
-
401: Missing or invalid bearer
-
403: Not a service caller, not the craig-reporting service identity, or a delegated (actor) token
-
422:
validation-failed: a JSON data error (an unknown field, a wrong type, a missing key), or a check naming the field —from/tonot a local midnight,fromnot beforeto,as_ofless than five minutes in the past,limitoutside 1..=1000, over 500 keys (children), over 10000 anchors (anchors), a repeated key (children.{i}/adults.{i}), anchors not distinct or after the period end (children.{i}.anchors/adults.{i}.anchors), or a malformed, foreign or out-of-rangeaftercursor -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Case Plans
List case plans
GET /v1/cases/cases/{id}/plans
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
-
200: Case plans
-
401: Unauthorized
-
403: Forbidden
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Create a case plan
POST /v1/cases/cases/{id}/plans
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the case path id) replays
the original plan; a different intent under the same id is a
409 |
needs |
string (optional) |
No |
Free-form description of the family’s needs. A NUL (U+0000) is a 422
|
review_due_at |
datetime (optional) |
No |
Date by which the plan must be next reviewed. |
strengths |
string (optional) |
No |
Free-form description of the family’s strengths. A NUL (U+0000) is a
422 |
-
200: Case plan created (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
409: client_request_id claimed by a different operation, or replayed entity gone; or the parent case is not open — problem type
case-closed -
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in
strengthsorneeds(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update a case plan
PUT /v1/cases/plans/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case plan ID |
| Field | Type | Required | Description |
|---|---|---|---|
needs |
string (optional) |
No |
New needs description. A NUL (U+0000) is a 422 |
review_due_at |
datetime (optional) |
No |
New review-due date. |
status |
string (optional) |
No |
New status: one of |
strengths |
string (optional) |
No |
New strengths description. A NUL (U+0000) is a 422
|
-
200: Case plan updated
-
400: Invalid status transition, or activating without review_due_at —
plan-review-date-required -
401: Unauthorized
-
403: Forbidden
-
404: Case plan not found
-
409: Concurrent modification — re-read and retry; or the parent case is not open — problem type
case-closed -
422: A body field whose value does not deserialize, e.g. a malformed
review_due_at(validation-failed; the field is named, the value never echoed), orstrengths/needsover 4000 orstatusover 32 bytes (validation-failed), or a NUL (U+0000) instrengthsorneeds(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Approve (countersign) a case plan
PUT /v1/cases/plans/{id}/approve
Supervisor approval — sets plan to active and supersedes any other active plan on the case.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case plan ID |
-
200: Case plan approved
-
400: Missing review anchor —
plan-review-date-required: set review_due_at before approving -
401: Unauthorized
-
403: Forbidden — supervisor role required
-
404: Case plan not found or not in draft status
-
409: Parent case is not open — problem type
case-closed -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List tasks for a case plan
GET /v1/cases/plans/{id}/tasks
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case plan ID |
-
200: Tasks
-
401: Unauthorized
-
403: Forbidden
-
404: Case plan not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Add a task to a case plan
POST /v1/cases/plans/{id}/tasks
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case plan ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the plan path id) replays
the original task; a different intent under the same id is a
409 |
description |
string |
Yes |
Free-form task description. A NUL (U+0000) is a 422
|
due_at |
datetime (optional) |
No |
Task due date. |
responsible |
enum (parent, agency, provider, other) |
Yes |
Who is responsible for a case plan task. |
-
200: Task created (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden
-
404: Case plan not found
-
409: client_request_id claimed by a different operation, or replayed entity gone; or the parent case is not open — problem type
case-closed -
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in
description(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a task by ID
GET /v1/cases/tasks/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Task ID |
-
200: Task
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update a task
PUT /v1/cases/tasks/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Task ID |
| Field | Type | Required | Description |
|---|---|---|---|
completed_at |
datetime (optional) |
No |
Timestamp the task was completed. |
status |
string (optional) |
No |
New status: one of |
-
200: Task updated
-
400: Invalid status transition
-
401: Unauthorized
-
403: Forbidden
-
404: Task not found
-
409: Concurrent modification — re-read and retry; or the parent case is not open — problem type
case-closed -
422: A body field whose value does not deserialize, e.g. a malformed
completed_at(validation-failed; the field is named, the value never echoed), or astatusover 32 bytes (validation-failed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Delete a task
DELETE /v1/cases/tasks/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Task ID |
-
204: Task deleted
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Parent case is not open — problem type
case-closed -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Cases
Batch-lookup case numbers and person names by IDs
POST /v1/cases/batch-lookup
| Field | Type | Required | Description |
|---|---|---|---|
case_ids |
array of UUID |
No |
Case UUIDs to resolve names for. |
person_ids |
array of UUID |
No |
Person UUIDs to resolve names for. |
-
200: Resolved names. A case the caller cannot Read is dropped from
casesand counted inunauthorized_count(partial_auth); a person the caller cannot Read (the check the single-person GET makes) is absent frompersonsexactly as an unknown id is, and is not counted -
400: Too many IDs
-
401: Unauthorized
-
403: Forbidden
-
422: A body field whose value does not deserialize, e.g. a non-UUID entry in
case_ids(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List cases
GET /v1/cases/cases
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
worker |
query |
No |
Filter by assigned worker ( |
status |
query |
No |
Filter by status: open, closed, transferred. A NUL (U+0000), which
the query’s |
admin_unit |
query |
No |
Filter by administrative unit (county / region). When the deployment’s
jurisdiction is a US state the value passes the create belt:
any casing of a known unit filters on its canonical name, and an
unknown name is the typed 400 |
search |
query |
No |
Substring search across |
person_id |
query |
No |
Filter to cases whose |
sort_by |
query |
No |
Sort column: |
sort_dir |
query |
No |
Sort direction: asc or desc (default: desc). |
-
200: Paginated cases
-
400:
invalid-enum-valueonadmin_unit— the deployment’s jurisdiction is a US state and?admin_unit=names no administrative unit in it (the lookup is case-insensitive and a known unit filters on its canonical name); a malformed query parameter (e.g. a non-UUIDperson_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
422: A filter over its length cap:
status/sort_by/sort_dir32,admin_unit100,search500 bytes; or a NUL (U+0000) instatusorsearch, or inadmin_unitwhere the jurisdiction has no US unit table, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failednaming the parameter, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Open a case
POST /v1/cases/cases
| Field | Type | Required | Description |
|---|---|---|---|
admin_unit |
string |
Yes |
Administrative unit (county / region) owning the case. When the
deployment’s jurisdiction is a US state / territory the name is
validated against its administrative-unit list (case-insensitive)
and the canonical name is stored and echoed — the case number
derives from it; an unknown name is the typed 400
|
assigned_worker |
UUID |
Yes |
Subject id ( |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent replays the original case (the
case number is generated ONLY on the first execution); a
different intent under the same id is a 409
|
icwa_flag |
boolean |
No |
|
investigation_id |
UUID (optional) |
No |
Investigation that substantiated the case (optional for direct filing). |
supervisor |
UUID (optional) |
No |
Supervisor |
-
200: Case created (or replayed — same client_request_id + intent; the case number is generated only on the first execution)
-
400:
invalid-enum-valueonadmin_unit— the deployment’s jurisdiction is a US state and no administrative unit of that name exists in it (the lookup is case-insensitive and the stored value is the canonical name) -
401: Unauthorized
-
403: Forbidden
-
409: client_request_id claimed by a different operation, replayed entity gone, or case-number retries exhausted
-
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in the free-text
admin_unitof a jurisdiction without a US unit table (validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s assistance row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/cases/{case_id}/children/{child_id}/assistance-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400:
child-not-in-case(the child never held a child-role household row of the case); a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete assistance statement for a child of the case (a change, or a backfill when effective_until is set)
POST /v1/cases/cases/{case_id}/children/{child_id}/assistance-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
source_chafee_program |
SourceApplies (optional) |
No |
Source chafee program |
source_other |
SourceApplies (optional) |
No |
Source other |
source_state_tribal_adoption_assistance |
SourceApplies (optional) |
No |
Source state tribal adoption assistance |
source_state_tribal_foster_care |
SourceApplies (optional) |
No |
Source state tribal foster care |
source_title_iv_a_tanf |
SourceApplies (optional) |
No |
Source title iv a tanf |
source_title_iv_b |
SourceApplies (optional) |
No |
Source title iv b |
source_title_iv_e_adoption_subsidy |
SourceApplies (optional) |
No |
Source title iv e adoption subsidy |
source_title_iv_e_guardianship_assistance |
SourceApplies (optional) |
No |
Source title iv e guardianship assistance |
support_status |
SupportStatus (optional) |
No |
Support status |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted),
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or the eight source answers not all present when
support_statusischild_has_received_support_assistance, or any present otherwise) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live assistance row of the child in force at any point of a period (newest first)
GET /v1/cases/cases/{case_id}/children/{child_id}/assistance-facts/history
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
child-not-in-case(the child never held a child-role household row of the case), orledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open assistance row’s window
POST /v1/cases/cases/{case_id}/children/{child_id}/assistance-facts/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(effective_until not after the row’s effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, another case’s or child’s, or not open — nothing written) -
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live assistance row (supersede it; omitted bounds are copied from it) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/assistance-facts/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
source_chafee_program |
SourceApplies (optional) |
No |
Source chafee program |
source_other |
SourceApplies (optional) |
No |
Source other |
source_state_tribal_adoption_assistance |
SourceApplies (optional) |
No |
Source state tribal adoption assistance |
source_state_tribal_foster_care |
SourceApplies (optional) |
No |
Source state tribal foster care |
source_title_iv_a_tanf |
SourceApplies (optional) |
No |
Source title iv a tanf |
source_title_iv_b |
SourceApplies (optional) |
No |
Source title iv b |
source_title_iv_e_adoption_subsidy |
SourceApplies (optional) |
No |
Source title iv e adoption subsidy |
source_title_iv_e_guardianship_assistance |
SourceApplies (optional) |
No |
Source title iv e guardianship assistance |
support_status |
SupportStatus (optional) |
No |
Support status |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(the resolved window is unordered), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or the eight source answers not all present when
support_statusischild_has_received_support_assistance, or any present otherwise) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live assistance row entered in error (no successor) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/assistance-facts/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live custody episode entered in error: the episode and, in the same transaction, every live row of it retire (rows episode_retracted) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/custody-episodes/{episode_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
episode_id |
path |
Yes |
The live custody episode acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired episode (or replayed — same client_request_id + intent)
-
400:
child-not-in-case -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s update authority
-
404: Case not found, or custody episode not found (absent, already retired, or another case’s or child’s — nothing written)
-
409:
idempotency-conflict/ replayed entity gone -
422: Validation failure (a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free), orlegal-status-vocabulary-missing -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s ICWA row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/cases/{case_id}/children/{child_id}/icwa-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400:
child-not-in-case(the child never held a child-role household row of the case); a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete ICWA statement for a child of the case (a change, or a backfill when effective_until is set)
POST /v1/cases/cases/{case_id}/children/{child_id}/icwa-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
active_efforts |
YesNo (optional) |
No |
Active efforts |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
court_determination |
IcwaCourtDetermination (optional) |
No |
Court determination |
determination_tribe |
string (optional) |
No |
2028 (b)(6)(iii) the tribe the court determined; only when
|
determined_on |
date (optional) |
No |
2028 (b)(6)(ii) the date of the court’s determination; only when
|
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
icwa_applies |
YesNoUnknown (optional) |
No |
Icwa applies |
icwa_applies_notified_on |
date (optional) |
No |
2022 (b)(5)(ii) the date the agency was notified that ICWA applies;
only when |
inquiries_made |
YesNo (optional) |
No |
Inquiries made |
inquiry_child |
YesNo (optional) |
No |
Inquiry child |
inquiry_domicile_or_residence |
YesNo (optional) |
No |
Inquiry domicile or residence |
inquiry_extended_family |
YesNo (optional) |
No |
Inquiry extended family |
inquiry_father |
InquiryFather (optional) |
No |
Inquiry father |
inquiry_indian_custodian |
InquiryIndianCustodian (optional) |
No |
Inquiry indian custodian |
inquiry_legal_guardian |
InquiryLegalGuardian (optional) |
No |
Inquiry legal guardian |
inquiry_mother |
InquiryMother (optional) |
No |
Inquiry mother |
parent_or_indian_custodian_notified_before_first_proceeding |
YesNo (optional) |
Yes |
Parent or indian custodian notified before first proceeding |
reason_to_know |
YesNo (optional) |
No |
Reason to know |
reason_to_know_discovered_on |
date (optional) |
No |
2028 (b)(4)(iv) the date the reason to know was discovered; only when
|
tribe_notified |
YesNo (optional) |
No |
Tribe notified |
tribe_notified_before_first_proceeding |
YesNo (optional) |
Yes |
Tribe notified before first proceeding |
tribe_order_adoptive |
YesNo (optional) |
Yes |
Tribe order adoptive |
tribe_order_adoptive_on |
date (optional) |
Yes |
The date the Tribe established its adoptive-placement order: present exactly
when |
tribe_order_foster_care |
YesNo (optional) |
Yes |
Tribe order foster care |
tribe_order_foster_care_on |
date (optional) |
Yes |
The date the Tribe established its foster-care / pre-adoptive order: present
exactly when |
tribes_notified |
string (optional) |
No |
2028 (b)(5)(ii) the tribe(s) notified; only when |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (an effective bound, or a discovery, notice, determination or Tribe-order date, after today) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted),
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, a missing
tribe_notified_before_first_proceeding,parent_or_indian_custodian_notified_before_first_proceeding,tribe_order_foster_care,tribe_order_foster_care_on,tribe_order_adoptiveortribe_order_adoptive_onkey (each is required;null= unanswered), a dependent answered without its gate —reason_to_know_discovered_onunlessreason_to_knowisyes,icwa_applies_notified_onunlessicwa_appliesisyes,tribes_notifiedunlesstribe_notifiedisyes,determined_on,determination_tribe,active_efforts,tribe_order_foster_careortribe_order_adoptiveunlesscourt_determinationisyes_icwa_applies, a Tribe-order date unless its order isyes(an unanswered gate forbids its dependents; a gate may stand without them) — atribe_notified_before_first_proceedingofyesunlesstribe_notifiedisyes, an order of preferenceyeswithout its date (on every record and correction; a stored order without one stays readable and closable), or an empty or over-255-character tribe name); or a NUL (U+0000) intribes_notifiedordetermination_tribe(validation-failednaming the bare field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live ICWA row of the child in force at any point of a period (newest first)
GET /v1/cases/cases/{case_id}/children/{child_id}/icwa-facts/history
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
child-not-in-case(the child never held a child-role household row of the case), orledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open ICWA row’s window
POST /v1/cases/cases/{case_id}/children/{child_id}/icwa-facts/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(effective_until not after the row’s effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, another case’s or child’s, or not open — nothing written) -
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live ICWA row (supersede it; omitted bounds are copied from it) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/icwa-facts/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
active_efforts |
YesNo (optional) |
No |
Active efforts |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
court_determination |
IcwaCourtDetermination (optional) |
No |
Court determination |
determination_tribe |
string (optional) |
No |
2028 (b)(6)(iii) the tribe the court determined; only when
|
determined_on |
date (optional) |
No |
2028 (b)(6)(ii) the date of the court’s determination; only when
|
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
icwa_applies |
YesNoUnknown (optional) |
No |
Icwa applies |
icwa_applies_notified_on |
date (optional) |
No |
2022 (b)(5)(ii) the date the agency was notified that ICWA applies;
only when |
inquiries_made |
YesNo (optional) |
No |
Inquiries made |
inquiry_child |
YesNo (optional) |
No |
Inquiry child |
inquiry_domicile_or_residence |
YesNo (optional) |
No |
Inquiry domicile or residence |
inquiry_extended_family |
YesNo (optional) |
No |
Inquiry extended family |
inquiry_father |
InquiryFather (optional) |
No |
Inquiry father |
inquiry_indian_custodian |
InquiryIndianCustodian (optional) |
No |
Inquiry indian custodian |
inquiry_legal_guardian |
InquiryLegalGuardian (optional) |
No |
Inquiry legal guardian |
inquiry_mother |
InquiryMother (optional) |
No |
Inquiry mother |
parent_or_indian_custodian_notified_before_first_proceeding |
YesNo (optional) |
Yes |
Parent or indian custodian notified before first proceeding |
reason_to_know |
YesNo (optional) |
No |
Reason to know |
reason_to_know_discovered_on |
date (optional) |
No |
2028 (b)(4)(iv) the date the reason to know was discovered; only when
|
tribe_notified |
YesNo (optional) |
No |
Tribe notified |
tribe_notified_before_first_proceeding |
YesNo (optional) |
Yes |
Tribe notified before first proceeding |
tribe_order_adoptive |
YesNo (optional) |
Yes |
Tribe order adoptive |
tribe_order_adoptive_on |
date (optional) |
Yes |
The date the Tribe established its adoptive-placement order: present exactly
when |
tribe_order_foster_care |
YesNo (optional) |
Yes |
Tribe order foster care |
tribe_order_foster_care_on |
date (optional) |
Yes |
The date the Tribe established its foster-care / pre-adoptive order: present
exactly when |
tribes_notified |
string (optional) |
No |
2028 (b)(5)(ii) the tribe(s) notified; only when |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(the resolved window is unordered), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (an effective bound, or a discovery, notice, determination or Tribe-order date, after today) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, a missing
tribe_notified_before_first_proceeding,parent_or_indian_custodian_notified_before_first_proceeding,tribe_order_foster_care,tribe_order_foster_care_on,tribe_order_adoptiveortribe_order_adoptive_onkey (each is required;null= unanswered), a dependent answered without its gate —reason_to_know_discovered_onunlessreason_to_knowisyes,icwa_applies_notified_onunlessicwa_appliesisyes,tribes_notifiedunlesstribe_notifiedisyes,determined_on,determination_tribe,active_efforts,tribe_order_foster_careortribe_order_adoptiveunlesscourt_determinationisyes_icwa_applies, a Tribe-order date unless its order isyes(an unanswered gate forbids its dependents; a gate may stand without them) — atribe_notified_before_first_proceedingofyesunlesstribe_notifiedisyes, an order of preferenceyeswithout its date (on every record and correction; a stored order without one stays readable and closable), or an empty or over-255-character tribe name); or a NUL (U+0000) intribes_notifiedordetermination_tribe(validation-failednaming the bare field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live ICWA row entered in error (no successor) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/icwa-facts/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s legal-status history in the case, latest first (effective_on, then the chain root, then id), or with as_of the status in force on that date (the last live row on or before it)
GET /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date. Absent = the history: every live row, current first
by the ledger’s order (each route states it; |
-
200: The live rows (an empty array when none)
-
400:
child-not-in-case; a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s read authority
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a legal status for a child of the case, stating its intent: an in-custody status without episode_id opens an episode, with episode_id is a change in it; a not-in-custody status with episode_id closes it, without one is a history row; until records a closed historical episode in one act
POST /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The act’s idempotency key. |
effective_on |
date |
Yes |
The event date (on or before today). |
episode_id |
UUID (optional) |
No |
The open episode the row belongs to; absent on an open or a history row. |
note |
string (optional) |
No |
A free-text note on the row. A NUL (U+0000) is a 422
|
status_token |
string |
Yes |
A token of the deployment’s legal-status vocabulary. |
until |
LegalStatusUntil (optional) |
No |
Until |
-
201: Recorded — the act’s first row and its episode after the act (the same answer on a replay of the same client_request_id + intent)
-
400:
child-not-in-case, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (effective_on or until.effective_on after today) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s update authority
-
404: Case not found
-
409:
case-closed(an open, change, close oruntilrecord on a closed or transferred case; a history row is admitted),custody-episode-overlap(the new episode overlaps a live episode of the child, this case or another),custody-episode-open(a history row while the child has an open episode in this case — the detail names it),custody-row-out-of-order(a close dated before the episode’s in-custody rows, or a history row dated inside a live episode),custody-not-open(the named episode is closed, retired, or another case’s or child’s), oridempotency-conflict/ replayed entity gone -
422: Validation failure (a missing client_request_id, an unknown field, a status_token or note out of bounds,
untilwith episode_id,untilon a not-in-custody status, an in-custody until.status_token, until.effective_on before effective_on, or a NUL (U+0000) innote—validation-failednamingnote, value-free),legal-status-vocabulary-missing(the jurisdiction declares no vocabulary — nothing written), orlegal-status-unknown(status_token or until.status_token outside the vocabulary) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live legal-status row: the complete corrected statement supersedes it within its custody class and keeps its episode; the episode’s instants follow — admitted on a closed case and a closed episode
POST /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The act’s idempotency key. |
effective_on |
date |
Yes |
The restated event date (on or before today). |
note |
string (optional) |
No |
A free-text note on the successor. A NUL (U+0000) is a 422
|
status_token |
string |
Yes |
A token of the vocabulary, of the predecessor’s custody class. |
-
200: Successor row and its episode after the act (or replayed — same client_request_id + intent)
-
400:
child-not-in-caseorledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s update authority
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409:
custody-row-out-of-order,custody-episode-overlap(the moved instants overlap another live episode of the child), oridempotency-conflict/ replayed entity gone -
422: Validation failure (including a NUL (U+0000) in
note—validation-failednamingnote, value-free),legal-status-vocabulary-missing,legal-status-unknown, orcustody-class-flip(the token’s custody class differs from the row’s — retract and record instead) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live legal-status row entered in error: a history row or one of several in-custody rows retires and the instants follow; the episode’s last in-custody row retracts the whole episode (every live row retires episode_retracted); a closing row is refused — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row and its episode after the act (or replayed — same client_request_id + intent)
-
400:
child-not-in-case -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s update authority
-
404: Case not found, or
ledger-row-not-found(absent, retired, or another case’s or child’s — nothing written) -
409:
custody-close-not-retirable(the episode’s closing row — correct the close or retract the episode), oridempotency-conflict/ replayed entity gone -
422: Validation failure (a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free), orlegal-status-vocabulary-missing -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Submit a child’s Initial Medicaid Application while the child is in an open custody episode of the case — citizenship_status is encrypted at rest
POST /v1/cases/cases/{case_id}/children/{child_id}/medicaid-applications
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case) |
| Field | Type | Required | Description |
|---|---|---|---|
citizenship_status |
string |
Yes |
A |
client_request_id |
UUID |
Yes |
The act’s idempotency key. |
legal_admin_unit |
string |
Yes |
The legal administrative unit (county) the application is filed in. A
jurisdiction with no unit table stores it as sent, where a NUL (U+0000)
is a 422 |
prior_medical_assistance |
string |
Yes |
A |
-
201: Submitted (the same answer on a replay of the same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s update authority
-
404: Case not found
-
409:
custody-not-open(the child has no open custody episode in this case),medicaid-application-exists(the open custody episode already holds a live application), oridempotency-conflict/ replayed entity gone -
422:
validation-failed(an unknown field such as submitted_on, a length, a citizenship_status / prior_medical_assistance token outside its vocabulary, or a legal_admin_unit not of the deployment’s state, or a NUL (U+0000) in the free-text legal_admin_unit of a jurisdiction without a US unit table — bound to the field, the input never echoed), ormedicaid-application-identifier-missing(the child holds no live identifier of the deployment’s gating kind — nothing written) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract the child’s live Medicaid application; the row stays, retired, in the case’s list
POST /v1/cases/cases/{case_id}/children/{child_id}/medicaid-applications/{application_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case) |
application_id |
path |
Yes |
The live application acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: Retracted (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s update authority
-
404: Case not found, or
ledger-row-not-found(no live application of that id for the child in this case) -
409:
idempotency-conflict/ replayed entity gone -
422: Validation failure (including a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s parental-rights actions — the history (current first), or with as_of the action in force per parent on that date
GET /v1/cases/cases/{case_id}/children/{child_id}/parental-rights-actions
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date. Absent = the history: every live row, current first
by the ledger’s order (each route states it; |
-
200: The live rows (an empty array when none)
-
400:
child-not-in-case; a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a parental-rights action about one parent of a child of the case (a new event)
POST /v1/cases/cases/{case_id}/children/{child_id}/parental-rights-actions
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
parent_person_id |
UUID |
Yes |
The parent (a recorded parent of the child). |
-
200: Action recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case,parent-not-linked(the parent holds no live parent relation to the child),parental-rights-order-invalid(court_order_id is not an active termination_of_parental_rights order of this case),icwa-flags-without-determination(an ICWA finding with no yes_icwa_applies determination in force on terminated_on, or on effective_on when no termination date is stated; field names the date read),ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (effective_on or a petition, death or termination date after today), orbad-requestnaming effective_on when none can be resolved -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new action is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id; died_on without parent_deceased or the reverse; a not_applicable action carrying a petition or termination date or an ICWA finding, or without effective_on; a voluntary or involuntary action with none of petition_filed_on, terminated_on, died_on, or whose effective_on is not their earliest; an involuntary ICWA finding on a voluntary action or the reverse)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live parental-rights action (supersede it; the body must name its parent) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/parental-rights-actions/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
parent_person_id |
UUID |
Yes |
The parent (a recorded parent of the child). |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case,parent-not-linked,parental-rights-order-invalid,icwa-flags-without-determination, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s, child’s or parent’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (as the record)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live parental-rights action entered in error — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/parental-rights-actions/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s parenting row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/cases/{case_id}/children/{child_id}/parenting-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400:
child-not-in-case(the child never held a child-role household row of the case); a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete parenting statement for a child of the case (a change, or a backfill when effective_until is set)
POST /v1/cases/cases/{case_id}/children/{child_id}/parenting-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
has_fathered_or_bore_a_child |
YesNo (optional) |
No |
Has fathered or bore a child |
placed_together |
YesNoNotApplicable (optional) |
No |
Placed together |
pregnant |
YesNo (optional) |
No |
Pregnant |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted),
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or
placed_togetheranswerednot_applicableother than exactly whenhas_fathered_or_bore_a_childisno) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live parenting row of the child in force at any point of a period (newest first)
GET /v1/cases/cases/{case_id}/children/{child_id}/parenting-facts/history
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
child-not-in-case(the child never held a child-role household row of the case), orledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open parenting row’s window
POST /v1/cases/cases/{case_id}/children/{child_id}/parenting-facts/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(effective_until not after the row’s effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, another case’s or child’s, or not open — nothing written) -
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live parenting row (supersede it; omitted bounds are copied from it) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/parenting-facts/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
has_fathered_or_bore_a_child |
YesNo (optional) |
No |
Has fathered or bore a child |
placed_together |
YesNoNotApplicable (optional) |
No |
Placed together |
pregnant |
YesNo (optional) |
No |
Pregnant |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(the resolved window is unordered), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or
placed_togetheranswerednot_applicableother than exactly whenhas_fathered_or_bore_a_childisno) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live parenting row entered in error (no successor) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/parenting-facts/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s permanency plans — the history, CURRENT first (latest established_on, then recorded_at, then id), or with as_of the plan in force on that date
GET /v1/cases/cases/{case_id}/children/{child_id}/permanency-plans
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date. Absent = the history: every live row, current first
by the ledger’s order (each route states it; |
-
200: The live rows (an empty array when none)
-
400:
child-not-in-case; a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Establish a permanency plan for a child of the case (a new event; publishes case.permanency_plan_established)
POST /v1/cases/cases/{case_id}/children/{child_id}/permanency-plans
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
established_on |
date (optional) |
No |
(f)(2) the date the plan was established (on or before today) — REQUIRED on a new plan; a correction may omit it and keeps the predecessor’s. Rows read back always carry it. |
plan |
enum (reunification, adoption, guardianship, long_term_foster_care, emancipation, relative_placement, not_yet_established) |
Yes |
Permanency goal — AFCARS element #36. |
-
200: Plan established (or replayed — same client_request_id + intent)
-
400:
child-not-in-case,ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (established_on after today), orbad-requestnaming established_on when it is omitted -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new plan is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id or an unknown plan token)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the child’s permanency plan in force at as_of
GET /v1/cases/cases/{case_id}/children/{child_id}/permanency-plans/current
The plan in force for a child on a case at as_of: the live (non-retired) row with the latest (established_on, recorded_at, id) among rows established on or before as_of — as_of is required and may lie after today (the caller’s transfer date). Refused before any read unless the caller is the craig-financial service identity (a relayed actor does not change the identity; every human bearer and every other service is refused). 204 when no such row exists — an unknown case and a child who is not a member of the case hold no plan rows, so they answer 204 too (no case or membership guard). Cache-Control: no-store on both the 200 and the 204. The query is closed (CurrentPlanQuery is deny_unknown_fields): a missing, malformed, or unknown query parameter is refused by the extractor with its value-free bad-request problem before the handler runs.
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child’s person ID |
as_of |
query |
Yes |
The anchor date ( |
-
200: The plan in force at as_of
-
204: No live plan established on or before as_of (including an unknown case or a non-member child)
-
400: A missing, malformed, or unknown query parameter (the extractor’s value-free
bad-requestproblem, before the handler) -
401: Unauthorized
-
403: Caller is not the craig-financial service identity
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live permanency plan (supersede it; an omitted established_on is kept) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/permanency-plans/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
established_on |
date (optional) |
No |
(f)(2) the date the plan was established (on or before today) — REQUIRED on a new plan; a correction may omit it and keeps the predecessor’s. Rows read back always carry it. |
plan |
enum (reunification, adoption, guardianship, long_term_foster_care, emancipation, relative_placement, not_yet_established) |
Yes |
Permanency goal — AFCARS element #36. |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-caseorledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (as the record)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live permanency plan entered in error — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/permanency-plans/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Placement-facts projection for one child of a case
GET /v1/cases/cases/{case_id}/children/{child_id}/placement-facts
The data-minimised child facts placement matching consumes — whole years at on; the person ICWA carrier icwa_person, derived by evaluating the federal federal-icwa-status ruleset (25 CFR 23.107(b)(2)) through craig-rules over the case child’s CURRENT child_icwa_facts row (the open, non-retired row; none, closed, or retracted reads as every input null) under the acting worker’s relayed authority; the case carrier icwa_case (cases.icwa_flag, raw); and the count of DISTINCT active child-role household members (the focus child included; sibling-role rows are not consulted) — derived server-side from the authoritative rows under the ACTING worker’s case-read authority (caseworker: assigned only; supervisor / admin / readonly realm-flat). Pure service principals are refused before any read; the date of birth never leaves the service. on must lie within one day of the service’s jurisdiction business date. The query is closed (PlacementFactsQuery is deny_unknown_fields): a missing, malformed, or unknown query parameter is refused by the extractor with its value-free bad-request problem before the handler runs. A case that is not open (closed or transferred) is refused with the typed 409 case-closed after the authority check, before any other read.
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child’s person ID (an active child-role member of the case) |
on |
query |
Yes |
The date the age is derived at ( |
-
200: The four facts
-
400: Typed refusals —
child-not-in-case(the person is not an ACTIVE child-role member of THIS case: inactive,sibling-role, or another case’s child; fieldchild_id) /placement-facts-clock-drift(onlies more than one day from the service’s business date; fieldon); a malformed query parameter (e.g. a missing or non-dateon) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden (pure service callers; a caseworker not assigned to the case) /
rules-consult-denied— craig-rules refused the ICWA-status evaluation for the acting worker (the jurisdiction’srule_evaluationcreate row does not admit them, e.g. the realm-flatreadonlyauditor) -
404: Case not found
-
409:
case-closed— the case is closed or transferred; refused after the acting worker’s case-read check, before any other read -
422:
child-dob-missing— the child’s person record has no date of birth yielding an age aton(fieldchild_id) -
500: The ICWA-status consult failed on a missing ruleset, a rules refusal other than 403 / 503 / 504, or an output without a boolean
icwa_person -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal — including craig-rules not answering the ICWA-status consult (unreachable, or its 2 s budget elapsed —
service-unavailable) or answering it 503 (passed through with the upstream detail) -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first; or craig-rules yielded the ICWA-status consult at its own deadline (504), passed through
The child’s prior-permanency row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/cases/{case_id}/children/{child_id}/prior-permanency-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400:
child-not-in-case(the child never held a child-role household row of the case); a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete prior-permanency statement for a child of the case (a change, or a backfill when effective_until is set)
POST /v1/cases/cases/{case_id}/children/{child_id}/prior-permanency-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
prior_adoption |
YesNoAbandoned (optional) |
No |
Prior adoption |
prior_adoption_intercountry |
YesNo (optional) |
No |
Prior adoption intercountry |
prior_adoption_month |
date (optional) |
No |
(b)(15)(i) the month the prior adoption was finalized (the first of
the month); only when |
prior_guardianship |
YesNoAbandoned (optional) |
No |
Prior guardianship |
prior_guardianship_month |
date (optional) |
No |
(b)(16)(ii) the month the prior guardianship became legalized (the
first of the month); only when |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted),
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or a month or intercountry answer without its gate answered
yes(or missing when it is), or a month not the first of its month) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live prior-permanency row of the child in force at any point of a period (newest first)
GET /v1/cases/cases/{case_id}/children/{child_id}/prior-permanency-facts/history
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
child-not-in-case(the child never held a child-role household row of the case), orledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open prior-permanency row’s window
POST /v1/cases/cases/{case_id}/children/{child_id}/prior-permanency-facts/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(effective_until not after the row’s effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, another case’s or child’s, or not open — nothing written) -
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live prior-permanency row (supersede it; omitted bounds are copied from it) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/prior-permanency-facts/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
prior_adoption |
YesNoAbandoned (optional) |
No |
Prior adoption |
prior_adoption_intercountry |
YesNo (optional) |
No |
Prior adoption intercountry |
prior_adoption_month |
date (optional) |
No |
(b)(15)(i) the month the prior adoption was finalized (the first of
the month); only when |
prior_guardianship |
YesNoAbandoned (optional) |
No |
Prior guardianship |
prior_guardianship_month |
date (optional) |
No |
(b)(16)(ii) the month the prior guardianship became legalized (the
first of the month); only when |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(the resolved window is unordered), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or a month or intercountry answer without its gate answered
yes(or missing when it is), or a month not the first of its month) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live prior-permanency row entered in error (no successor) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/prior-permanency-facts/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s review events — the history, most recently held first (held_on, then recorded_at, then id), or with as_of the last one held on or before that date
GET /v1/cases/cases/{case_id}/children/{child_id}/review-events
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date. Absent = the history: every live row, current first
by the ledger’s order (each route states it; |
-
200: The live rows (an empty array when none)
-
400:
child-not-in-case; a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record an administrative review or permanency hearing of a child of the case, held without a court order (a new event)
POST /v1/cases/cases/{case_id}/children/{child_id}/review-events
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
court_order_id |
UUID (optional) |
No |
The court order that wrote the row — PROVENANCE, never stated by a
request (a record or correction body carrying one is a 422): only
the order act sets it, and a correction’s successor always keeps its
predecessor’s (so the order’s update or delete still retires it).
|
held_on |
date (optional) |
No |
The date the review was held (on or before today) — REQUIRED on a new review; a correction may omit it and keeps the predecessor’s. Rows read back always carry it. |
kind |
enum (periodic_review, permanency_hearing) |
Yes |
A child review event’s kind: the discriminator
between (f)(3) periodic reviews and (f)(4) permanency hearings, one
|
-
200: Review recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case,ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (held_on after today), orbad-requestnaming held_on when it is omitted -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new review is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an unknown kind, or a stated court_order_id — only a court order writes it)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live review event (supersede it; an omitted held_on is kept and the court_order_id always is) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/review-events/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
court_order_id |
UUID (optional) |
No |
The court order that wrote the row — PROVENANCE, never stated by a
request (a record or correction body carrying one is a 422): only
the order act sets it, and a correction’s successor always keeps its
predecessor’s (so the order’s update or delete still retires it).
|
held_on |
date (optional) |
No |
The date the review was held (on or before today) — REQUIRED on a new review; a correction may omit it and keeps the predecessor’s. Rows read back always carry it. |
kind |
enum (periodic_review, permanency_hearing) |
Yes |
A child review event’s kind: the discriminator
between (f)(3) periodic reviews and (f)(4) permanency hearings, one
|
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-caseorledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (as the record)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live review event entered in error — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/review-events/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s sibling-count row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/cases/{case_id}/children/{child_id}/sibling-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400:
child-not-in-case(the child never held a child-role household row of the case); a malformed query parameter (e.g. a non-dateas_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete sibling-count statement for a child of the case (a change, or a backfill when effective_until is set)
POST /v1/cases/cases/{case_id}/children/{child_id}/sibling-facts
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
total_siblings |
integer (optional) |
No |
The number of siblings (0..=999). |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted),
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or
total_siblingsoutside 0..=999) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live sibling-count row of the child in force at any point of a period (newest first)
GET /v1/cases/cases/{case_id}/children/{child_id}/sibling-facts/history
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
child-not-in-case(the child never held a child-role household row of the case), orledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open sibling-count row’s window
POST /v1/cases/cases/{case_id}/children/{child_id}/sibling-facts/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(effective_until not after the row’s effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, another case’s or child’s, or not open — nothing written) -
409: the case is closed or transferred (a new fact, change or close is refused; a correction or retraction is admitted), or client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live sibling-count row (supersede it; omitted bounds are copied from it) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/sibling-facts/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
total_siblings |
integer (optional) |
No |
The number of siblings (0..=999). |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case),ledger-window-invalid(the resolved window is unordered), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure (including a missing client_request_id, or
total_siblingsoutside 0..=999) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live sibling-count row entered in error (no successor) — admitted on a closed case
POST /v1/cases/cases/{case_id}/children/{child_id}/sibling-facts/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
path |
Yes |
The child (a child-role household member of the case, active or not) |
row_id |
path |
Yes |
The live row acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
400:
child-not-in-case(the child never held a child-role household row of the case) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found, or
ledger-row-not-found(the row is absent, retired, or another case’s or child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The case’s custody episodes, live and retired, by child then latest custody_from first; child_id narrows to one child
GET /v1/cases/cases/{case_id}/custody-episodes
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
query |
No |
Narrows the read to one child of the case; absent = every child. |
-
200: The episodes (an empty array when none)
-
400:
child-not-in-case(child_id names a person who never held a child-role household row of the case); a malformed query parameter (e.g. a non-UUIDchild_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s read authority
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
End a household membership
POST /v1/cases/cases/{case_id}/household/{member_id}/end
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
member_id |
path |
Yes |
Household membership ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the case and membership path
ids) replays the original outcome; a different intent under the
same id is a 409 |
ended_on |
date |
Yes |
The day the person left the household: on or after the day the membership was added and on or before today, both on the jurisdiction’s business calendar. |
-
200: Membership ended (or replayed — same client_request_id + intent)
-
400:
ledger-date-after-today—ended_onis after today on the jurisdiction’s business calendar; orledger-window-invalid—ended_onis before the day the member was added -
401: Unauthorized
-
403: Forbidden
-
404: Case not found, or the case has no such household membership
-
409: client_request_id claimed by a different operation; or the parent case is not open — problem type
case-closed; or the membership is already ended — problem typehousehold-member-ended -
422: Missing client_request_id, or a body field whose value does not deserialize, e.g. an
ended_onthat is not a date (validation-failed; the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The case’s Medicaid applications, live and retracted, decrypted for a case reader; child_id narrows to one child
GET /v1/cases/cases/{case_id}/medicaid-applications
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
child_id |
query |
No |
Only this child’s applications. |
-
200: The applications (an empty array when none)
-
400:
child-not-in-case(child_id names a person who never held a child-role household row of the case); a malformed query parameter (e.g. a non-UUIDchild_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s read authority
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
One Medicaid application of the case, live or retracted, decrypted for a case reader
GET /v1/cases/cases/{case_id}/medicaid-applications/{application_id}
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
application_id |
path |
Yes |
The application |
-
200: The application
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the case’s read authority
-
404: Case not found, or
ledger-row-not-found(no application of that id in this case) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the outbound-principals projection of a case
GET /v1/cases/cases/{case_id}/outbound-principals
The data-minimised principal set craig-exchange assembles partner records from — the case as the partner’s ongoing stage (partner_case_id = referral_id ?? case_id, county_fips from admin_unit), every ACTIVE household member with names, sex, the decrypted date of birth, the household role and added_at, and an opaque source_version per person and for the stage. Refused before any read unless the caller is the craig-exchange service identity; stages the case.person_pii_exported release audit (purpose = outbound_principals, correlated to correlation) BEFORE responding; Cache-Control: no-store.
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and its principals
-
400:
interfaceis not a lowercase adapter-kind token (fieldinterface), oridentifieris given — served on the custody arms only (fieldidentifier); a malformed query parameter (e.g. a missing or non-UUIDcorrelation) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Case not found
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: one principal of a case, with its stage
GET /v1/cases/cases/{case_id}/outbound-principals/{person_id}
The single-record arm a record job assembles from: the same shape as the set arm with exactly one principal — the named ACTIVE household member — so the record carries its stage. 404 when the person is not an active member of the case. Same admission, audit and cache posture as the set arm.
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
person_id |
path |
Yes |
The principal’s person ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and the one principal
-
400:
interfacemalformed (fieldinterface), oridentifiergiven (fieldidentifier) -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Case not found, or the person is not an active household member of it
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a case by ID
GET /v1/cases/cases/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
-
200: Case found
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update a case
PUT /v1/cases/cases/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
assigned_worker |
UUID (optional) |
No |
New assigned-worker UUID (transfers a case to another caseworker). |
closure_reason |
ClosureReason (optional) |
No |
Closure reason |
icwa_flag |
boolean (optional) |
No |
New ICWA flag value. |
stage |
string (optional) |
No |
New case stage ( |
status |
string (optional) |
No |
New status ( |
supervisor |
UUID (optional) |
No |
New supervisor UUID — reassign-only: absent keeps the current supervisor, a
value reassigns, and an explicit JSON |
-
200: Case updated
-
400: Invalid status transition
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
409: Concurrent modification — re-read and retry; or
custody-open: closing or transferring a case that holds an open custody episode (record the not-in-custody status first) -
422: Validation failure (including an explicit-null supervisor — reassign-only, no NULL-clear path), or a NUL (U+0000) in
stage(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List household members for a case (active only unless include_inactive)
GET /v1/cases/cases/{id}/household
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
include_inactive |
query |
No |
List ended memberships ( |
-
200: Household members
-
400:
structural-mismatch— a malformed query parameter (e.g.include_inactive=maybe); answered only after the case’s Read check -
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Add a household member to a case
POST /v1/cases/cases/{id}/household
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the case path id) replays
the original membership row; a different intent under the same
id is a 409 |
person_id |
UUID |
Yes |
UUID of the person to add to the case household. |
primary_caregiver |
boolean |
No |
|
role |
enum (child, parent, caregiver, sibling, other) |
Yes |
Role of a person in a case household. |
-
200: Household member added (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
409: client_request_id claimed by a different operation, or replayed entity gone; or the parent case is not open — problem type
case-closed; or the person is already an active member of the case’s household — problem typehousehold-member-exists -
422: Missing client_request_id, or a body field whose value does not deserialize, e.g. a non-UUID
person_idor an unknownrole(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Ask the person index about a member of the case’s household
POST /v1/cases/cases/{id}/persons/{person_id}/index-inquiries
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
person_id |
path |
Yes |
The household member asked about |
-
200: The index’s candidates, best first, and what may be done with them
-
401: Unauthorized
-
403: Forbidden: a pure service principal, a worker who may not update the case,
rules-consult-denied, or craig-exchange’sfeature-disabledrelayed -
404: Case not found, or the person is not an active member of its household
-
409:
person-index-unconfigured,person-index-person-identified(the person already holds a live identifier of the index’s kind),person-index-facts-missing(the sex is not recorded),person-index-registration-in-flight, or craig-exchange’sdsa-not-active/person-index-refusedrelayed -
500: The jurisdiction’s choice ruleset is missing or answered something the product does not know: a redacted 500 (the service’s log names the ruleset), and no inquiry is kept
-
503: craig-exchange or craig-rules unreachable, or an answer over the contract’s bounds
-
504: craig-rules timed out at its own deadline
Register the household member in the person index
POST /v1/cases/cases/{id}/persons/{person_id}/index-inquiries/{inquiry_id}/register
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
person_id |
path |
Yes |
The household member |
inquiry_id |
path |
Yes |
The inquiry the ask answered |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id: a retry answers the identifier the first request recorded. |
-
201: The identifier recorded (or replayed: same client_request_id)
-
401: Unauthorized
-
403: Forbidden: a pure service principal, a worker who may not update the case, or craig-exchange’s
feature-disabledrelayed -
404: Case not found, the person is not an active member of its household, or the inquiry is absent or expired
-
409:
person-index-choice-refused(the rules keep registration closed for the index’s answer, or a selection was already begun from this inquiry),person-index-facts-missing(the detail names the facts),person-index-registration-in-flight(a registration was already begun from this inquiry),person-index-person-identified(the person was identified since the ask),person-index-unconfigured,person-identifier-duplicate, a client_request_id claimed by another operation, or craig-exchange’sdsa-not-active/person-index-refusedrelayed (nothing recorded; the inquiry stays registering) -
422: A body field of the wrong type or unknown (
validation-failed), craig-exchange’s 422 relayed, orperson-demographics-incompletefrom the identifier record (a blank name) -
503: craig-exchange unreachable, or the index assigned an id that is not one of the jurisdiction’s kind: the person may exist in the index, nothing is recorded, and the inquiry stays registering
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Select a candidate the person index answered
POST /v1/cases/cases/{id}/persons/{person_id}/index-inquiries/{inquiry_id}/select
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
person_id |
path |
Yes |
The household member |
inquiry_id |
path |
Yes |
The inquiry the ask answered |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id: a retry answers the identifier the first request recorded. |
index_id |
string |
Yes |
The chosen candidate’s |
-
201: The identifier recorded (or replayed: same client_request_id and candidate)
-
401: Unauthorized
-
403: Forbidden: a pure service principal, a worker who may not update the case, or craig-exchange’s
feature-disabledrelayed -
404: Case not found, the person is not an active member of its household, or the inquiry is absent or expired
-
409:
person-index-choice-refused(a candidate the answer did not hold, or one the rules do not let be selected),person-index-registration-in-flight,person-index-person-identified(the person was identified since the ask),person-index-unconfigured,person-identifier-duplicate, a client_request_id claimed by another operation, or craig-exchange’sdsa-not-active/person-index-refusedrelayed (nothing recorded) -
422: A body field over its bound, of the wrong type or unknown, a NUL in
index_id(validation-failed); anindex_idthat is not an id of the jurisdiction’s kind (identifier-format-invalid); or a person with no date of birth or a blank name, for whom no identifier can be recorded (person-demographics-incomplete). Nothing is sent -
503: craig-exchange unreachable: the index may or may not have been told, and nothing is recorded
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
CURRENT benefit facts for the case household
GET /v1/cases/cases/{id}/ssa-benefit-facts
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
person_id |
query |
No |
Narrow to one household member. |
-
200: Chain heads for the active household (bounded by household size × benefit kinds — unpaginated by construction)
-
400: A malformed query parameter (e.g. a non-UUID
person_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Request an SSA screening run for the case household
POST /v1/cases/cases/{id}/ssa-screening
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The client-held operation id: minted per form render by the BFF, forwarded unchanged by cases, claimed by exchange. |
-
202: Screening run staged at exchange (or an idempotent replay of the stored run)
-
401: Unauthorized
-
403: Forbidden (incl. pure service callers, unassigned caseworkers, or the exchange-side FEATURE_DISABLED knob relayed verbatim)
-
404: Case not found
-
409: No active household members, the jurisdiction names no screening identifier kind (SCREENING_UNCONFIGURED), members without a live identifier of that kind (SCREENING_IDENTIFIER_MISSING, naming their person ids and the kind, never a value), or an exchange-side refusal relayed verbatim (SCREENING_RUN_ACTIVE / SCREENING_COHORT_STALE / DSA_NOT_ACTIVE)
-
422: A body field whose value does not deserialize, e.g. a non-UUID
client_request_id(validation-failed; the field is named, the value never echoed) -
503: Exchange unreachable, or its partner-configuration 503s relayed verbatim
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Screening-outcome history for the case household
GET /v1/cases/cases/{id}/ssa-screening/outcomes
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
person_id |
query |
No |
Narrow to one household member (never combined with |
run_id |
query |
No |
Narrow to one screening run (never combined with |
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
-
200: Outcome page (household-scoped)
-
400: person_id and run_id combined, or page depth exceeded; a malformed query parameter (e.g. a non-UUID
person_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The case’s latest screening-run status, relayed from exchange
GET /v1/cases/cases/{id}/ssa-screening/run
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
-
200: The latest run’s status view
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found, or the case has never staged a screening run (relayed verbatim)
-
503: Exchange unreachable
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Operator cancel of a screening run
POST /v1/cases/cases/{id}/ssa-screening/runs/{run_id}/cancel
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
run_id |
path |
Yes |
Screening run ID |
-
200: Invalidated (or the deterministic already-invalidated replay)
-
401: Unauthorized
-
403: Forbidden (service tokens denied; BOLA)
-
404: Case not found, or no such run for this case
-
409: Quiesced run (a no-op), relayed verbatim
-
422: A body that does not deserialize, e.g.
null(validation-failed; the value never echoed) -
503: Exchange unavailable
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The composed SSA section’s one-fetch composite
GET /v1/cases/cases/{id}/ssa-screening/summary
Everything the composed case-section renders in one call: the latest run status (relay 404 folds to null — never-screened is a 200 shape, not an error), the CURRENT household benefit facts, and the newest outcome rows. Exchange unreachability is a 503 (the fragment renders its error state).
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
-
200: The composite
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found
-
500: The relay refused non-404 (an exchange auth/config fault)
-
503: Exchange unreachable
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the outbound-principals projection of a custody episode
GET /v1/cases/custody-episodes/{id}/outbound-principals
The custody episode as the education partner’s stage (kind = custody_episode; partner_case_id, case_number, county_fips and the worker from the owning case; status open / closed / retracted, a retract winning; custody = the instants, retracted, and the served legal-status rows — the live rows, or a retracted episode’s episode_retracted snapshot) and its one principal, the child (role child), with names, sex, the decrypted date of birth and gtid: the GTID row identifier names (none when it names no GTID row of the child), else the live one, else the latest recorded; the value is decrypted for this response only. Closed and retracted episodes are served. Refused before any read unless the caller is the craig-exchange service identity; stages the case.person_pii_exported release audit (purpose = outbound_principals, stage_kind = custody_episode; the GTID never enters it) BEFORE responding; Cache-Control: no-store.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Custody episode ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and its principal
-
400:
interfacemalformed (fieldinterface). A non-UUIDidentifier, or a missing, malformed or unknown query parameter, is the extractor’s value-freebad-requestproblem -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Custody episode not found
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the child of a custody episode, with its stage
GET /v1/cases/custody-episodes/{id}/outbound-principals/{person_id}
The single-record arm a record job assembles from: the set arm’s shape with exactly one principal, the episode’s child; 404 when the person is not the episode’s child. Same admission, GTID choice, audit and cache posture as the set arm.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Custody episode ID |
person_id |
path |
Yes |
The principal’s person ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and the one principal
-
400:
interfacemalformed (fieldinterface). A non-UUIDidentifier, or a missing, malformed or unknown query parameter, is the extractor’s value-freebad-requestproblem -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Custody episode not found, or the person is not the episode’s child
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the outbound-principals projection of an investigation
GET /v1/cases/investigations/{id}/outbound-principals
The investigation as the partner’s INV stage (partner_case_id = the referral id; the county from the case that references the investigation, else the investigation’s assignment_area), its principals = the referral’s report-person links (child / adult, added_at = linked_at) plus allegation victims with no link (victim), each with names, sex, the decrypted date of birth and an opaque source_version. Same admission, audit and cache posture as the case arm.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Investigation ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and its principals
-
400:
interfacemalformed (fieldinterface), oridentifiergiven (fieldidentifier) -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Investigation not found
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: one principal of an investigation, with its stage
GET /v1/cases/investigations/{id}/outbound-principals/{person_id}
The single-record arm for an investigation principal — the set arm’s shape with exactly one principal; 404 when the person is neither a report-person link of the referral nor an allegation victim. Same admission, audit and cache posture as the set arm.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Investigation ID |
person_id |
path |
Yes |
The principal’s person ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and the one principal
-
400:
interfacemalformed (fieldinterface), oridentifiergiven (fieldidentifier) -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Investigation not found, or the person is not one of its principals
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: store what a partner said about a referred Medicaid application
POST /v1/cases/medicaid-applications/partner-reports
Posted by craig-exchange: the receipt of a referral it sent (the partner’s reference, for the application named by id), and each outcome it admitted from the partner’s later calls (named by the person’s identifier and that reference). An outcome is resolved to the one person holding that live identifier and then to that person’s application whose receipt came from the same interface with the same reference. The body’s outcome says what happened: applied (201) when the report is stored on the application; replayed (200) when it equals the application’s latest report of its kind from that interface; unknown (200, nothing stored) when a receipt names no application, or an outcome’s identifier is held live by no one person or its reference matches no receipt from that interface; withdrawn (200, nothing stored) when the application has been retracted. A stored report publishes case.medicaid_application_report_received. The program id is kept encrypted. The body carries no idempotency key: posting a report twice stores one.
-
200: Nothing was stored:
outcome=replayed,unknownorwithdrawn -
201: The report is stored on its application (
outcome=applied) -
400: The body is not well-formed JSON
-
401: Missing or invalid bearer
-
403: Not a service caller, not the craig-exchange service identity, or a delegated (actor) token; answered before the body is judged, whatever was posted
-
409:
medicaid-referral-receipt-conflict: a receipt for an application that already holds one under another reference or from another interface. Nothing was stored -
413: The body is past the service’s request-body limit
-
415: The body is not sent as
application/json -
422: The body is not the contract’s: an unknown or missing key, an unknown
kindorstatus, or a text that is empty, past its cap or not printable ASCII -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the outbound-principals projection of a Medicaid application
GET /v1/cases/medicaid-applications/{id}/outbound-principals
The application as the stage a referral is sent for (kind = medicaid_application; partner_case_id, case_number, county_fips and the worker from the case of the custody episode it was submitted on; status submitted or retracted; custody = that episode’s facts; application = the day it was submitted, the citizenship status decrypted for this response only, prior medical assistance and the legal administrative unit) and its one principal, the child (role child), with names, sex, the decrypted date of birth and identifier: the child’s live identifier of the kind the jurisdiction names for an application, its value decrypted for this response only; absent when the jurisdiction names no kind or the child holds no live identifier of it. A retracted application is served. Refused before any read unless the caller is the craig-exchange service identity; stages the case.person_pii_exported release audit (purpose = outbound_principals, stage_kind = medicaid_application; neither the identifier nor the citizenship status enters it) BEFORE responding; Cache-Control: no-store.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Medicaid application ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and its principal
-
400:
interfacemalformed (fieldinterface), or anidentifierpin, which only the custody arms serve (fieldidentifier). A missing, malformed or unknown query parameter is the extractor’s value-freebad-requestproblem -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Medicaid application not found
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the child of a Medicaid application, with its stage
GET /v1/cases/medicaid-applications/{id}/outbound-principals/{person_id}
The single-record arm a record job assembles a referral from: the set arm’s shape with exactly one principal, the application’s child; 404 when the person is not the application’s child. Same admission, identifier, audit and cache posture as the set arm.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Medicaid application ID |
person_id |
path |
Yes |
The principal’s person ID |
interface |
query |
Yes |
The partner interface the read serves (an adapter-kind token). |
correlation |
query |
Yes |
The requesting job’s correlation — a |
identifier |
query |
No |
Custody arms only: the GTID row to serve — a recipient’s pin. Absent:
the live GTID, else the latest ended or retracted one. A row id, never
the value. Refused (400, field |
-
200: The stage and the one principal
-
400:
interfacemalformed (fieldinterface), or anidentifierpin, which only the custody arms serve (fieldidentifier). A missing, malformed or unknown query parameter is the extractor’s value-freebad-requestproblem -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Medicaid application not found, or the person is not the application’s child
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: a page of open stage ids of one kind
GET /v1/cases/outbound-principals/open-stages
Ids only, ordered by id (UUID v7 — creation order), at most 200 per page; cursor is exclusive and next_cursor is present only when the page was full. kind = case walks cases with status open; kind = investigation walks investigations whose status is not closed; kind = custody_episode walks open custody episodes whose child holds a live GTID; kind = medicaid_application walks submitted Medicaid applications that hold no partner receipt, the ones a referral is still owed for. The catch-up act enumerates open stages through this arm. Refused unless the caller is the craig-exchange service identity.
| Name | In | Required | Description |
|---|---|---|---|
interface |
query |
Yes |
The partner interface the walk serves. |
kind |
query |
Yes |
Which stage kind this page walks. |
cursor |
query |
No |
Return stages with an id GREATER than this one. |
-
200: One page of stage ids
-
400:
interfacemalformed (fieldinterface) -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the open custody episode of a person
GET /v1/cases/persons/{id}/outbound-custody-stages
Ids only. The person’s open custody episodes — live and with no end date; at most one, since a child’s live episodes never overlap. Not filtered on a GTID. An unknown person, or one never in custody, answers an empty list. Refused unless the caller is the craig-exchange service identity.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
interface |
query |
Yes |
The partner interface the read serves. |
-
200: The open custody episode ids (possibly none)
-
400:
interfacemalformed (fieldinterface) -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: the investigations a report reaches
GET /v1/cases/reports/{report_id}/outbound-stages
Ids only: the investigations of the referral converted from this report, the stage ids a report-keyed trigger admission (case.report_person_linked / _unlinked) resolves to. investigation_ids lists those whose status is not closed; closed_investigation_ids lists the closed ones that carry a closure time, so a link resolved after its investigation closed still reaches it. No investigation is in both lists. An unconverted or unknown report answers two empty lists. Refused unless the caller is the craig-exchange service identity.
| Name | In | Required | Description |
|---|---|---|---|
report_id |
path |
Yes |
Intake report ID |
interface |
query |
Yes |
The partner interface the read serves. |
-
200: The open and the closed investigation ids (either list possibly empty)
-
400:
interfacemalformed (fieldinterface) -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
422:
interfaceover 32 bytes:validation-failednaminginterface, answered before the handler runs -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Contact Attachments
List contact attachments
GET /v1/cases/cases/{case_id}/contacts/{contact_id}/attachments
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
contact_id |
path |
Yes |
Contact ID |
-
200: Attachments list
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Upload a contact attachment
POST /v1/cases/cases/{case_id}/contacts/{contact_id}/attachments
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
contact_id |
path |
Yes |
Contact ID |
| Field | Type | Required | Description |
|---|---|---|---|
attachment_type |
string (optional) |
No |
The attachment’s category; |
client_request_id |
UUID |
Yes |
The client-held idempotency key: a byte- and metadata-identical retry under the same id replays the same attachment. |
file |
binary |
Yes |
The attachment bytes; the part’s content type must be an allowed type the bytes match. |
file_sha256 |
string |
Yes |
The lowercase-hex SHA-256 of the file bytes (64 characters); a digest that does not match the bytes is a 400. |
-
200: Attachment uploaded (a byte- and metadata-identical retry under the same client_request_id replays the SAME attachment)
-
400: Validation error (including a missing client_request_id / file_sha256 text field or a digest that does not match the bytes)
-
401: Unauthorized
-
403: Forbidden (including a foreign actor replaying another’s client_request_id)
-
404: Not found
-
409: Concurrent retries kept finalizing this upload; retry the request; or the parent case is not open — problem type
case-closed -
422: client_request_id reused with a different upload; or (
validation-failed, value-free) anattachment_typethat is not 1 to 64 bytes of^[a-z0-9][a-z0-9_.-]*$ -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Download a contact attachment
GET /v1/cases/cases/{case_id}/contacts/{contact_id}/attachments/{att_id}
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
contact_id |
path |
Yes |
Contact ID |
att_id |
path |
Yes |
Attachment ID |
-
200: Attachment file
-
206: Partial content: the one
Rangeslice (bytes=a-b,a-or-n) withContent-Range,Accept-Ranges: bytesand the slice’sContent-Length; honoured only when anIf-Rangestrong-matches theETag. A multi-range request is the full 200 -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
416: Range not satisfiable:
Content-Range: bytes */<length> -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Delete a contact attachment
DELETE /v1/cases/cases/{case_id}/contacts/{contact_id}/attachments/{att_id}
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
contact_id |
path |
Yes |
Contact ID |
att_id |
path |
Yes |
Attachment ID |
-
204: Attachment deleted
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Parent case is not open — problem type
case-closed -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Contacts
List contacts for a case
GET /v1/cases/cases/{id}/contacts
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
-
200: Paginated contacts
-
400: A page past the depth cap; a malformed query parameter (e.g. a non-integer
page) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a contact / visitation
POST /v1/cases/cases/{id}/contacts
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the case path id) replays
the original contact; a different intent under the same id is a
409 |
contact_type |
enum (home_visit, office_visit, phone_call, video_call, school_visit, collateral) |
Yes |
Type of case contact. |
contact_with |
string |
Yes |
Who was contacted (person name or role). A NUL (U+0000) is a 422
|
duration_minutes |
integer (optional) |
No |
Duration of the contact in minutes. |
narrative |
string (optional) |
No |
Free-form contact narrative. A NUL (U+0000) is a 422
|
occurred_at |
datetime |
Yes |
When the contact occurred (timezone-aware). |
visit |
ContactVisit (optional) |
No |
Visit |
-
200: Contact recorded (or replayed — same client_request_id + intent)
-
400: A
visiton a type that admits none —bad-request, fieldvisit; or the visited child was never a child-role member of the case —child-not-in-case, fieldvisit.visited_child_id -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: client_request_id claimed by a different operation, or replayed entity gone; or the parent case is not open — problem type
case-closed -
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in
contact_withornarrative(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a contact by ID
GET /v1/cases/contacts/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Contact ID |
-
200: Contact
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update a contact (requires If-Match)
PUT /v1/cases/contacts/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Contact ID |
If-Match |
header |
Yes |
REQUIRED: the contact’s |
| Field | Type | Required | Description |
|---|---|---|---|
contact_type |
ContactType (optional) |
No |
Contact type |
contact_with |
string (optional) |
No |
New |
duration_minutes |
integer (optional) |
No |
New duration in minutes. |
narrative |
string (optional) |
No |
New narrative. A NUL (U+0000) is a 422 |
occurred_at |
datetime (optional) |
No |
New |
visit |
ContactVisit (optional) |
No |
Visit |
-
200: Contact updated
-
400: Missing or malformed If-Match; or the resulting row carries a visit on a type that admits none —
bad-request, fieldvisit(a type change must clear it withvisit: null); or the visited child was never a child-role member of the case —child-not-in-case, fieldvisit.visited_child_id -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Not found (including soft-deleted)
-
409: Version moved — concurrent modification; re-read and retry; or the parent case is not open — problem type
case-closed -
422: A body field whose value does not deserialize, e.g. an unknown
contact_type(validation-failed; the field is named, the value never echoed), orcontact_withover 100 ornarrativeover 4000 bytes (validation-failed), or a NUL (U+0000) incontact_withornarrative(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Delete a contact
DELETE /v1/cases/contacts/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Contact ID |
-
204: Contact deleted
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Parent case is not open — problem type
case-closed -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Court Orders
Download a court order document
GET /v1/cases/cases/{case_id}/court-orders/{order_id}/document
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
order_id |
path |
Yes |
Court order ID |
-
200: Document file
-
206: Partial content: the one
Rangeslice (bytes=a-b,a-or-n) withContent-Range,Accept-Ranges: bytesand the slice’sContent-Length; honoured only when anIf-Rangestrong-matches theETag. A multi-range request is the full 200 -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
416: Range not satisfiable:
Content-Range: bytes */<length> -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Upload a court order document
POST /v1/cases/cases/{case_id}/court-orders/{order_id}/document
| Name | In | Required | Description |
|---|---|---|---|
case_id |
path |
Yes |
Case ID |
order_id |
path |
Yes |
Court order ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The client-held idempotency key: a byte-identical retry under the same id replays the upload. |
file |
binary |
Yes |
The document bytes; the part’s content type must be an allowed type the bytes match. |
file_sha256 |
string |
Yes |
The lowercase-hex SHA-256 of the file bytes (64 characters); a digest that does not match the bytes is a 400. |
-
200: Document uploaded (a byte-identical retry under the same client_request_id replays; a superseded attempt answers with the CURRENT document — the pointer never regresses)
-
400: Validation error (including a missing client_request_id / file_sha256 text field or a digest that does not match the bytes)
-
401: Unauthorized
-
403: Forbidden (including a foreign actor replaying another’s client_request_id)
-
404: Not found
-
409: Concurrent retries kept finalizing this upload; retry the request; or the parent case is not open — problem type
case-closed -
422: client_request_id reused with a different upload
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List court orders for a case
GET /v1/cases/cases/{id}/court-orders
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
-
200: Court orders
-
401: Unauthorized
-
403: Forbidden
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a court order
POST /v1/cases/cases/{id}/court-orders
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the case path id) replays
the original order; a different intent under the same id is a
409 |
court_name |
string (optional) |
No |
Name of the issuing court. A NUL (U+0000) is a 422 |
custody |
CourtOrderCustody (optional) |
No |
Custody |
effective_date |
date (optional) |
No |
Date the order takes effect. Stored as given: an omitted date is stored as null (there is no server-side default). |
findings |
object |
No |
Judicial findings (e.g. contrary-to-welfare, reasonable-efforts). The
document may nest at most 16 levels, hold at most 2,000 values, and
no string or key longer than 16,384 bytes. Past a limit, or with a
NUL (U+0000) in any string or object key, it is a 422
|
hearing |
CourtOrderHearing (optional) |
No |
Hearing |
judge |
string (optional) |
No |
Presiding judge’s name. A NUL (U+0000) is a 422 |
next_hearing_date |
date (optional) |
No |
Date of the next scheduled hearing. |
order_date |
date |
Yes |
Date the order was issued. |
order_type |
enum (removal, shelter_care, adjudication, disposition, review_hearing, permanency_hearing, termination_of_parental_rights) |
Yes |
Type of court order. |
-
200: Court order recorded (or replayed — same client_request_id + intent); a hearing order writes one review event per hearing child in the same transaction; a
custodyorder writes one legal-status row per child -
400:
court-order-hearing-required(a review_hearing / permanency_hearing order withouthearing),court-order-hearing-not-admitted(hearingon any other type),child-not-in-case(fieldhearing.children), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (fieldhearing.held_on);child-not-in-case(fieldcustody.children),ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (fieldcustody.effective_on) — nothing written -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Case not found
-
409: client_request_id claimed by a different operation, or replayed entity gone; or the parent case is not open — problem type
case-closed;custody-episode-overlaporcustody-row-out-of-order(a child’s custody row the episode rules refuse — nothing written) -
422: Validation failure (including a missing client_request_id, or a NUL (U+0000) in
court_nameorjudge, or in any string or object key offindings—validation-failednaming the field, value-free);legal-status-vocabulary-missing/legal-status-unknown(fieldcustody.status_token) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a court order by ID
GET /v1/cases/court-orders/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Court order ID |
-
200: Court order
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update a court order (requires If-Match)
PUT /v1/cases/court-orders/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Court order ID |
If-Match |
header |
Yes |
REQUIRED: the order’s |
| Field | Type | Required | Description |
|---|---|---|---|
court_name |
string (optional) |
No |
New court name. A NUL (U+0000) is a 422 |
custody |
CourtOrderCustody (optional) |
No |
Custody |
effective_date |
date (optional) |
No |
New effective date. |
findings |
object |
No |
New findings JSON, under the same size limits as on create. Past a
limit, or with a NUL (U+0000) in any string or object key, it is a
422 |
hearing |
CourtOrderHearing (optional) |
No |
Hearing |
judge |
string (optional) |
No |
New presiding judge. A NUL (U+0000) is a 422 |
next_hearing_date |
date (optional) |
No |
New next-hearing date. |
order_date |
date (optional) |
No |
New |
order_type |
CourtOrderType (optional) |
No |
Order type |
-
200: Court order updated
-
400: Missing or malformed If-Match;
court-order-hearing-required(a type change to a hearing type withouthearing),court-order-hearing-not-admitted(hearingon a non-hearing resolved type),child-not-in-case(fieldhearing.children), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (fieldhearing.held_on);child-not-in-case(fieldcustody.children),ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) (fieldcustody.effective_on) — nothing written -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Not found (including soft-deleted)
-
409: Version moved — concurrent modification; re-read and retry; or the parent case is not open — problem type
case-closed;custody-episode-overlaporcustody-row-out-of-order(a child’s custody row the episode rules refuse — nothing written);custody-close-not-retirable(a no-longer-named child’s row closes its episode) -
422: Validation failure (including a NUL (U+0000) in
court_nameorjudge, or in any string or object key offindings—validation-failednaming the field, value-free);custody-class-flip(a named-again child’s status changes custody class);legal-status-vocabulary-missing/legal-status-unknown -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Delete a court order
DELETE /v1/cases/court-orders/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Court order ID |
-
204: Court order deleted; its live review events retired as
order_deleted, and its live legal-status rows retired by the custody rules (an episode left without an in-custody row is retracted) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Not found
-
409: Parent case is not open — problem type
case-closed, orcustody-close-not-retirable(a row the order wrote closes its child’s episode: correct the close or retract the episode first — nothing written) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
EventReplay
Replay outbox events in a time window
POST /v1/admin/events/replay
Re-stages the published outbox rows created in [from, to] (optionally one event_type) so the outbox worker republishes them. At most 100000 rows per call; when more is true, call again with the same window and resume_from. Rows already pending are left alone. dry_run=true only counts. A from older than the service’s outbox retention window is refused. Each batch commits on its own, so after a 5xx the committed batches stay re-staged and re-running the same window picks up the rest. Every admitted call, a dry run included, records an admin.events_replayed act naming the worker.
| Name | In | Required | Description |
|---|---|---|---|
from |
query |
Yes |
RFC 3339 inclusive lower bound on |
to |
query |
Yes |
RFC 3339 inclusive upper bound on |
event_type |
query |
No |
Optional |
dry_run |
query |
No |
If true, return the would-replay count without modifying rows. |
resume_from |
query |
No |
The |
-
200: The window’s count and what this call re-staged
-
400:
bad-request: a malformed or missingfrom/to, a non-booleandry_run,fromafterto,fromolder than the outbox retention window, or aresume_fromthat is not a replay cursor (fieldnames it) -
401: Missing or invalid bearer token
-
403: The acting identity is not an admin, or is a bare service principal (
worker-required): a replay is a worker’s act -
422:
validation-failed:event_typelonger than 255 bytes -
500: Internal error (the re-staged count overflowed, or an unclassified database error); batches already committed stay committed
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
IV-E Determination
The case’s latest IV-E determination of record
GET /v1/cases/cases/{id}/ive-determination
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
-
200: The latest determination
-
401: Unauthorized
-
403: Forbidden
-
404: Case not found, or no determination exists
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Assemble + persist an IV-E eligibility determination
POST /v1/cases/cases/{id}/ive-determination
The authoritative assembly, PER CHILD. Requires surface, the identity of the IV-E surface the form was rendered from (GET /v1/cases/ive-surface), and refuses any answer the active {j}-ive-eligibility ruleset does not declare at that scope and kind. Verifies the screening witness (completed, un-invalidated, fresh, cohort byte-current), snapshots the named children (child-role household members; age server-derived from the person DOB at the business date), derives the SSA evidence token server-side from CURRENT benefit facts, injects only the server-derived keys the ruleset’s input schema lists, evaluates the ruleset once per child against the expected identity, and persists the act (with the full ruleset identity) + one verdict row per child in one claimed transaction that re-validates the witness under the case lock — staging one eligibility.evaluated event per child, naming the acting worker as user_id, in the same transaction (the live money wire financial prices from). A replay (same client_request_id) returns the original whatever the surface state.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Case ID |
| Field | Type | Required | Description |
|---|---|---|---|
case_inputs |
object |
Yes |
The case-scoped answers: each key a |
child_inputs |
object |
Yes |
Each named child’s own answers, keyed by the child’s person id:
each key a |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
surface |
IveRulesetIdentity (optional) |
No |
Surface |
-
200: The determination of record (a replay returns the original)
-
400: Malformed body;
surfaceabsent;ive-input-not-declared(an answer the active ruleset does not declare, sent at the other scope, or invalid for its declared kind — the detail names the key; nothing was consulted); orive-child-not-in-cohort(a child_inputs key is not a child-role household member) /ive-child-dob-missing(a named child has no DOB yielding an age at the business date) -
401: Unauthorized
-
403: Forbidden (pure service callers, unassigned caseworkers), or
rules-consult-denied— craig-rules refused a per-child{j}-ive-eligibilityconsult for the acting worker -
404: Case not found
-
409: ive-witness-not-current (categorical token in detail: screening-missing | run-pending | run-invalidated | run-stale | cohort-drift | facts-changed), SCREENING_UNCONFIGURED / SCREENING_IDENTIFIER_MISSING / empty-household from the cohort recompute, or an idempotency conflict; or the parent case is not open — problem type
case-closed; orive-policy-moved— the renderedsurfaceis not the active ruleset identity, found before the consult or by craig-rules at the evaluate (nothing recorded; reload and answer again) -
422: Validation failure — an
ssa_-prefixed or server-derived (IVE_SERVER_KEYS) input key, an empty or oversized child_inputs map, a child key duplicating a case_inputs key, or a missing client_request_id -
500: Internal error (a ruleset output missing a decision key; an assembled document the declared input schema refuses — a server-key defect; a consult answered at a revision other than the expected one — an older craig-rules; or no bundle FMAP entry covering the business date — U-FMAP)
-
503: craig-rules did not answer a per-child
{j}-ive-eligibilityconsult (unreachable, or the 8 s S2S hop budget elapsed —service-unavailable) or answered 503; or exchange unreachable. Nothing is recorded (fail-closed; retry with the same client_request_id); orive-surface-not-ready— the IV-E surface is unverified (detail = the reason token) -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The jurisdiction’s IV-E determination inputs: each declared key with its scope, kind and labels, and the ruleset identity a determination must send back as surface
GET /v1/cases/ive-surface
-
200: The IV-E surface of the active
{j}-ive-eligibilityruleset -
401: Unauthorized
-
403: A pure service caller (no lifted actor)
-
503: The IV-E surface is unverified or unreachable —
ive-surface-not-ready, detail = the reason token -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Open screening-review worklist items
GET /v1/cases/screening-reviews
Post-determination SSA-signal notifications, scoped by the parent case’s assignment: caseworkers see their own cases' items, supervisors their supervised cases', admins all. One open item per case; occurrences count coalesced triggers.
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
Page number (1-based). |
per_page |
query |
No |
Items per page. |
-
200: The scoped open items, newest event first
-
400: Page depth past the cap; a malformed query parameter (e.g. a non-integer
page) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
500: Internal error
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Claim a screening-review item for triage
POST /v1/cases/screening-reviews/{id}/assign
Assigns the OPEN item to the acting worker (self-claim; single triage slot — the deliberate v1 asymmetry with dismissal is recorded in the ADR). Naturally idempotent: re-assigning overwrites the slot.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Worklist item ID |
-
200: The item, assigned
-
401: Unauthorized
-
403: Forbidden
-
404: Item (or its case) not found, or already dismissed
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Dismiss a screening-review item, with the audited reason
POST /v1/cases/screening-reviews/{id}/dismiss
The human decision that new SSA data does not warrant re-determination: who/when/why land on the row AND on the case.screening_review_dismissed audit event, staged in the same transaction. A dismissed case re-notifies as a NEW item on the next trigger.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Worklist item ID |
| Field | Type | Required | Description |
|---|---|---|---|
reason |
string |
Yes |
Why the new SSA signal does not warrant re-determination —
mandatory, recorded in-row AND on the audit event. A NUL (U+0000) is a
422 |
-
200: The item, dismissed
-
401: Unauthorized
-
403: Forbidden
-
404: Item (or its case) not found, or already dismissed
-
422: Missing/empty reason, a reason over 500 bytes or holding a NUL (U+0000) (
validation-failednamingreason, value-free), or a body field whose value does not deserialize, e.g. a non-stringreason(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Investigations
List investigations (from the v_investigations view — every row carries response_timeliness; ?timeliness= filters on the closed four-band set)
GET /v1/cases/investigations
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
worker |
query |
No |
Filter by assigned worker ( |
status |
query |
No |
Filter by status: open, |
search |
query |
No |
Full-text search across |
person_id |
query |
No |
Filter to investigations whose referral has any allegation involving this person (victim or perpetrator). |
timeliness |
query |
No |
Filter by the read-time response-timeliness band — one of
|
sort_by |
query |
No |
Sort column: status, |
sort_dir |
query |
No |
Sort direction: asc or desc (default: desc). |
-
200: Paginated investigations
-
400:
invalid-enum-value—timelinessoutside on_track | overdue | met | met_late, or a page past the depth cap; a malformed query parameter (e.g. a non-UUIDperson_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
422: A filter over its length cap:
status/timeliness/sort_by/sort_dir32,search500 bytes; or a NUL (U+0000) instatusorsearch, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failednaming the parameter, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Open an investigation from a referral — response_due_at is DERIVED from the referral’s response_priority through the jurisdiction’s response-window ruleset on the jurisdiction clock
POST /v1/cases/investigations
| Field | Type | Required | Description |
|---|---|---|---|
assigned_worker |
UUID |
Yes |
Subject id ( |
assignment_area |
string |
Yes |
Geographic or organizational area assignment. A NUL (U+0000) is a 422
|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent replays the original investigation; a
different intent under the same id is a 409 |
referral_id |
UUID |
Yes |
Referral the investigation is opened from. |
-
200: Investigation created (or replayed — same client_request_id + intent; a replay never re-consults rules). The row carries the derived response_due_at, its window provenance and the read-time response_timeliness band.
-
401: Unauthorized
-
403: Forbidden, or
rules-consult-denied— craig-rules refused a consult for the acting worker -
404: Referral not found
-
409:
response-window-undefined(the window ruleset defines no window for the referral’s token — the detail is the ruleset’s basis),response-priority-underivable(a pre-cutover UNDERIVED referral with no authorizing decision),concurrent-modification(a concurrent open derived a different token), client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure — a missing client_request_id, or an unknown body field including the retired
response_due_at, or a NUL (U+0000) inassignment_area(validation-failednaming the field, value-free) -
503: craig-rules is unreachable / over budget / 5xx for a consult (fail-closed; retry)
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get an investigation by ID
GET /v1/cases/investigations/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Investigation ID |
-
200: Investigation found
-
401: Unauthorized
-
403: Forbidden
-
404: Investigation not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update an investigation
PUT /v1/cases/investigations/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Investigation ID |
| Field | Type | Required | Description |
|---|---|---|---|
disposition |
Disposition (optional) |
No |
Disposition |
first_contact_at |
datetime (optional) |
No |
Timestamp the investigator first made contact. |
status |
string (optional) |
No |
New status: |
-
200: Investigation updated
-
400: Invalid status transition, or closing with no disposition recorded — problem type
investigation-disposition-required -
401: Unauthorized
-
403: Forbidden
-
404: Investigation not found
-
409: Concurrent modification — re-read and retry
-
422: A body field whose value does not deserialize, e.g. an unknown
disposition(validation-failed; the field is named, the value never echoed), or astatusover 32 bytes (validation-failed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Override an investigation’s response deadline — ruleset-governed and audited: the jurisdiction’s response-deadline-override arm decides whether THIS actor may move THIS deadline and within what bounds
POST /v1/cases/investigations/{id}/response-deadline
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Investigation ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. Same id |
reason |
string (optional) |
No |
Why the deadline moves — required when the jurisdiction’s arm says
so ( |
response_due_at |
datetime |
Yes |
The requested response deadline. |
-
200: Deadline overridden (or replayed — same client_request_id + intent; a replay never re-consults rules). The row carries the new response_due_at, response_due_original (the deadline the open derived, constant across overrides), response_due_overridden_at / _by / _reason, response_due_override_evaluation_id and the read-time response_timeliness band.
-
401: Unauthorized
-
403:
response-deadline-override-refused(the jurisdiction’s arm refuses this actor / state — the detail is the arm’s basis verbatim),screening-actor-unmapped(the acting worker’s realm roles map to no policy role —adminincluded),rules-consult-denied, or authz refused the operation (a caseworker, even on an assigned investigation) -
404: Investigation not found
-
409:
response-deadline-override-bounds(extend-only arm and the request does not extend, or the extension in whole hours — rounded up from the original derived deadline — exceeds the arm’s maximum),concurrent-modification(status, first contact, the deadline or the original moved between the consult and the write — retry), client_request_id claimed by a different operation, or replayed entity gone -
422: Validation failure — a missing client_request_id, an unknown body field, an over-long reason, or a blank reason where the arm requires one; or a NUL (U+0000) in
reason(validation-failednaming the field, value-free) -
503: craig-rules is unreachable / over budget / 5xx for the consult, or the screening surface is not ready (fail-closed; retry)
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Submit a safety assessment: one answer per fact the safety surface declares (calls Rules Engine)
POST /v1/cases/investigations/{id}/safety-assessment
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Investigation ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the investigation path id)
replays the original assessment — the Rules Engine is NOT
re-consulted on a replay; a different intent under the same id is
a 409 |
facts |
object |
Yes |
Worker-attested safety facts keyed ^[a-z][a-z0-9_]{0,63}$; values are booleans or non-negative integers |
surface |
object |
Yes |
The full identity of the ruleset a surface was read from: a version is
|
worker_override |
SafetyDecision (optional) |
No |
Worker override |
worker_override_reason |
string (optional) |
No |
Free-form reason for the override; required, and not blank, when
|
-
200: Safety assessment recorded (or replayed — same client_request_id + intent; the Rules Engine is not re-consulted on a replay)
-
400:
safety-fact-not-declared— a fact the active safety ruleset does not declare, or a value that is not of the fact’s declared kind; the detail names the key and the expected kind, never the value. Nothing was consulted -
401: Unauthorized
-
403: Forbidden, or
rules-consult-denied— craig-rules refused the safety-assessment consult for the acting worker -
404: Investigation not found
-
409:
safety-policy-moved—surfaceis not the active safety ruleset (found before the consult, or by craig-rules at it); reload the surface and answer again. Or: client_request_id claimed by a different operation, or replayed entity gone. Nothing was recorded -
422:
validation-failed— a malformed body (a missing client_request_id or surface, an unknown field, a repeated fact key, more than 32 facts, a fact value that is not a boolean or a non-negative integer),worker_overridewithout a non-blankworker_override_reason, or a NUL (U+0000) inworker_override_reason(value-free). Orsafety-fact-unanswered— a declared fact has no answer; the detail lists the missing keys -
500: The safety ruleset answered without a
safety_decision, or craig-rules evaluated another revision than the one expected: an upstream defect. Nothing was recorded -
503:
safety-surface-not-ready— the safety surface is unverified or unreachable, detail = the reason token; or craig-rules did not answer the consult. Nothing was recorded -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The jurisdiction’s safety assessment facts: each declared key with its kind and labels, and the ruleset identity an assessment must send back as surface
GET /v1/cases/safety-surface
-
200: The safety surface of the active
{j}-safety-assessmentruleset -
401: Unauthorized
-
403: A pure service caller (no lifted actor)
-
503: The safety surface is unverified or unreachable —
safety-surface-not-ready, detail = the reason token -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
JWS Replay
Service-to-service: dedup a JWS jti for a partner
POST /v1/cases/_internal/jws-replay-check
| Field | Type | Required | Description |
|---|---|---|---|
iat |
integer |
Yes |
The JWS protected-header |
jti |
UUID |
Yes |
The JWS |
partner_id |
UUID |
Yes |
The partner that signed the submission. |
-
200: First seen — recorded.
-
401: Replay detected — duplicate jti for partner.
-
403: Caller lacks
partners.replay-checkscope. -
422: A body field whose value does not deserialize, e.g. a non-UUID
jti(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
NCANDS Export
Service-to-service: one referral-paged page of NCANDS Child File rows for a Federal Fiscal Year
GET /v1/cases/ncands-export
| Name | In | Required | Description |
|---|---|---|---|
ffy |
query |
Yes |
Federal Fiscal Year — the year the FFY ends in (2026 = 2025-10-01 .. 2026-10-01). |
as_of |
query |
Yes |
The cohort instant: referrals created at or before it (RFC 3339). |
after |
query |
No |
The previous page’s |
limit |
query |
No |
Referrals per page, |
-
200: One page of WHOLE referrals' rows from the fixed cohort
received_at ∈ [ffy) AND created_at ⇐ as_of, ordered(received_at, id);next= the opaque cursor of the LAST SCANNED referral when the page was full (a full page of allegation-less referrals is zero rows + a non-nullnext), null on exhaustion -
400: FFY out of range, a malformed
aftercursor, orlimitoutside 1..=500 (an unknown query parameter is the extractor’s value-freebad-requestproblem) -
401: Unauthorized
-
403: Caller is not the craig-reporting service identity
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Persons
Search persons
GET /v1/cases/persons
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
name |
query |
No |
Search by name (case-insensitive partial match over the full
|
date_of_birth |
query |
No |
Filter by exact date of birth. |
ssn_last_four |
query |
No |
Filter by last four digits of SSN (exactly four ASCII digits — the blind index hashes raw bytes, so a non-canonical filter could only ever match nothing; it is rejected up front). |
-
200: Search results.
totalis index-only: anssn_last_fourordate_of_birthfilter matches the stored blind-index digest and the count decrypts nothing, so it can include a row whose digest was tampered with. Every row on the page is decrypted and the digest it matched is re-derived from the decrypted value. An assignment-scoped caller (worker or supervisor) gets an empty page: these rows carry no per-worker ownership, so the scope is refused rather than widened to the jurisdiction. -
400: A page past the depth cap; a malformed query parameter (e.g. a non-date
date_of_birth) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
422: A
nameover its 100-byte length cap, or anssn_last_fourthat is not four ASCII digits; or a NUL (U+0000) inname, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failednaming the parameter, value-free) -
500: A row on the page carries a blind-index digest that does not re-derive from its decrypted value, or a value that does not decrypt: at-rest tampering, so the whole search is refused, never shortened
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Create a person record
POST /v1/cases/persons
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Retrying with the same id + identical intent replays the original
outcome instead of creating a second person; the same id with a
DIFFERENT intent (or another caller’s id) is a 409
|
date_of_birth |
date (optional) |
No |
Date of birth, calendar-date precision. |
dob_estimated_abandoned |
boolean |
No |
|
first_name |
string |
Yes |
First name. A NUL (U+0000) is a 422 |
last_name |
string |
Yes |
Last name. A NUL (U+0000) is a 422 |
sex |
Sex (optional) |
No |
Sex |
ssn |
string (optional) |
No |
Full SSN — write-only: never returned by any read surface. Accepts digits
with optional space/dash separators; the service canonicalizes,
range-validates and derives |
ssn_last_four |
string (optional) |
No |
Last 4 digits of SSN (exactly four ASCII digits; stored encrypted). Rejected
with |
year_of_birth_declared |
integer (optional) |
No |
A declared birth year (1850..=2100) for a person whose full date of birth is
unknown. Mutually exclusive with |
-
200: Person created (or replayed — same client_request_id + intent); a human principal also reads the current demographics facts
-
400: Body carries race, ethnicity or tribal_affiliation (demographics-via-ledger: use POST /v1/cases/persons/{id}/demographics)
-
401: Unauthorized
-
403: Forbidden
-
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in
first_nameorlast_name(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: batched person display names for the foster-parent portal
POST /v1/cases/persons/display-names
{ id → { first_name, last_initial } } for ≤ 50 ids — first name and last initial only, nothing else. Service-only: a worker bearer is refused outright; a service call relaying X-Craig-Actor is refused 403 before the engine or any read; a bare service principal passes only the person ruleset’s display-name row (claims.service_id == 'craig-placement' AND resource.attrs.projection == 'display_name'). Unknown ids are omitted; Cache-Control: no-store.
| Field | Type | Required | Description |
|---|---|---|---|
ids |
array of UUID |
Yes |
Persons to name (≤ |
-
200: Display names keyed by person id (unknown ids omitted); Cache-Control: no-store
-
400: Over the 50-id cap (BATCH_TOO_LARGE, field
ids) -
401: Missing or invalid bearer
-
403: Not a service caller; a relayed (
X-Craig-Actor) call; or a bare service principal the display-name row does not admit -
422: A body field whose value does not deserialize, e.g. a non-UUID entry in
ids(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a person by ID
GET /v1/cases/persons/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
-
200: Person found; a human principal also reads the current demographics facts (null when none), a pure service principal none of those keys
-
401: Unauthorized
-
403: Forbidden
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update a person record
PUT /v1/cases/persons/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
birth_city |
string (optional) |
No |
City or place of birth, as stated. Absent keeps it, |
birth_state |
string (optional) |
No |
US state or territory of birth, as its USPS abbreviation in either case
(stored upper case). Absent keeps it, |
date_of_birth |
date (optional) |
No |
New date of birth. |
dob_estimated_abandoned |
boolean (optional) |
No |
New DOB-estimated/abandoned indicator; absent = unchanged, |
dob_verification |
DobVerification (optional) |
No |
Dob verification |
first_name |
string (optional) |
No |
New first name. A NUL (U+0000) is a 422 |
last_name |
string (optional) |
No |
New last name. A NUL (U+0000) is a 422 |
marital_status |
MaritalStatus (optional) |
No |
Marital status |
middle_name |
string (optional) |
No |
Middle name. Absent keeps it, |
name_suffix |
string (optional) |
No |
Name suffix (Jr., III). Absent keeps it, |
primary_language |
Language (optional) |
No |
Primary language |
sex |
Sex (optional) |
No |
Sex |
ssn |
string (optional) |
No |
New full SSN — write-only; every write resets the verification state
(same-value included, deliberately). Absent = keep; not clearable here (the
audited |
ssn_last_four |
string (optional) |
No |
New |
year_of_birth_declared |
integer (optional) |
No |
New declared birth year (1850..=2100). Mutually exclusive with
|
-
200: Person updated; a human principal also reads the current demographics facts
-
400: Body carries race, ethnicity or tribal_affiliation (demographics-via-ledger: use POST /v1/cases/persons/{id}/demographics)
-
401: Unauthorized
-
403: Forbidden
-
404: Person not found
-
409:
person-identifier-live— the body blanks the first_name or last_name of a person holding a live identifier (nothing written);dob-verification-without-date— the body names how the date of birth was verified and the person has no date of birth once the update is applied (nothing written) -
422: A body field whose value does not deserialize, e.g. a non-date
date_of_birth(validation-failed; the field is named, the value never echoed), or afirst_name/last_nameover 100 bytes, ayear_of_birth_declaredoutside 1850..=2100, anssn_last_fourthat is not four ASCII digits, or anssnover 11 bytes (validation-failed), or a NUL (U+0000) infirst_name,last_name,middle_name,name_suffixorbirth_city(validation-failednaming the field, value-free), or abirth_statethat is no US state or territory USPS abbreviation, or an emptymiddle_name,name_suffixorbirth_city(a fact is cleared withnull) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The demographics row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/persons/{id}/demographics
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400: A malformed query parameter (e.g. a non-date
as_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete demographics statement (a change, or a backfill when effective_until is set)
POST /v1/cases/persons/{id}/demographics
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
ethnicity |
Ethnicity (optional) |
No |
Ethnicity |
race |
RaceResponses (optional) |
No |
Race |
tribal_affiliation |
string (optional) |
No |
(b)(4)(ii): the tribe text (no CHECK against membership — the
blank-unless- |
tribal_member |
YesNoUnknown (optional) |
No |
Tribal member |
tribal_member_or_eligible |
YesNoUnknown (optional) |
No |
Tribal member or eligible |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid(effective_until not after effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
409:
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id or a partial race answer), or a NUL (U+0000) in
tribal_affiliation(validation-failednaming the bare field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live demographics row in force at any point of a period (newest first)
GET /v1/cases/persons/{id}/demographics/history
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
ledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open demographics row’s window
POST /v1/cases/persons/{id}/demographics/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
row_id |
path |
Yes |
The live open row being closed |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(effective_until not after the row’s effective_from) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, another person’s, or not open — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live demographics row (supersede it; omitted bounds are copied from it)
POST /v1/cases/persons/{id}/demographics/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
row_id |
path |
Yes |
The live row being corrected |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
ethnicity |
Ethnicity (optional) |
No |
Ethnicity |
race |
RaceResponses (optional) |
No |
Race |
tribal_affiliation |
string (optional) |
No |
(b)(4)(ii): the tribe text (no CHECK against membership — the
blank-unless- |
tribal_member |
YesNoUnknown (optional) |
No |
Tribal member |
tribal_member_or_eligible |
YesNoUnknown (optional) |
No |
Tribal member or eligible |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(the resolved window is unordered) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, or another person’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in
tribal_affiliation(validation-failednaming the bare field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live demographics row entered in error (no successor)
POST /v1/cases/persons/{id}/demographics/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
row_id |
path |
Yes |
The live row being retracted |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, or another person’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List a person’s identifiers — live, ended and retracted, by id — each masked to its last four
GET /v1/cases/persons/{id}/identifiers
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
-
200: Every identifier of the person, masked
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the person’s read authority
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a person identifier of a kind the jurisdiction declares — the value is encrypted at rest and answered masked to its last four
POST /v1/cases/persons/{id}/identifiers
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The act’s idempotency key. |
effective_from |
date |
Yes |
The first day the identifier is in effect (on or before today). |
kind |
string |
Yes |
A kind token of the jurisdiction’s identifier vocabulary ( |
value |
string |
Yes |
The value, exactly as the kind’s format requires (never trimmed). |
-
201: Recorded, masked (the same answer on a replay of the same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the person’s update authority
-
404: Person not found
-
409:
person-identifier-duplicate(the person already holds a live identifier of this kind, or the value is live on a person record — the detail names neither), oridempotency-conflict/ replayed entity gone -
422: Validation failure,
identifier-kind-unknown(a kind outside the vocabulary, or none declared),identifier-format-invalid(the value does not match the kind’s format; never echoed),identifier-dates-invalid(effective_from after today), orperson-demographics-incomplete(no date of birth, or a blank first or last name — nothing written) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
End a live person identifier on a date on or after its effective_from and on or before today
POST /v1/cases/persons/{id}/identifiers/{identifier_id}/end
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
identifier_id |
path |
Yes |
The live identifier acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The act’s idempotency key. |
effective_until |
date |
Yes |
The last day the identifier is in effect (on or after its
|
-
200: Ended, masked (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the person’s update authority
-
404: Person not found, or
ledger-row-not-found(the identifier is absent, another person’s, retired or ended — nothing written) -
409:
idempotency-conflict/ replayed entity gone -
422: Validation failure,
identifier-kind-unknown(no kind declared), oridentifier-dates-invalid(effective_until after today or before the identifier’s effective_from) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a person identifier entered in error (live or ended)
POST /v1/cases/persons/{id}/identifiers/{identifier_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
identifier_id |
path |
Yes |
The identifier acted on |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: Retracted, masked (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the person’s update authority
-
404: Person not found, or
ledger-row-not-found(the identifier is absent, another person’s or already retired — nothing written) -
409:
idempotency-conflict/ replayed entity gone -
422: Validation failure (a missing client_request_id, a note out of bounds, or a NUL (U+0000) in
note—validation-failednamingnote, value-free), oridentifier-kind-unknown(no kind declared) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Reveal a person identifier’s whole value — an audited act: one case.person_pii_exported event naming the revealing worker is committed before the value is decrypted
POST /v1/cases/persons/{id}/identifiers/{identifier_id}/reveal
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
identifier_id |
path |
Yes |
The identifier revealed (live, ended or retracted) |
-
200: The whole value, answered Cache-Control: no-store
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused, as is a caller without the person’s approve authority
-
404: Person not found, or
ledger-row-not-found(the identifier is not this person’s) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The parentage row in force on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/persons/{id}/parentage
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400: A malformed query parameter (e.g. a non-date
as_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a complete parentage statement — parents_abandoned (required) and sole_legal_parent (a change, or a backfill when effective_until is set)
POST /v1/cases/persons/{id}/parentage
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
parents_abandoned |
boolean |
Yes |
(c)(1) / (c)(2) |
sole_legal_parent |
boolean (optional) |
No |
(c)(2) |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid(effective_until not after effective_from), orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
409:
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id or parents_abandoned)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live parentage row in force at any point of a period (newest first)
GET /v1/cases/persons/{id}/parentage/history
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
ledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open parentage row’s window
POST /v1/cases/persons/{id}/parentage/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
row_id |
path |
Yes |
The live open row being closed |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(effective_until not after the row’s effective_from) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, another person’s, or not open — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live parentage row (supersede it; omitted bounds are copied from it)
POST /v1/cases/persons/{id}/parentage/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
row_id |
path |
Yes |
The live row being corrected |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
parents_abandoned |
boolean |
Yes |
(c)(1) / (c)(2) |
sole_legal_parent |
boolean (optional) |
No |
(c)(2) |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(the resolved window is unordered) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, or another person’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id or parents_abandoned)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live parentage row entered in error (no successor)
POST /v1/cases/persons/{id}/parentage/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
row_id |
path |
Yes |
The live row being retracted |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, or another person’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The child’s parent links in force on a date, in the (c)(1)/(c)(2) parent order (absent as_of = today on the jurisdiction clock)
GET /v1/cases/persons/{id}/parents
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live links in force on as_of, ordered by role rank (mother, father, legal_guardian, putative_parent), effective_from, recorded_at, id (empty when none)
-
400: A malformed query parameter (e.g. a non-date
as_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Link the child to parent_person_id with a role and legal responsibility from effective_from (a backfill when effective_until is set)
POST /v1/cases/persons/{id}/parents
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the relation holds. |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
legal_responsibility |
boolean (optional) |
No |
The parent holds legal responsibility for the child; |
parent_person_id |
UUID |
Yes |
The parent (another person than the child). |
role |
enum (mother, father, legal_guardian, putative_parent) |
Yes |
Who a parent is to the child (the
|
-
200: Link recorded (or replayed — same client_request_id + intent)
-
400:
bad-requeston parent_person_id (the child named as their own parent),ledger-not-a-change(effective_from on or before the open link’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Child or parent person not found
-
409:
ledger-window-overlap(the window overlaps a live link of the pair), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (a putative parent with legal_responsibility true, or a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live parent link of the child in force at any point of a period (newest first)
GET /v1/cases/persons/{id}/parents/history
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live links in force at any point of [from, to]
-
400:
ledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open parent link’s window (the relation ended)
POST /v1/cases/persons/{id}/parents/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
row_id |
path |
Yes |
The live open link being closed |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed link (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(effective_until not after the link’s effective_from) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the link is absent, retired, another child’s, or not open — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live parent link of the parent the body names (supersede it; omitted bounds are copied from it)
POST /v1/cases/persons/{id}/parents/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
row_id |
path |
Yes |
The live link being corrected |
| Field | Type | Required | Description |
|---|---|---|---|
parent_person_id |
UUID |
Yes |
The predecessor’s parent. |
-
200: Successor link (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(the resolved window is unordered) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Child or parent person not found, or
ledger-row-not-found(the link is absent, retired, another child’s, or another parent’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (a putative parent with legal_responsibility true, or a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live parent link entered in error (no successor) — a wrong parent is retracted and re-recorded
POST /v1/cases/persons/{id}/parents/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (the child) |
row_id |
path |
Yes |
The live link being retracted |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired link (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the link is absent, retired, or another child’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Where the person lives on a date (absent as_of = today on the jurisdiction clock)
GET /v1/cases/persons/{id}/residences
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live row in force on as_of
-
204: No live row is in force on as_of
-
400: A malformed query parameter (e.g. a non-date
as_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record where the person lives (a change, or a backfill when effective_until is set)
POST /v1/cases/persons/{id}/residences
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
admin_unit |
string |
Yes |
The administrative unit (a county, a parish) the person lives in.
Where the deployment’s jurisdiction has a table of its units the
name is matched without regard to case, stored in its canonical
spelling, and refused 400 |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the statement holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
-
200: Row recorded (or replayed — same client_request_id + intent)
-
400:
ledger-not-a-change(effective_from on or before the open row’s — use the corrections act),ledger-window-invalid(effective_until not after effective_from),ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24), orinvalid-enum-valueonadmin_unit(the deployment’s jurisdiction has a table of its units and none has that name) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
409:
ledger-window-overlap(the window overlaps a live row), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id, or an
admin_unitthat is empty or over 100 bytes), or a NUL (U+0000) inadmin_unit(validation-failednaming the bare field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live residence row in force at any point of a period (newest first)
GET /v1/cases/persons/{id}/residences/history
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live rows in force at any point of [from, to]
-
400:
ledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open residence row’s window
POST /v1/cases/persons/{id}/residences/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
row_id |
path |
Yes |
The live open row being closed |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed row (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(effective_until not after the row’s effective_from) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, another person’s, or not open — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live residence row (supersede it; omitted bounds are copied from it)
POST /v1/cases/persons/{id}/residences/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
row_id |
path |
Yes |
The live row being corrected |
| Field | Type | Required | Description |
|---|---|---|---|
admin_unit |
string |
Yes |
The administrative unit (a county, a parish) the person lives in.
Where the deployment’s jurisdiction has a table of its units the
name is matched without regard to case, stored in its canonical
spelling, and refused 400 |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
-
200: Successor row (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(the resolved window is unordered),ledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24), orinvalid-enum-valueonadmin_unit(the deployment’s jurisdiction has a table of its units and none has that name) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, or another person’s — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id, or an
admin_unitthat is empty or over 100 bytes), or a NUL (U+0000) inadmin_unit(validation-failednaming the bare field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live residence row entered in error (no successor)
POST /v1/cases/persons/{id}/residences/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
row_id |
path |
Yes |
The live row being retracted |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired row (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the row is absent, retired, or another person’s — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: release the staged screening identifier for SSA screening
POST /v1/cases/persons/{id}/screening-identifier-release
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
identifier_id |
UUID |
Yes |
The staged person identifier’s id. |
requested_by |
UUID |
Yes |
The caseworker who requested the screening run (the run’s
|
screening_member_id |
UUID |
Yes |
The id of the screening member this release feeds. |
screening_run_id |
UUID |
Yes |
The requesting SSA screening run’s id. |
-
200: The identifier is the person’s live identifier of the screening kind — its value released (the release audit committed first); Cache-Control: no-store
-
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Person not found
-
409: SCREENING_IDENTIFIER_STALE — the identifier is not the person’s, not of the screening kind (or none is configured), or no longer live; audited, nothing released
-
422: A body field whose value does not deserialize, e.g. a non-UUID
identifier_id(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The sibling links in force on a date with the person on either side (absent as_of = today on the jurisdiction clock)
GET /v1/cases/persons/{id}/siblings
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
as_of |
query |
No |
The anchor date; absent = today on the jurisdiction clock. The row
in force is the live row with |
-
200: The live links in force on as_of, newest first (empty when none)
-
400: A malformed query parameter (e.g. a non-date
as_of) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Link the person and sibling_person_id as siblings from effective_from (a backfill when effective_until is set)
POST /v1/cases/persons/{id}/siblings
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date |
Yes |
First day the link holds (on or before today, jurisdiction clock). |
effective_until |
date (optional) |
No |
Present only for a backfill: the first day it no longer holds. |
sibling_person_id |
UUID |
Yes |
The other person of the pair (never the path person). |
-
200: Link recorded (or replayed — same client_request_id + intent); the pair is stored lower id first
-
400:
bad-requeston sibling_person_id (the person linked to themself),ledger-not-a-change(effective_from on or before the open link’s — use the corrections act),ledger-window-invalid, orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person or sibling person not found
-
409:
ledger-window-overlap(the window overlaps a live link of the pair), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Every live sibling link with the person on either side in force at any point of a period (newest first)
GET /v1/cases/persons/{id}/siblings/history
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
from |
query |
Yes |
The first day of the period. |
to |
query |
Yes |
The last day of the period (on or after |
-
200: The live links in force at any point of [from, to]
-
400:
ledger-window-invalid(to is before from); a malformed query parameter (e.g. a missing or non-datefrom) is the extractor’s value-freebad-requestproblem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) isledger-date-before-minimum -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Close the open sibling link’s window
POST /v1/cases/persons/{id}/siblings/{row_id}/close
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (either side of the pair) |
row_id |
path |
Yes |
The live open link being closed |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_until |
date |
Yes |
The first day the facts no longer hold (after the row’s
|
-
200: The closed link (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(effective_until not after the link’s effective_from) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the link is absent, retired, does not involve the person, or is not open — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Correct a live sibling link’s window (supersede it; omitted bounds are copied from it) — a wrong pair is retracted, never corrected
POST /v1/cases/persons/{id}/siblings/{row_id}/corrections
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (either side of the pair) |
row_id |
path |
Yes |
The live link being corrected |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
effective_from |
date (optional) |
No |
A corrected window start; omitted = the predecessor’s. |
effective_until |
date (optional) |
No |
A corrected window end; omitted = the predecessor’s. |
-
200: Successor link (or replayed — same client_request_id + intent)
-
400:
ledger-window-invalid(the resolved window is unordered) orledger-date-after-today(orledger-date-before-minimum, a date before -4713-11-24) -
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the link is absent, retired, or does not involve the person — nothing written) -
409:
ledger-window-overlap(the corrected window overlaps a neighbour), or client_request_id claimed by a different operation / replayed entity gone -
422: Validation failure (including a missing client_request_id)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Retract a live sibling link entered in error (no successor)
POST /v1/cases/persons/{id}/siblings/{row_id}/retract
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID (either side of the pair) |
row_id |
path |
Yes |
The live link being retracted |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. |
note |
string |
Yes |
Why the row was entered in error (stored as |
-
200: The retired link (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden — a pure service principal is always refused
-
404: Person not found, or
ledger-row-not-found(the link is absent, retired, or does not involve the person — nothing written) -
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id, an empty note, or a NUL (U+0000) in
note—validation-failednamingnote, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Audited SSN clear — removes all four SSN columns
DELETE /v1/cases/persons/{id}/ssn
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
reason |
string |
Yes |
Why the SSN is being removed. A NUL (U+0000) is a 422
|
-
200: Cleared — idempotent: a replayed clear on an already-clear row is a no-op and stages no duplicate audit event
-
401: Unauthorized
-
403: Forbidden (non-admin, incl. pure service callers)
-
404: Person not found
-
422: A body field whose value does not deserialize, e.g. a non-string
reason(validation-failed; the field is named, the value never echoed), or an emptyreasonor one over 500 bytes (validation-failed), or a NUL (U+0000) inreason(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
SSN verification status + attestation digest
GET /v1/cases/persons/{id}/ssn-verification
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
-
200: Verification status
-
401: Unauthorized
-
403: Forbidden (incl. pure service callers)
-
404: Person not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Attest the stored SSN (value-bound)
POST /v1/cases/persons/{id}/ssn-verification
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
digest |
string |
Yes |
The digest the attester reviewed (from the digest GET), in canonical
|
method |
string |
Yes |
Evidence source (e.g. |
-
200: Attested — or a replayed same-digest attestation, which is a no-op: the original record stands, nothing is re-stamped
-
401: Unauthorized
-
403: Forbidden (incl. pure service callers)
-
404: Person not found
-
409: No SSN on file (MISSING_SSN), digest stamped under a rotated-away blind-index version (SSN_DIGEST_VERSION_ROTATED — re-fetch), digest mismatch (STALE_ATTESTATION), or verification state moved concurrently (CONCURRENT_MODIFICATION)
-
422: A body field whose value does not deserialize, e.g. a malformed
digest(validation-failed; the field is named, the value never echoed), or an emptymethodor one over 500 bytes (validation-failed), or a NUL (U+0000) inmethod(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Revoke SSN verification
DELETE /v1/cases/persons/{id}/ssn-verification
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Person ID |
| Field | Type | Required | Description |
|---|---|---|---|
reason |
string |
Yes |
Why the verification is being revoked. A NUL (U+0000) is a 422
|
-
200: Revoked — idempotent: a replayed revoke on an already-unverified row is a no-op and stages no duplicate audit event
-
401: Unauthorized
-
403: Forbidden (incl. pure service callers)
-
404: Person not found
-
422: A body field whose value does not deserialize, e.g. a non-string
reason(validation-failed; the field is named, the value never echoed), or an emptyreasonor one over 500 bytes (validation-failed), or a NUL (U+0000) inreason(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Service-to-service: record one SSA screening member outcome atomically
POST /v1/cases/ssa-screening-outcomes
| Field | Type | Required | Description |
|---|---|---|---|
authority |
enum (gateway, non_authoritative_stub) |
Yes |
The caller-asserted send-authority discriminator (see the module doc: defense-in-depth, not a lock). |
identifier_id |
UUID |
Yes |
The person identifier the run bound: cases refuses the outcome, writing nothing, unless that row is still live. |
outcome |
object |
Yes |
The member’s categorical outcome. |
person_id |
UUID |
Yes |
The person screened. |
requested_by |
UUID |
Yes |
Stage-time actor attribution (the run creator’s sub). |
run_id |
UUID |
Yes |
The screening run (provenance pointer; validity re-checked exchange-side under the claim fence, carried here for the projection row). |
screening_member_id |
UUID |
Yes |
The screening member this outcome resolves. |
transaction_id |
UUID |
Yes |
The member’s transaction id — the claim key (see module doc). |
-
200: Idempotent replay — the ORIGINAL outcome re-derived from the projection row
-
201: Outcome recorded (the entries' facts, a
terminatedfact for each active benefit a screened answer leaves out, and the projection row, one transaction) -
400:
duplicate-entry— the outcome lists one (benefit_kind,beneficiary_role) pair twice (fieldoutcome.entries); nothing was written -
401: Unauthorized
-
403: Caller is not the craig-exchange service identity
-
404: Person not found
-
409: The staged identifier is no longer the person’s live identifier of the screening kind (SCREENING_IDENTIFIER_STALE — zero writes), or a non-Gateway authority (NON_AUTHORITATIVE_SOURCE)
-
422: A body field whose value does not deserialize, e.g. a non-UUID
run_id(validation-failed; the field is named, the value never echoed), or anoutcomelisting more than 16 entries, or an entry whosebeneficiary_roleis empty, over 32 bytes or malformed, or ascreened_monththat is not the first day of a month (validation-failed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Referrals
List referrals
GET /v1/cases/referrals
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
worker |
query |
No |
Filter by creating worker. A NUL (U+0000), which the query’s |
admin_unit |
query |
No |
Filter by administrative unit (county / region). When the deployment’s
jurisdiction is a US state the value passes the create belt:
any casing of a known unit filters on its canonical name, and an
unknown name is the typed 400 |
search |
query |
No |
Substring search across the plaintext |
person_id |
query |
No |
Filter to referrals where this person appears as victim or perpetrator on any allegation. |
sort_by |
query |
No |
Sort column: |
sort_dir |
query |
No |
Sort direction: asc or desc (default: desc). |
-
200: Paginated list of referrals. An assignment-scoped caller (worker or supervisor) gets an empty page: these rows carry no per-worker ownership, so the scope is refused rather than widened to the jurisdiction.
-
400:
invalid-enum-valueonadmin_unit— the deployment’s jurisdiction is a US state and?admin_unit=names no administrative unit in it (the lookup is case-insensitive and a known unit filters on its canonical name); a malformed query parameter (e.g. a non-UUIDperson_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
422: A filter over its length cap:
worker64,admin_unit100,search500,sort_by/sort_dir32 bytes; or a NUL (U+0000) inworkerorsearch, or inadmin_unitwhere the jurisdiction has no US unit table, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failednaming the parameter, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a referral with its allegations
GET /v1/cases/referrals/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Referral ID |
-
200: Referral found
-
401: Unauthorized
-
403: Forbidden
-
404: Referral not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Add an allegation to a referral
POST /v1/cases/referrals/{id}/allegations
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Referral ID |
| Field | Type | Required | Description |
|---|---|---|---|
abuse_type |
enum (physical_abuse, sexual_abuse, neglect, emotional_abuse, medical_neglect, sex_trafficking, labor_trafficking, sexual_exploitation) |
Yes |
Type of maltreatment — the NCANDS maltreatment-type category. The literal NCANDS Child File |
child_fatality |
boolean |
No |
Whether this maltreatment allegation was fatal to the child — the NCANDS
Child File maltreatment-death (element 34) source. Defaults to |
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent (including the referral path id)
replays the original allegation; a different intent under the
same id is a 409 |
description |
string (optional) |
No |
Free-form narrative description of the allegation. A NUL (U+0000) is
a 422 |
disposition |
Disposition (optional) |
No |
Disposition |
perpetrator_id |
UUID (optional) |
No |
Person ID of the alleged perpetrator (optional). |
victim_id |
UUID |
Yes |
Person ID of the child victim. |
-
200: Allegation created (or replayed — same client_request_id + intent)
-
401: Unauthorized
-
403: Forbidden
-
404: Referral not found
-
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id), or a NUL (U+0000) in
description(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Update an allegation’s maltreatment disposition
PUT /v1/cases/referrals/{id}/allegations/{allegation_id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Referral ID |
allegation_id |
path |
Yes |
Allegation ID |
| Field | Type | Required | Description |
|---|---|---|---|
child_fatality |
boolean (optional) |
No |
Updated child-fatality indicator (NCANDS element 34); |
disposition |
Disposition (optional) |
No |
Disposition |
version |
integer |
Yes |
The allegation |
-
200: Allegation updated
-
401: Unauthorized
-
403: Forbidden
-
404: Referral or allegation not found
-
409: Version moved — concurrent modification; re-read and retry
-
422: A body field whose value does not deserialize, e.g. a non-integer
version(validation-failed; the field is named, the value never echoed) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Report Attachments
List attachments for a report
GET /v1/cases/reports/{id}/attachments
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
-
200: Attachments. An assignment-scoped caller (worker or supervisor) gets an empty list: these rows carry no per-worker ownership, so the scope is refused rather than widened to the jurisdiction.
-
401: Unauthorized
-
404: Report not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Upload an attachment to a report
POST /v1/cases/reports/{id}/attachments
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
The client-held idempotency key: a byte- and metadata-identical retry under the same id replays the same attachment. |
file |
binary |
Yes |
The attachment bytes; the part’s content type must be an allowed type the bytes match. |
file_sha256 |
string |
Yes |
The lowercase-hex SHA-256 of the file bytes (64 characters); a digest that does not match the bytes is a 400. |
-
200: Attachment uploaded (a byte- and metadata-identical retry under the same client_request_id replays the SAME attachment)
-
400: Validation error (too large, disallowed MIME, missing file, missing client_request_id / file_sha256, or a digest that does not match the bytes)
-
401: Unauthorized
-
403: Forbidden: the caller may not read this report or may not attach files to reports (including a foreign actor replaying another’s client_request_id)
-
404: Report not found
-
409: Concurrent retries kept finalizing this upload; retry the request
-
422: client_request_id reused with a different upload
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Delete a report attachment (soft-delete + object-store blob removed)
DELETE /v1/cases/reports/{id}/attachments/{att_id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
att_id |
path |
Yes |
Attachment ID |
-
204: Deleted
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Download an attachment blob
GET /v1/cases/reports/{id}/attachments/{att_id}/download
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
att_id |
path |
Yes |
Attachment ID |
-
200: Attachment file
-
206: Partial content: the one
Rangeslice (bytes=a-b,a-or-n) withContent-Range,Accept-Ranges: bytesand the slice’sContent-Length; honoured only when anIf-Rangestrong-matches theETag. A multi-range request is the full 200 -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
416: Range not satisfiable:
Content-Range: bytes */<length> -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Report Persons
Confirm a person link for a report entry
POST /v1/cases/reports/{id}/person-links
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency key. REQUIRED —
an own-retry with the same key + identical intent replays the
stored link (200) instead of tripping the natural-key 409; the
|
jsonb_index |
integer (optional) |
No |
Index into the report’s |
person_id |
UUID |
Yes |
UUID of the |
role |
string |
Yes |
|
ruleset_name |
string (optional) |
No |
|
ruleset_version |
string (optional) |
No |
Companion to |
-
200: Link created (or replayed — same client_request_id + intent)
-
400: Bogus role or jsonb_index
-
401: Unauthorized
-
403: Forbidden
-
404: Report or person not found
-
409: Natural-key duplicate under a DIFFERENT client_request_id, a client_request_id claimed by a different operation, or a replayed entity gone
-
422: Validation failure (including a missing client_request_id), a
ruleset_nameoutside the rule-set name grammar (1 to 64 bytes of^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$, a NUL included), or a NUL (U+0000) inruleset_version(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Unlink a person from a report entry
DELETE /v1/cases/reports/{id}/person-links/{link_id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
link_id |
path |
Yes |
report_persons row ID |
-
200: Link removed
-
401: Unauthorized
-
403: Forbidden
-
404: Link not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Rank candidate persons per child/adult JSONB entry
GET /v1/cases/reports/{id}/person-suggestions
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
seed_case_id |
query |
No |
Optional case id whose |
-
200: Ranked candidates per entry
-
400: A malformed query parameter (e.g. a non-UUID
seed_case_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden — including the relayed person-match consult refused by craig-rules for the acting worker (problem type
rules-consult-denied) -
404: Report not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Reports
List reports (summary projection)
GET /v1/cases/reports
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size (default |
partner_id |
query |
No |
Filter by submitting partner UUID. |
admin_unit |
query |
No |
Filter by administrative unit (county / region). When the deployment’s
jurisdiction is a US state the value passes the create belt:
any casing of a known unit filters on its canonical name, and an
unknown name is the typed 400 |
person_id |
query |
No |
Filter to reports that have at least one |
search |
query |
No |
Substring search over the plaintext |
sort_by |
query |
No |
Sort column: |
sort_dir |
query |
No |
Sort direction: asc or desc (default: desc). |
-
200: Paginated report summaries: six keys per item — id, received_at, reporter_type, reporter_relation, admin_unit, narrative_preview (first 160 chars + U+2026 iff truncated). The full report shape is detail-GET / create-echo only. An assignment-scoped caller (worker or supervisor) gets an empty page: these rows carry no per-worker ownership, so the scope is refused rather than widened to the jurisdiction.
-
400:
invalid-enum-valueonadmin_unit— the deployment’s jurisdiction is a US state and?admin_unit=names no administrative unit in it (the lookup is case-insensitive and a known unit filters on its canonical name); a malformed query parameter (e.g. a non-UUIDperson_id) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
422: A filter over its length cap:
admin_unit100,search500,sort_by/sort_dir32 bytes; or a NUL (U+0000) insearch, or inadmin_unitwhere the jurisdiction has no US unit table, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failednaming the parameter, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Submit a report (craig-intake after partner auth; or a staff member via craig-web / the CLI with the attested receipt)
POST /v1/cases/reports
| Field | Type | Required | Description |
|---|---|---|---|
admin_unit |
string |
Yes |
Administrative unit owning the report. When the deployment’s jurisdiction is
a US state / territory the name is validated against its administrative-unit
list (case-insensitive) and the canonical name is stored, echoed, and copied
onto the referral at conversion; an unknown name is the typed 400
|
adults |
object |
No |
JSONB array of |
children |
object |
No |
JSONB array of |
narrative |
string |
Yes |
Free-text narrative (PII; server stores encrypted). |
partner_context |
object |
Yes |
Who submitted a report: |
raw_submission |
object |
Yes |
Verbatim partner payload for audit/replay. It may nest at most 32
levels, hold at most 10,000 values, and no string or key longer than
32,768 bytes; past a limit it is a 422 |
received_at |
datetime (optional) |
No |
The attested actual receipt instant of a staff-entered intake — when the
phone call came in, not when it was keyed. Omitted ⇒ the submission instant.
Must not be later than the submission (the handler allows a small clock
skew, then answers a 422 |
received_ip_hash |
string (optional) |
No |
HMAC-SHA256 hash of the originating IP, stored as sent. A NUL (U+0000) is a
422 |
received_request_id |
UUID |
Yes |
Idempotency key surfaced from the intake edge. UNIQUE per submission. |
report_source |
enum (social_services_personnel, medical_personnel, mental_health_personnel, legal_law_enforcement_personnel, education_personnel, child_daycare_provider, substitute_care_provider, alleged_victim, parent, other_relative, friends_neighbors, alleged_perpetrator, anonymous_reporter, other, unknown) |
Yes |
NCANDS report source — field #10 Transcribed from the NDACAN NCANDS Child File Codebook (rev 2025-09-12);
one variant per codebook value, so
|
reporter_anonymous |
boolean |
No |
The reporter chose to report anonymously (intake’s |
reporter_first_name |
string (optional) |
No |
Reporter’s first name (PII; stored encrypted). |
reporter_last_name |
string (optional) |
No |
Reporter’s last name (PII; server stores encrypted). |
reporter_phone |
string (optional) |
No |
Reporter’s phone (PII; server stores encrypted). |
reporter_relation |
RelationshipToChild (optional) |
No |
Reporter relation |
reporter_type |
enum (mandated, professional, anonymous, self_report, law_enforcement, concerned_citizen) |
Yes |
The reporter’s STATUS — mandated / professional / anonymous / self /
law-enforcement / lay-public. This is a CRAIG intake axis (it drives the
mandated-reporter signing and category rules), NOT the NCANDS report
source: the federal |
-
200: Report submitted (or replayed — duplicate received_request_id with a matching intent digest, i.e. the same submission by the same actor)
-
400:
invalid-enum-valueonadmin_unit— the deployment’s jurisdiction is a US state and no administrative unit of that name exists in it (the lookup is case-insensitive and the stored value is the canonical name) -
401: Unauthorized
-
403: Forbidden
-
409: Duplicate received_request_id with a DIFFERENT intent digest (a lifetime claim), or against a stored row that carries no digest (a seeded row, which no retry may replay)
-
422: A body field whose value does not deserialize, e.g. a non-UUID
received_request_id(validation-failed; the field is named, the value never echoed), or a field over its length cap, areceived_atmore than a minute in the future, orreporter_anonymoustrue for areporter_typeother thanconcerned_citizen(validation-failed), or a NUL (U+0000) inreceived_ip_hash, or in the free-textadmin_unitof a jurisdiction without a US unit table (validation-failednaming the field, value-free); or more than 10children(screening-report-too-large) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Get a report with its effective disposition and follow-ups
GET /v1/cases/reports/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
-
200: Report found
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Convert a screened-in report into a referral — the referral’s response_priority is DERIVED by the jurisdiction’s response-priority roll-up over the effective decision’s per-child tokens
POST /v1/cases/reports/{id}/convert
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
| Field | Type | Required | Description |
|---|---|---|---|
icwa_flag |
boolean |
No |
|
seed_case_id |
UUID (optional) |
No |
Optional case id whose household persons join the auto-link candidate seed set. |
-
200: Referral created (idempotent: returns the existing referral if already converted — a replay never re-consults rules). Person auto-link runs ASYNC via the case.report_converted consumer — 200 means the referral committed; links land shortly after.
-
400: Report not in a convertible disposition, or no screening decision recorded
-
401: Unauthorized
-
403:
rules-consult-denied— craig-rules refused the response-priority consult for the acting worker -
404: Report not found
-
409:
screening-decision-superseded— the effective decision changed between the roll-up consult and the insert (retry; a converter that lost the race to a peer’s committed conversion converges on the stored referral), or concurrent non-superseding decisions are effective -
422: An unknown body field — including the retired
priority— or a field whose value does not deserialize, e.g. a malformedseed_case_id(the field is named, the value never echoed) -
503: The screening surface is unverified (
screening-surface-not-ready), or craig-rules is unreachable / over budget / 5xx for the roll-up consult (fail-closed; retry) -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List the full decision chain for a report, newest first
GET /v1/cases/reports/{id}/decisions
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
-
200: Decision chain
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Reveal an anonymous report’s reporter contact details (audited)
POST /v1/cases/reports/{id}/reporter-contact/reveal
Returns the contact details the reporter volunteered with an anonymous report, which the report detail view and the referral conversion omit. The caller needs read and then reveal on the report, so a reveal is never wider than a read; the shipped rulesets grant reveal to supervisors and admins only. Each reveal is audited before the details are returned. A report that is not anonymous has nothing redacted: 409.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
-
200: The reporter’s volunteered contact details
-
401: Unauthorized
-
403: Caller may not read the report, or may not reveal
-
404: Report not found
-
409:
report-not-anonymous— the report is not anonymous, so nothing is redacted, revealed or audited -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Record a screening decision (initial or override) — consults the jurisdiction’s intake-screening ruleset with the attested facts and the server-derived evidence
POST /v1/cases/reports/{id}/screening-decisions
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
| Field | Type | Required | Description |
|---|---|---|---|
attested |
object |
No |
Worker-attested facts keyed ^[a-z][a-z0-9_]{0,63}$; values are booleans or tokens |
attested_response_priority |
OutputToken (optional) |
No |
Attested response priority |
client_request_id |
UUID |
Yes |
Client-minted idempotency key. REQUIRED — a retry with the same key + identical intent replays the first execution’s decision instead of appending to the chain. |
disposition_kind |
string |
Yes |
Decision outcome — one of the ruleset’s |
rationale |
string |
Yes |
The worker’s stated reason — required, at least one non-blank
character. A NUL (U+0000) is a 422 |
supersedes_id |
UUID (optional) |
No |
If overriding a prior decision, the |
-
200: Decision recorded (or replayed — same client_request_id + intent)
-
400:
screening-fact-not-declared(an attested key is not attestable or off-type), an invalid disposition_kind, or a supersedes_id on another report -
401: Unauthorized
-
403:
screening-actor-unmapped(the acting worker’s realm roles map to no screening role),screening-override-not-authorized(incl. a prior whose actor_role no mapping names — the pre-cutover tokens are rewritten by a contract migration), or a pure service caller, orrules-consult-denied— craig-rules refused a screening consult for the acting worker -
404: Report or prior decision not found
-
409:
screening-disposition-inadmissible(a binding admissibility row refused),screening-policy-moved(the ruleset revision moved mid-act — a promotion before or during the per-child consult, which craig-rules refuses asruleset-movedagainst the surface’s identity — retry), a concurrent leaf, or a client_request_id claimed by a different operation -
422: Validation failure (a blank rationale, an unknown field such as the removed actor_role, more than 32 attested facts, a repeated key, an
attested_response_priorityoutside the surface’s attestable set —NONEincluded; or a NUL (U+0000) inrationale,validation-failednaming the field, value-free) orscreening-report-too-large -
500: The jurisdiction maps the reporter’s concern to more than one allegation token and their per-child evaluations disagreed on a stored output: the act fails closed and nothing is recorded. The body is the generic internal error; the server log names the subject, the tokens and the output, never values
-
503:
screening-surface-not-ready— the screening surface is unverified or unreachable; detail = the reason token. Orservice-unavailable— craig-rules did not answer a per-child decision consult (unreachable, or the 8 s S2S hop budget elapsed) or answered 503. Nothing is recorded (fail-closed; retry) -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The per-subject evaluation evidence of one screening decision (current or superseded)
GET /v1/cases/reports/{id}/screening-decisions/{decision_id}/evaluations
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
decision_id |
path |
Yes |
Screening decision ID |
-
200: The decision’s evaluations, one per evaluated subject
-
401: Unauthorized
-
403: Forbidden
-
404: Report or decision not found (a decision on another report is not found here)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
List follow-up actions attached to a specific decision
GET /v1/cases/reports/{id}/screening-decisions/{decision_id}/follow-ups
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
decision_id |
path |
Yes |
Screening decision ID |
-
200: Follow-ups for decision
-
401: Unauthorized
-
403: Forbidden
-
404: Report or decision not found (a decision on another report is not found here)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Attach a follow-up action (external referral, LE assist, info packet) to a decision
POST /v1/cases/reports/{id}/screening-decisions/{decision_id}/follow-ups
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Report ID |
decision_id |
path |
Yes |
Screening decision ID |
| Field | Type | Required | Description |
|---|---|---|---|
action_kind |
string |
Yes |
Action kind ( |
client_request_id |
UUID |
Yes |
Client-minted idempotency key. REQUIRED — a retry with the same key + identical intent replays the first execution’s follow-up instead of recording it twice. |
notes |
string (optional) |
No |
Free-form notes. A NUL (U+0000) is a 422 |
target |
string (optional) |
No |
Optional target entity (person UUID, agency, etc.): at most 500 bytes (a 422
|
-
200: Follow-up recorded (or replayed — same client_request_id + intent)
-
400: Invalid action_kind
-
401: Unauthorized
-
403: Forbidden by policy, or
worker-required: a service principal cannot act for a worker -
404: Report or decision not found (a decision on another report is not found here)
-
409: client_request_id claimed by a different operation, or replayed entity gone
-
422: Validation failure (including a missing client_request_id), a
targetover 500 bytes, or a NUL (U+0000) intargetornotes(validation-failednaming the field, value-free) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
The jurisdiction’s screening surface: the caller’s derived role, the disposition kinds, the attestable facts with their kinds and the attestable response priorities
GET /v1/cases/screening-surface
-
200: The screening surface
-
401: Unauthorized
-
403: A pure service caller (no lifted actor)
-
503: The screening surface is unverified or unreachable —
screening-surface-not-ready, detail = the reason token -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Search Capabilities
Advertise per-entity, per-field search capabilities
GET /v1/cases/_meta/search-capabilities
-
200: Advertised capabilities for every entity: effective-scheme capability intersected with the entity descriptor’s declared operations
-
401: Unauthorized
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.