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.

Table 1. Request Fields
Field Type Required Description

adults

array of AfcarsAdultKey

Yes

The adult keys, following the children. REQUIRED: send [] for none.

after

string (optional)

No

The previous page’s next (AfcarsPersonsCursor); absent at first.

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 0..children.len(). REQUIRED: send [] for none.

from

datetime

Yes

The window’s first instant, inclusive: a local midnight (RFC 3339).

limit

integer (optional)

No

Rows per page, 1..=1000; absent = 1000.

to

datetime

Yes

The window’s end, exclusive: a local midnight after from (RFC 3339).

Responses
  • 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/to not a local midnight, from not before to, as_of less than five minutes in the past, limit outside 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-range after cursor

  • 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

Table 2. Parameters
Name In Required Description

id

path

Yes

Case ID

Responses
  • 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

Table 3. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 4. Request Fields
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 idempotency-conflict.

needs

string (optional)

No

Free-form description of the family’s needs. A NUL (U+0000) is a 422 validation-failed naming needs, value-free.

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 validation-failed naming strengths, value-free.

Responses
  • 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 strengths or needs (validation-failed naming 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}

Table 5. Parameters
Name In Required Description

id

path

Yes

Case plan ID

Table 6. Request Fields
Field Type Required Description

needs

string (optional)

No

New needs description. A NUL (U+0000) is a 422 validation-failed naming needs, value-free.

review_due_at

datetime (optional)

No

New review-due date.

status

string (optional)

No

New status: one of draft, active, completed or superseded. Allowed moves are draft to active or superseded, and active to completed or superseded; active needs a review-due date, in this request or already recorded.

strengths

string (optional)

No

New strengths description. A NUL (U+0000) is a 422 validation-failed naming strengths, value-free.

Responses
  • 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), or strengths / needs over 4000 or status over 32 bytes (validation-failed), or a NUL (U+0000) in strengths or needs (validation-failed naming 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.

Table 7. Parameters
Name In Required Description

id

path

Yes

Case plan ID

Responses
  • 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

Table 8. Parameters
Name In Required Description

id

path

Yes

Case plan ID

Responses
  • 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

Table 9. Parameters
Name In Required Description

id

path

Yes

Case plan ID

Table 10. Request Fields
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 idempotency-conflict.

description

string

Yes

Free-form task description. A NUL (U+0000) is a 422 validation-failed naming description, value-free.

due_at

datetime (optional)

No

Task due date.

responsible

enum (parent, agency, provider, other)

Yes

Who is responsible for a case plan task.

Responses
  • 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-failed naming 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}

Table 11. Parameters
Name In Required Description

id

path

Yes

Task ID

Responses
  • 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}

Table 12. Parameters
Name In Required Description

id

path

Yes

Task ID

Table 13. Request Fields
Field Type Required Description

completed_at

datetime (optional)

No

Timestamp the task was completed.

status

string (optional)

No

New status: one of pending, in_progress or completed. Allowed moves are pending to in_progress or completed, and in_progress to completed.

Responses
  • 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 a status over 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}

Table 14. Parameters
Name In Required Description

id

path

Yes

Task ID

Responses
  • 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

Table 15. Request Fields
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.

Responses
  • 200: Resolved names. A case the caller cannot Read is dropped from cases and counted in unauthorized_count (partial_auth); a person the caller cannot Read (the check the single-person GET makes) is absent from persons exactly 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

Table 16. Parameters
Name In Required Description

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

worker

query

No

Filter by assigned worker (claims.sub UUID).

status

query

No

Filter by status: open, closed, transferred. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

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 invalid-enum-value on admin_unit, a NUL (U+0000) included. Elsewhere the match is exact, and a NUL, which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

search

query

No

Substring search across case_number and admin_unit (worker is UUID-typed; there is no worker substring search). LIKE metacharacters (%/_/\) match literally. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

person_id

query

No

Filter to cases whose case_household contains this person.

sort_by

query

No

Sort column: case_number, status, admin_unit, assigned_worker, opened_at.

sort_dir

query

No

Sort direction: asc or desc (default: desc).

Responses
  • 200: Paginated cases

  • 400: invalid-enum-value on admin_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-UUID person_id) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Forbidden

  • 422: A filter over its length cap: status / sort_by / sort_dir 32, admin_unit 100, search 500 bytes; or a NUL (U+0000) in status or search, or in admin_unit where the jurisdiction has no US unit table, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failed naming 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

Table 17. Request Fields
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 invalid-enum-value on this field. A jurisdiction without such a list keeps the string as sent, where a NUL (U+0000) is a 422 validation-failed naming admin_unit, value-free.

assigned_worker

UUID

Yes

Subject id (sub) of the assigned caseworker. The display name is resolved at read time.

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 idempotency-conflict.

icwa_flag

boolean

No

true when ICWA may apply.

investigation_id

UUID (optional)

No

Investigation that substantiated the case (optional for direct filing).

supervisor

UUID (optional)

No

Supervisor claims.sub UUID, or NULL for unsupervised cases.

Responses
  • 200: Case created (or replayed — same client_request_id + intent; the case number is generated only on the first execution)

  • 400: invalid-enum-value on admin_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_unit of a jurisdiction without a US unit table (validation-failed naming 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

Table 18. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 19. Parameters
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)

Table 20. Request Fields
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

Responses
  • 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, or ledger-date-after-today (or ledger-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_status is child_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

Table 21. Parameters
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 from).

Responses
  • 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), or ledger-window-invalid (to is before from); a malformed query parameter (e.g. a missing or non-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 22. Parameters
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

Table 23. Request Fields
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 effective_from, on or before today).

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 24. Parameters
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

Table 25. Request Fields
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

Responses
  • 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), or ledger-date-after-today (or ledger-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_status is child_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

Table 26. Parameters
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

Table 27. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 28. Parameters
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

Table 29. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, value-free), or legal-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

Table 30. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 31. Parameters
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)

Table 32. Request Fields
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 court_determination is yes_icwa_applies. On the record and correction routes a NUL (U+0000) is a 422 validation-failed naming determination_tribe, value-free.

determined_on

date (optional)

No

2028 (b)(6)(ii) the date of the court’s determination; only when court_determination is yes_icwa_applies.

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 icwa_applies is yes.

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 reason_to_know is yes.

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_adoptive is yes on every record and correction (a yes stored before that rule existed may lack it). On or before today. A required key: present, null = unanswered.

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 tribe_order_foster_care is yes on every record and correction (a yes stored before that rule existed may lack it). On or before today. A required key: present, null = unanswered.

tribes_notified

string (optional)

No

2028 (b)(5)(ii) the tribe(s) notified; only when tribe_notified is yes. On the record and correction routes a NUL (U+0000) is a 422 validation-failed naming tribes_notified, value-free.

Responses
  • 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, or ledger-date-after-today (or ledger-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_adoptive or tribe_order_adoptive_on key (each is required; null = unanswered), a dependent answered without its gate — reason_to_know_discovered_on unless reason_to_know is yes, icwa_applies_notified_on unless icwa_applies is yes, tribes_notified unless tribe_notified is yes, determined_on, determination_tribe, active_efforts, tribe_order_foster_care or tribe_order_adoptive unless court_determination is yes_icwa_applies, a Tribe-order date unless its order is yes (an unanswered gate forbids its dependents; a gate may stand without them) — a tribe_notified_before_first_proceeding of yes unless tribe_notified is yes, an order of preference yes without 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) in tribes_notified or determination_tribe (validation-failed naming 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

Table 33. Parameters
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 from).

Responses
  • 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), or ledger-window-invalid (to is before from); a malformed query parameter (e.g. a missing or non-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 34. Parameters
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

Table 35. Request Fields
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 effective_from, on or before today).

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 36. Parameters
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

Table 37. Request Fields
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 court_determination is yes_icwa_applies. On the record and correction routes a NUL (U+0000) is a 422 validation-failed naming determination_tribe, value-free.

determined_on

date (optional)

No

2028 (b)(6)(ii) the date of the court’s determination; only when court_determination is yes_icwa_applies.

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 icwa_applies is yes.

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 reason_to_know is yes.

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_adoptive is yes on every record and correction (a yes stored before that rule existed may lack it). On or before today. A required key: present, null = unanswered.

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 tribe_order_foster_care is yes on every record and correction (a yes stored before that rule existed may lack it). On or before today. A required key: present, null = unanswered.

tribes_notified

string (optional)

No

2028 (b)(5)(ii) the tribe(s) notified; only when tribe_notified is yes. On the record and correction routes a NUL (U+0000) is a 422 validation-failed naming tribes_notified, value-free.

Responses
  • 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), or ledger-date-after-today (or ledger-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_adoptive or tribe_order_adoptive_on key (each is required; null = unanswered), a dependent answered without its gate — reason_to_know_discovered_on unless reason_to_know is yes, icwa_applies_notified_on unless icwa_applies is yes, tribes_notified unless tribe_notified is yes, determined_on, determination_tribe, active_efforts, tribe_order_foster_care or tribe_order_adoptive unless court_determination is yes_icwa_applies, a Tribe-order date unless its order is yes (an unanswered gate forbids its dependents; a gate may stand without them) — a tribe_notified_before_first_proceeding of yes unless tribe_notified is yes, an order of preference yes without 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) in tribes_notified or determination_tribe (validation-failed naming 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

Table 38. Parameters
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

Table 39. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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 /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses

Table 40. Parameters
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; id is always the last key). Present = one row per stored identity: the live row first by that order among those whose event date is on or before as_of.

Responses
  • 200: The live rows (an empty array when none)

  • 400: child-not-in-case; a malformed query parameter (e.g. a non-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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.


POST /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses

Table 41. Parameters
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)

Table 42. Request Fields
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 validation-failed naming note, value-free.

status_token

string

Yes

A token of the deployment’s legal-status vocabulary.

until

LegalStatusUntil (optional)

No

Until

Responses
  • 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, or ledger-date-after-today (or ledger-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 or until record 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), or idempotency-conflict / replayed entity gone

  • 422: Validation failure (a missing client_request_id, an unknown field, a status_token or note out of bounds, until with episode_id, until on a not-in-custody status, an in-custody until.status_token, until.effective_on before effective_on, or a NUL (U+0000) in note — validation-failed naming note, value-free), legal-status-vocabulary-missing (the jurisdiction declares no vocabulary — nothing written), or legal-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.


POST /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses/{row_id}/corrections

Table 43. Parameters
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

Table 44. Request Fields
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 validation-failed naming note, value-free.

status_token

string

Yes

A token of the vocabulary, of the predecessor’s custody class.

Responses
  • 200: Successor row and its episode after the act (or replayed — same client_request_id + intent)

  • 400: child-not-in-case or ledger-date-after-today (or ledger-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), or idempotency-conflict / replayed entity gone

  • 422: Validation failure (including a NUL (U+0000) in note — validation-failed naming note, value-free), legal-status-vocabulary-missing, legal-status-unknown, or custody-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.


POST /v1/cases/cases/{case_id}/children/{child_id}/legal-statuses/{row_id}/retract

Table 45. Parameters
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

Table 46. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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), or idempotency-conflict / replayed entity gone

  • 422: Validation failure (a missing client_request_id, an empty note, or a NUL (U+0000) in note — validation-failed naming note, value-free), or legal-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

Table 47. Parameters
Name In Required Description

case_id

path

Yes

Case ID

child_id

path

Yes

The child (a child-role household member of the case)

Table 48. Request Fields
Field Type Required Description

citizenship_status

string

Yes

A CitizenshipStatus token.

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 validation-failed naming legal_admin_unit, value-free.

prior_medical_assistance

string

Yes

A PriorMedicalAssistance token.

Responses
  • 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), or idempotency-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), or medicaid-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

Table 49. Parameters
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

Table 50. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 51. Parameters
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; id is always the last key). Present = one row per stored identity: the live row first by that order among those whose event date is on or before as_of.

Responses
  • 200: The live rows (an empty array when none)

  • 400: child-not-in-case; a malformed query parameter (e.g. a non-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 52. Parameters
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)

Table 53. Request Fields
Field Type Required Description

parent_person_id

UUID

Yes

The parent (a recorded parent of the child).

Responses
  • 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 (or ledger-date-before-minimum, a date before -4713-11-24) (effective_on or a petition, death or termination date after today), or bad-request naming 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

Table 54. Parameters
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

Table 55. Request Fields
Field Type Required Description

parent_person_id

UUID

Yes

The parent (a recorded parent of the child).

Responses
  • 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, or ledger-date-after-today (or ledger-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

Table 56. Parameters
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

Table 57. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 58. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 59. Parameters
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)

Table 60. Request Fields
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

Responses
  • 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, or ledger-date-after-today (or ledger-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_together answered not_applicable other than exactly when has_fathered_or_bore_a_child is no)

  • 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

Table 61. Parameters
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 from).

Responses
  • 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), or ledger-window-invalid (to is before from); a malformed query parameter (e.g. a missing or non-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 62. Parameters
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

Table 63. Request Fields
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 effective_from, on or before today).

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 64. Parameters
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

Table 65. Request Fields
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

Responses
  • 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), or ledger-date-after-today (or ledger-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_together answered not_applicable other than exactly when has_fathered_or_bore_a_child is no)

  • 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

Table 66. Parameters
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

Table 67. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 68. Parameters
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; id is always the last key). Present = one row per stored identity: the live row first by that order among those whose event date is on or before as_of.

Responses
  • 200: The live rows (an empty array when none)

  • 400: child-not-in-case; a malformed query parameter (e.g. a non-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 69. Parameters
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)

Table 70. Request Fields
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.

Responses
  • 200: Plan established (or replayed — same client_request_id + intent)

  • 400: child-not-in-case, ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24) (established_on after today), or bad-request naming 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.

Table 71. Parameters
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 (YYYY-MM-DD).

Responses
  • 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-request problem, 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

Table 72. Parameters
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

Table 73. Request Fields
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.

Responses
  • 200: Successor row (or replayed — same client_request_id + intent)

  • 400: child-not-in-case or ledger-date-after-today (or ledger-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

Table 74. Parameters
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

Table 75. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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.

Table 76. Parameters
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 (YYYY-MM-DD).

Responses
  • 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; field child_id) / placement-facts-clock-drift (on lies more than one day from the service’s business date; field on); a malformed query parameter (e.g. a missing or non-date on) is the extractor’s value-free bad-request problem, 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’s rule_evaluation create row does not admit them, e.g. the realm-flat readonly auditor)

  • 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 at on (field child_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

Table 77. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 78. Parameters
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)

Table 79. Request Fields
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_adoption is yes.

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 prior_guardianship is yes.

Responses
  • 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, or ledger-date-after-today (or ledger-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

Table 80. Parameters
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 from).

Responses
  • 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), or ledger-window-invalid (to is before from); a malformed query parameter (e.g. a missing or non-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 81. Parameters
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

Table 82. Request Fields
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 effective_from, on or before today).

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 83. Parameters
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

Table 84. Request Fields
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_adoption is yes.

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 prior_guardianship is yes.

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 85. Parameters
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

Table 86. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 87. Parameters
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; id is always the last key). Present = one row per stored identity: the live row first by that order among those whose event date is on or before as_of.

Responses
  • 200: The live rows (an empty array when none)

  • 400: child-not-in-case; a malformed query parameter (e.g. a non-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 88. Parameters
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)

Table 89. Request Fields
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). null on an administrative review. Every row read serves 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 held_on column serving both elements.

Responses
  • 200: Review recorded (or replayed — same client_request_id + intent)

  • 400: child-not-in-case, ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24) (held_on after today), or bad-request naming 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

Table 90. Parameters
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

Table 91. Request Fields
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). null on an administrative review. Every row read serves 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 held_on column serving both elements.

Responses
  • 200: Successor row (or replayed — same client_request_id + intent)

  • 400: child-not-in-case or ledger-date-after-today (or ledger-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

Table 92. Parameters
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

Table 93. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 94. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-date as_of) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 95. Parameters
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)

Table 96. Request Fields
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).

Responses
  • 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, or ledger-date-after-today (or ledger-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_siblings outside 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

Table 97. Parameters
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 from).

Responses
  • 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), or ledger-window-invalid (to is before from); a malformed query parameter (e.g. a missing or non-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 98. Parameters
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

Table 99. Request Fields
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 effective_from, on or before today).

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 100. Parameters
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

Table 101. Request Fields
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).

Responses
  • 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), or ledger-date-after-today (or ledger-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_siblings outside 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

Table 102. Parameters
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

Table 103. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 104. Parameters
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.

Responses
  • 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-UUID child_id) is the extractor’s value-free bad-request problem, 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

Table 105. Parameters
Name In Required Description

case_id

path

Yes

Case ID

member_id

path

Yes

Household membership ID

Table 106. Request Fields
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 idempotency-conflict.

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.

Responses
  • 200: Membership ended (or replayed — same client_request_id + intent)

  • 400: ledger-date-after-today — ended_on is after today on the jurisdiction’s business calendar; or ledger-window-invalid — ended_on is 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 type household-member-ended

  • 422: Missing client_request_id, or a body field whose value does not deserialize, e.g. an ended_on that 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

Table 107. Parameters
Name In Required Description

case_id

path

Yes

Case ID

child_id

query

No

Only this child’s applications.

Responses
  • 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-UUID child_id) is the extractor’s value-free bad-request problem, 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}

Table 108. Parameters
Name In Required Description

case_id

path

Yes

Case ID

application_id

path

Yes

The application

Responses
  • 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.

Table 109. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and its principals

  • 400: interface is not a lowercase adapter-kind token (field interface), or identifier is given — served on the custody arms only (field identifier); a malformed query parameter (e.g. a missing or non-UUID correlation) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 404: Case not found

  • 422: interface over 32 bytes: validation-failed naming interface, 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.

Table 110. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and the one principal

  • 400: interface malformed (field interface), or identifier given (field identifier)

  • 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: interface over 32 bytes: validation-failed naming interface, 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}

Table 111. Parameters
Name In Required Description

id

path

Yes

Case ID

Responses
  • 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}

Table 112. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 113. Request Fields
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 (investigation, services, permanency, etc.). A NUL (U+0000) is a 422 validation-failed naming stage, value-free.

status

string (optional)

No

New status (open, closed, transferred).

supervisor

UUID (optional)

No

New supervisor UUID — reassign-only: absent keeps the current supervisor, a value reassigns, and an explicit JSON null is rejected with a 422 (a supervisor cannot be cleared).

Responses
  • 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-failed naming 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

Table 114. Parameters
Name In Required Description

id

path

Yes

Case ID

include_inactive

query

No

List ended memberships (active = false) too; absent = false.

Responses
  • 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

Table 115. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 116. Request Fields
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 idempotency-conflict.

person_id

UUID

Yes

UUID of the person to add to the case household.

primary_caregiver

boolean

No

true if this person is the household’s primary caregiver.

role

enum (child, parent, caregiver, sibling, other)

Yes

Role of a person in a case household.

Responses
  • 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 type household-member-exists

  • 422: Missing client_request_id, or a body field whose value does not deserialize, e.g. a non-UUID person_id or an unknown role (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

Table 117. Parameters
Name In Required Description

id

path

Yes

Case ID

person_id

path

Yes

The household member asked about

Responses
  • 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’s feature-disabled relayed

  • 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’s dsa-not-active / person-index-refused relayed

  • 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

Table 118. Parameters
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

Table 119. Request Fields
Field Type Required Description

client_request_id

UUID

Yes

Client-minted idempotency id: a retry answers the identifier the first request recorded.

Responses
  • 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-disabled relayed

  • 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’s dsa-not-active / person-index-refused relayed (nothing recorded; the inquiry stays registering)

  • 422: A body field of the wrong type or unknown (validation-failed), craig-exchange’s 422 relayed, or person-demographics-incomplete from 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

Table 120. Parameters
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

Table 121. Request Fields
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 index_id, as the ask answered it.

Responses
  • 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-disabled relayed

  • 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’s dsa-not-active / person-index-refused relayed (nothing recorded)

  • 422: A body field over its bound, of the wrong type or unknown, a NUL in index_id (validation-failed); an index_id that 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

Table 122. Parameters
Name In Required Description

id

path

Yes

Case ID

person_id

query

No

Narrow to one household member.

Responses
  • 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-free bad-request problem, 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

Table 123. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 124. Request Fields
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.

Responses
  • 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

Table 125. Parameters
Name In Required Description

id

path

Yes

Case ID

person_id

query

No

Narrow to one household member (never combined with run_id).

run_id

query

No

Narrow to one screening run (never combined with person_id).

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

Responses
  • 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-free bad-request problem, 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

Table 126. Parameters
Name In Required Description

id

path

Yes

Case ID

Responses
  • 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

Table 127. Parameters
Name In Required Description

id

path

Yes

Case ID

run_id

path

Yes

Screening run ID

Responses
  • 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).

Table 128. Parameters
Name In Required Description

id

path

Yes

Case ID

Responses
  • 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.

Table 129. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and its principal

  • 400: interface malformed (field interface). A non-UUID identifier, or a missing, malformed or unknown query parameter, is the extractor’s value-free bad-request problem

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 404: Custody episode not found

  • 422: interface over 32 bytes: validation-failed naming interface, 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.

Table 130. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and the one principal

  • 400: interface malformed (field interface). A non-UUID identifier, or a missing, malformed or unknown query parameter, is the extractor’s value-free bad-request problem

  • 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: interface over 32 bytes: validation-failed naming interface, 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.

Table 131. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and its principals

  • 400: interface malformed (field interface), or identifier given (field identifier)

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 404: Investigation not found

  • 422: interface over 32 bytes: validation-failed naming interface, 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.

Table 132. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and the one principal

  • 400: interface malformed (field interface), or identifier given (field identifier)

  • 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: interface over 32 bytes: validation-failed naming interface, 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.

Responses
  • 200: Nothing was stored: outcome = replayed, unknown or withdrawn

  • 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 kind or status, 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.

Table 133. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and its principal

  • 400: interface malformed (field interface), or an identifier pin, which only the custody arms serve (field identifier). A missing, malformed or unknown query parameter is the extractor’s value-free bad-request problem

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 404: Medicaid application not found

  • 422: interface over 32 bytes: validation-failed naming interface, 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.

Table 134. Parameters
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 resolve job passes its admission id, a record job its send correlation id.

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 identifier) on every other arm.

Responses
  • 200: The stage and the one principal

  • 400: interface malformed (field interface), or an identifier pin, which only the custody arms serve (field identifier). A missing, malformed or unknown query parameter is the extractor’s value-free bad-request problem

  • 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: interface over 32 bytes: validation-failed naming interface, 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.

Table 135. Parameters
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.

Responses
  • 200: One page of stage ids

  • 400: interface malformed (field interface)

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 422: interface over 32 bytes: validation-failed naming interface, 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.

Table 136. Parameters
Name In Required Description

id

path

Yes

Person ID

interface

query

Yes

The partner interface the read serves.

Responses
  • 200: The open custody episode ids (possibly none)

  • 400: interface malformed (field interface)

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 422: interface over 32 bytes: validation-failed naming interface, 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.

Table 137. Parameters
Name In Required Description

report_id

path

Yes

Intake report ID

interface

query

Yes

The partner interface the read serves.

Responses
  • 200: The open and the closed investigation ids (either list possibly empty)

  • 400: interface malformed (field interface)

  • 401: Unauthorized

  • 403: Caller is not the craig-exchange service identity

  • 422: interface over 32 bytes: validation-failed naming interface, 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

Table 138. Parameters
Name In Required Description

case_id

path

Yes

Case ID

contact_id

path

Yes

Contact ID

Responses
  • 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

Table 139. Parameters
Name In Required Description

case_id

path

Yes

Case ID

contact_id

path

Yes

Contact ID

Table 140. Request Form Fields (multipart/form-data)
Field Type Required Description

attachment_type

string (optional)

No

The attachment’s category; document when the part is absent. 1 to 64 bytes of lowercase letters, digits, _, . and -, starting with a letter or digit; any other value is a 422 validation-failed on attachment_type.

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.

Responses
  • 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) an attachment_type that 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}

Table 141. Parameters
Name In Required Description

case_id

path

Yes

Case ID

contact_id

path

Yes

Contact ID

att_id

path

Yes

Attachment ID

Responses
  • 200: Attachment file

  • 206: Partial content: the one Range slice (bytes=a-b, a- or -n) with Content-Range, Accept-Ranges: bytes and the slice’s Content-Length; honoured only when an If-Range strong-matches the ETag. 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}

Table 142. Parameters
Name In Required Description

case_id

path

Yes

Case ID

contact_id

path

Yes

Contact ID

att_id

path

Yes

Attachment ID

Responses
  • 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

Table 143. Parameters
Name In Required Description

id

path

Yes

Case ID

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

Responses
  • 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-free bad-request problem, 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

Table 144. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 145. Request Fields
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 idempotency-conflict.

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 validation-failed naming contact_with, value-free.

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 validation-failed naming narrative, value-free.

occurred_at

datetime

Yes

When the contact occurred (timezone-aware).

visit

ContactVisit (optional)

No

Visit

Responses
  • 200: Contact recorded (or replayed — same client_request_id + intent)

  • 400: A visit on a type that admits none — bad-request, field visit; or the visited child was never a child-role member of the case — child-not-in-case, field visit.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_with or narrative (validation-failed naming 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}

Table 146. Parameters
Name In Required Description

id

path

Yes

Contact ID

Responses
  • 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}

Table 147. Parameters
Name In Required Description

id

path

Yes

Contact ID

If-Match

header

Yes

REQUIRED: the contact’s version from your last read, bare or RFC 7232-quoted (e.g. "3")

Table 148. Request Fields
Field Type Required Description

contact_type

ContactType (optional)

No

Contact type

contact_with

string (optional)

No

New contact_with value. A NUL (U+0000) is a 422 validation-failed naming contact_with, value-free.

duration_minutes

integer (optional)

No

New duration in minutes.

narrative

string (optional)

No

New narrative. A NUL (U+0000) is a 422 validation-failed naming narrative, value-free.

occurred_at

datetime (optional)

No

New occurred_at value.

visit

ContactVisit (optional)

No

Visit

Responses
  • 200: Contact updated

  • 400: Missing or malformed If-Match; or the resulting row carries a visit on a type that admits none — bad-request, field visit (a type change must clear it with visit: null); or the visited child was never a child-role member of the case — child-not-in-case, field visit.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), or contact_with over 100 or narrative over 4000 bytes (validation-failed), or a NUL (U+0000) in contact_with or narrative (validation-failed naming 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}

Table 149. Parameters
Name In Required Description

id

path

Yes

Contact ID

Responses
  • 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

Table 150. Parameters
Name In Required Description

case_id

path

Yes

Case ID

order_id

path

Yes

Court order ID

Responses
  • 200: Document file

  • 206: Partial content: the one Range slice (bytes=a-b, a- or -n) with Content-Range, Accept-Ranges: bytes and the slice’s Content-Length; honoured only when an If-Range strong-matches the ETag. 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

Table 151. Parameters
Name In Required Description

case_id

path

Yes

Case ID

order_id

path

Yes

Court order ID

Table 152. Request Form Fields (multipart/form-data)
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.

Responses
  • 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

Table 153. Parameters
Name In Required Description

id

path

Yes

Case ID

Responses
  • 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

Table 154. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 155. Request Fields
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 idempotency-conflict.

court_name

string (optional)

No

Name of the issuing court. A NUL (U+0000) is a 422 validation-failed naming court_name, value-free.

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 validation-failed naming findings, value-free.

hearing

CourtOrderHearing (optional)

No

Hearing

judge

string (optional)

No

Presiding judge’s name. A NUL (U+0000) is a 422 validation-failed naming judge, value-free.

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.

Responses
  • 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 custody order writes one legal-status row per child

  • 400: court-order-hearing-required (a review_hearing / permanency_hearing order without hearing), court-order-hearing-not-admitted (hearing on any other type), child-not-in-case (field hearing.children), or ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24) (field hearing.held_on); child-not-in-case (field custody.children), ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24) (field custody.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-overlap or custody-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_name or judge, or in any string or object key of findings — validation-failed naming the field, value-free); legal-status-vocabulary-missing / legal-status-unknown (field custody.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}

Table 156. Parameters
Name In Required Description

id

path

Yes

Court order ID

Responses
  • 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}

Table 157. Parameters
Name In Required Description

id

path

Yes

Court order ID

If-Match

header

Yes

REQUIRED: the order’s version from your last read, bare or RFC 7232-quoted (e.g. "3")

Table 158. Request Fields
Field Type Required Description

court_name

string (optional)

No

New court name. A NUL (U+0000) is a 422 validation-failed naming court_name, value-free.

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 validation-failed naming findings, value-free.

hearing

CourtOrderHearing (optional)

No

Hearing

judge

string (optional)

No

New presiding judge. A NUL (U+0000) is a 422 validation-failed naming judge, value-free.

next_hearing_date

date (optional)

No

New next-hearing date.

order_date

date (optional)

No

New order_date.

order_type

CourtOrderType (optional)

No

Order type

Responses
  • 200: Court order updated

  • 400: Missing or malformed If-Match; court-order-hearing-required (a type change to a hearing type without hearing), court-order-hearing-not-admitted (hearing on a non-hearing resolved type), child-not-in-case (field hearing.children), or ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24) (field hearing.held_on); child-not-in-case (field custody.children), ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24) (field custody.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-overlap or custody-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_name or judge, or in any string or object key of findings — validation-failed naming 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}

Table 159. Parameters
Name In Required Description

id

path

Yes

Court order ID

Responses
  • 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, or custody-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.

Table 160. Parameters
Name In Required Description

from

query

Yes

RFC 3339 inclusive lower bound on event_outbox.created_at.

to

query

Yes

RFC 3339 inclusive upper bound on event_outbox.created_at.

event_type

query

No

Optional event_type scope. When present, only rows whose event_type equals this value are counted and re-staged; when absent, the whole [from, to] window is in scope.

dry_run

query

No

If true, return the would-replay count without modifying rows.

resume_from

query

No

The resume_from cursor a previous response returned with more = true. Passed back with the same from / to / event_type, the re-stage continues strictly past that key. A string that is not a cursor is a 400 naming this field.

Responses
  • 200: The window’s count and what this call re-staged

  • 400: bad-request: a malformed or missing from / to, a non-boolean dry_run, from after to, from older than the outbox retention window, or a resume_from that is not a replay cursor (field names 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_type longer 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

Table 161. Parameters
Name In Required Description

id

path

Yes

Case ID

Responses
  • 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.

Table 162. Parameters
Name In Required Description

id

path

Yes

Case ID

Table 163. Request Fields
Field Type Required Description

case_inputs

object

Yes

The case-scoped answers: each key a scope: "case" input the active {j}-ive-eligibility declares (GET /v1/cases/ive-surface), each value valid for its declared kind (400 ive-input-not-declared otherwise); a blank answer is an absent key. Provenance: worker self-attestation, recorded verbatim on the determination row. Reserved keys are refused: any ssa_-prefixed key and every server-derived key (IVE_SERVER_KEYS).

child_inputs

object

Yes

Each named child’s own answers, keyed by the child’s person id: each key a scope: "child" input the ruleset declares (a sibling’s value can differ), validated like case_inputs. Every key must be a child-role member of the witnessed cohort (the assembly refuses otherwise, typed); a key that also appears in case_inputs is refused (no silent override). Children of the cohort NOT named here receive no verdict from this act (never determined).

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED.

surface

IveRulesetIdentity (optional)

No

Surface

Responses
  • 200: The determination of record (a replay returns the original)

  • 400: Malformed body; surface absent; 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); or ive-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-eligibility consult 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; or ive-policy-moved — the rendered surface is 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-eligibility consult (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); or ive-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

Responses
  • 200: The IV-E surface of the active {j}-ive-eligibility ruleset

  • 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.

Table 164. Parameters
Name In Required Description

page

query

No

Page number (1-based).

per_page

query

No

Items per page.

Responses
  • 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-free bad-request problem, 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.

Table 165. Parameters
Name In Required Description

id

path

Yes

Worklist item ID

Responses
  • 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.

Table 166. Parameters
Name In Required Description

id

path

Yes

Worklist item ID

Table 167. Request Fields
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 validation-failed naming reason, value-free.

Responses
  • 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-failed naming reason, value-free), or a body field whose value does not deserialize, e.g. a non-string reason (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

Table 168. Parameters
Name In Required Description

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

worker

query

No

Filter by assigned worker (claims.sub UUID).

status

query

No

Filter by status: open, pending_review, closed. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

search

query

No

Full-text search across assignment_area (worker is UUID-typed; substring search disabled). A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

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 TIMELINESS_BANDS (on_track, overdue, met, met_late); any other value is a typed 400 before the query is planned.

sort_by

query

No

Sort column: status, response_due_at, assigned_worker, assignment_area.

sort_dir

query

No

Sort direction: asc or desc (default: desc).

Responses
  • 200: Paginated investigations

  • 400: invalid-enum-value — timeliness outside on_track | overdue | met | met_late, or a page past the depth cap; a malformed query parameter (e.g. a non-UUID person_id) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Forbidden

  • 422: A filter over its length cap: status / timeliness / sort_by / sort_dir 32, search 500 bytes; or a NUL (U+0000) in status or search, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failed naming 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

Table 169. Request Fields
Field Type Required Description

assigned_worker

UUID

Yes

Subject id (sub) of the assigned investigator.

assignment_area

string

Yes

Geographic or organizational area assignment. A NUL (U+0000) is a 422 validation-failed naming assignment_area, value-free.

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 idempotency-conflict.

referral_id

UUID

Yes

Referral the investigation is opened from.

Responses
  • 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) in assignment_area (validation-failed naming 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}

Table 170. Parameters
Name In Required Description

id

path

Yes

Investigation ID

Responses
  • 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}

Table 171. Parameters
Name In Required Description

id

path

Yes

Investigation ID

Table 172. Request Fields
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: open, pending_review, closed. closed needs a disposition, in this request or already recorded (400 investigation-disposition-required).

Responses
  • 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 a status over 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

Table 173. Parameters
Name In Required Description

id

path

Yes

Investigation ID

Table 174. Request Fields
Field Type Required Description

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED. Same id
identical intent (deadline, reason, investigation) replays the stored row without a second consult; a different intent under the same id is a 409 idempotency-conflict.

reason

string (optional)

No

Why the deadline moves — required when the jurisdiction’s arm says so (override_reason_required; a blank reason counts as absent), recorded verbatim (trimmed) on the row and the event. A NUL (U+0000) is a 422 validation-failed naming reason, value-free.

response_due_at

datetime

Yes

The requested response deadline.

Responses
  • 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 — admin included), 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-failed naming 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

Table 175. Parameters
Name In Required Description

id

path

Yes

Investigation ID

Table 176. Request Fields
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 idempotency-conflict.

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 (rule_set_id, revision), never name + revision (a ruleset deleted and recreated under the same name restarts at revision 1).

worker_override

SafetyDecision (optional)

No

Worker override

worker_override_reason

string (optional)

No

Free-form reason for the override; required, and not blank, when worker_override is set (a 422 validation-failed naming worker_override_reason). A NUL (U+0000) is the same 422, value-free.

Responses
  • 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 — surface is 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_override without a non-blank worker_override_reason, or a NUL (U+0000) in worker_override_reason (value-free). Or safety-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

Responses
  • 200: The safety surface of the active {j}-safety-assessment ruleset

  • 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

Table 177. Request Fields
Field Type Required Description

iat

integer

Yes

The JWS protected-header iat, in Unix epoch seconds.

jti

UUID

Yes

The JWS jti (unique token id); unique per partner.

partner_id

UUID

Yes

The partner that signed the submission.

Responses
  • 200: First seen — recorded.

  • 401: Replay detected — duplicate jti for partner.

  • 403: Caller lacks partners.replay-check scope.

  • 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

Table 178. Parameters
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 next — the opaque ExportCursor; absent on the first page.

limit

query

No

Referrals per page, 1..=500; absent = 500.

Responses
  • 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-null next), null on exhaustion

  • 400: FFY out of range, a malformed after cursor, or limit outside 1..=500 (an unknown query parameter is the extractor’s value-free bad-request problem)

  • 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

Table 179. Parameters
Name In Required Description

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

name

query

No

Search by name (case-insensitive partial match over the full "first last" name, so a term may span the first/last boundary — e.g. "than Smith" matches "Johnathan Smithson"). A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

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).

Responses
  • 200: Search results. total is index-only: an ssn_last_four or date_of_birth filter 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-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Forbidden

  • 422: A name over its 100-byte length cap, or an ssn_last_four that is not four ASCII digits; or a NUL (U+0000) in name, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failed naming 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

Table 180. Request Fields
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 idempotency-conflict. Mint a fresh UUID per logical operation.

date_of_birth

date (optional)

No

Date of birth, calendar-date precision.

dob_estimated_abandoned

boolean

No

true when date_of_birth is an estimate because the child was abandoned. Absent on the wire deserializes as false.

first_name

string

Yes

First name. A NUL (U+0000) is a 422 validation-failed naming first_name, value-free.

last_name

string

Yes

Last name. A NUL (U+0000) is a 422 validation-failed naming last_name, value-free.

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. Not clearable here (the audited DELETE /persons/{id}/ssn is the removal path).

ssn_last_four

string (optional)

No

Last 4 digits of SSN (exactly four ASCII digits; stored encrypted). Rejected with SSN_LAST_FOUR_MANAGED when a full SSN is on file or ssn is also present — the last four are derived from the full SSN then.

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 date_of_birth: a body carrying both is refused with the typed 400 YEAR_OF_BIRTH_WITH_DATE.

Responses
  • 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_name or last_name (validation-failed naming 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.

Table 181. Request Fields
Field Type Required Description

ids

array of UUID

Yes

Persons to name (≤ DISPLAY_NAMES_MAX_IDS; unknown ids are simply absent from the response — never a per-id 404).

Responses
  • 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}

Table 182. Parameters
Name In Required Description

id

path

Yes

Person ID

Responses
  • 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}

Table 183. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 184. Request Fields
Field Type Required Description

birth_city

string (optional)

No

City or place of birth, as stated. Absent keeps it, null clears it, a value sets 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, null clears it, a value sets it; a value that is no such abbreviation is a 422 naming birth_state.

date_of_birth

date (optional)

No

New date of birth.

dob_estimated_abandoned

boolean (optional)

No

New DOB-estimated/abandoned indicator; absent = unchanged, false lowers a mistaken flag.

dob_verification

DobVerification (optional)

No

Dob verification

first_name

string (optional)

No

New first name. A NUL (U+0000) is a 422 validation-failed naming first_name, value-free.

last_name

string (optional)

No

New last name. A NUL (U+0000) is a 422 validation-failed naming last_name, value-free.

marital_status

MaritalStatus (optional)

No

Marital status

middle_name

string (optional)

No

Middle name. Absent keeps it, null clears it, a value sets it.

name_suffix

string (optional)

No

Name suffix (Jr., III). Absent keeps it, null clears it, a value sets 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 DELETE /persons/{id}/ssn clears).

ssn_last_four

string (optional)

No

New ssn_last_four (exactly four ASCII digits). Rejected with SSN_LAST_FOUR_MANAGED when a full SSN is on file or ssn is also present (derived then).

year_of_birth_declared

integer (optional)

No

New declared birth year (1850..=2100). Mutually exclusive with date_of_birth in one body (typed 400 YEAR_OF_BIRTH_WITH_DATE); an update that sets a date clears the stored declared year.

Responses
  • 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 a first_name / last_name over 100 bytes, a year_of_birth_declared outside 1850..=2100, an ssn_last_four that is not four ASCII digits, or an ssn over 11 bytes (validation-failed), or a NUL (U+0000) in first_name, last_name, middle_name, name_suffix or birth_city (validation-failed naming the field, value-free), or a birth_state that is no US state or territory USPS abbreviation, or an empty middle_name, name_suffix or birth_city (a fact is cleared with null)

  • 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

Table 185. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 186. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 187. Request Fields
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-yes rule is the projection’s). On the record and correction routes a NUL (U+0000) is a 422 validation-failed naming tribal_affiliation, value-free.

tribal_member

YesNoUnknown (optional)

No

Tribal member

tribal_member_or_eligible

YesNoUnknown (optional)

No

Tribal member or eligible

Responses
  • 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), or ledger-date-after-today (or ledger-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-failed naming 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

Table 188. Parameters
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 from).

Responses
  • 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-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 189. Parameters
Name In Required Description

id

path

Yes

Person ID

row_id

path

Yes

The live open row being closed

Table 190. Request Fields
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 effective_from, on or before today).

Responses
  • 200: The closed row (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (effective_until not after the row’s effective_from) or ledger-date-after-today (or ledger-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

Table 191. Parameters
Name In Required Description

id

path

Yes

Person ID

row_id

path

Yes

The live row being corrected

Table 192. Request Fields
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-yes rule is the projection’s). On the record and correction routes a NUL (U+0000) is a 422 validation-failed naming tribal_affiliation, value-free.

tribal_member

YesNoUnknown (optional)

No

Tribal member

tribal_member_or_eligible

YesNoUnknown (optional)

No

Tribal member or eligible

Responses
  • 200: Successor row (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (the resolved window is unordered) or ledger-date-after-today (or ledger-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-failed naming 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

Table 193. Parameters
Name In Required Description

id

path

Yes

Person ID

row_id

path

Yes

The live row being retracted

Table 194. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 195. Parameters
Name In Required Description

id

path

Yes

Person ID

Responses
  • 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

Table 196. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 197. Request Fields
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 (StateBundle::identifier_kinds).

value

string

Yes

The value, exactly as the kind’s format requires (never trimmed).

Responses
  • 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), or idempotency-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), or person-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

Table 198. Parameters
Name In Required Description

id

path

Yes

Person ID

identifier_id

path

Yes

The live identifier acted on

Table 199. Request Fields
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 effective_from, on or before today).

Responses
  • 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), or identifier-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

Table 200. Parameters
Name In Required Description

id

path

Yes

Person ID

identifier_id

path

Yes

The identifier acted on

Table 201. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, value-free), or identifier-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

Table 202. Parameters
Name In Required Description

id

path

Yes

Person ID

identifier_id

path

Yes

The identifier revealed (live, ended or retracted)

Responses
  • 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

Table 203. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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.


POST /v1/cases/persons/{id}/parentage

Table 204. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

Table 205. Request Fields
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) abandoned: the parents' identity is unknown because the child was abandoned. REQUIRED on the wire (the column is NOT NULL) — an omitted answer is a 422, never a silent false.

sole_legal_parent

boolean (optional)

No

(c)(2) not_applicable: ASSESSED that exactly one parent or legal guardian holds legal responsibility; null = not assessed (one recorded parent is not evidence that no second exists).

Responses
  • 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), or ledger-date-after-today (or ledger-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

Table 206. Parameters
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 from).

Responses
  • 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-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 207. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

row_id

path

Yes

The live open row being closed

Table 208. Request Fields
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 effective_from, on or before today).

Responses
  • 200: The closed row (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (effective_until not after the row’s effective_from) or ledger-date-after-today (or ledger-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

Table 209. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

row_id

path

Yes

The live row being corrected

Table 210. Request Fields
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) abandoned: the parents' identity is unknown because the child was abandoned. REQUIRED on the wire (the column is NOT NULL) — an omitted answer is a 422, never a silent false.

sole_legal_parent

boolean (optional)

No

(c)(2) not_applicable: ASSESSED that exactly one parent or legal guardian holds legal responsibility; null = not assessed (one recorded parent is not evidence that no second exists).

Responses
  • 200: Successor row (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (the resolved window is unordered) or ledger-date-after-today (or ledger-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

Table 211. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

row_id

path

Yes

The live row being retracted

Table 212. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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 /v1/cases/persons/{id}/parents

Table 213. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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.


POST /v1/cases/persons/{id}/parents

Table 214. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

Table 215. Request Fields
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; null = unanswered (not counted for (c)(1) / (c)(2)).

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 child_parents.role vocabulary). A putative parent never holds legal responsibility.

Responses
  • 200: Link recorded (or replayed — same client_request_id + intent)

  • 400: bad-request on 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, or ledger-date-after-today (or ledger-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.


GET /v1/cases/persons/{id}/parents/history

Table 216. Parameters
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 from).

Responses
  • 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-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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.


POST /v1/cases/persons/{id}/parents/{row_id}/close

Table 217. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

row_id

path

Yes

The live open link being closed

Table 218. Request Fields
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 effective_from, on or before today).

Responses
  • 200: The closed link (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (effective_until not after the link’s effective_from) or ledger-date-after-today (or ledger-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.


POST /v1/cases/persons/{id}/parents/{row_id}/corrections

Table 219. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

row_id

path

Yes

The live link being corrected

Table 220. Request Fields
Field Type Required Description

parent_person_id

UUID

Yes

The predecessor’s parent.

Responses
  • 200: Successor link (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (the resolved window is unordered) or ledger-date-after-today (or ledger-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.


POST /v1/cases/persons/{id}/parents/{row_id}/retract

Table 221. Parameters
Name In Required Description

id

path

Yes

Person ID (the child)

row_id

path

Yes

The live link being retracted

Table 222. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 223. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 224. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 225. Request Fields
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 invalid-enum-value when the jurisdiction has no such unit; elsewhere it is stored as sent. A NUL (U+0000) is a 422 validation-failed naming admin_unit, value-free.

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.

Responses
  • 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 (or ledger-date-before-minimum, a date before -4713-11-24), or invalid-enum-value on admin_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_unit that is empty or over 100 bytes), or a NUL (U+0000) in admin_unit (validation-failed naming 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

Table 226. Parameters
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 from).

Responses
  • 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-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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

Table 227. Parameters
Name In Required Description

id

path

Yes

Person ID

row_id

path

Yes

The live open row being closed

Table 228. Request Fields
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 effective_from, on or before today).

Responses
  • 200: The closed row (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (effective_until not after the row’s effective_from) or ledger-date-after-today (or ledger-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

Table 229. Parameters
Name In Required Description

id

path

Yes

Person ID

row_id

path

Yes

The live row being corrected

Table 230. Request Fields
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 invalid-enum-value when the jurisdiction has no such unit; elsewhere it is stored as sent. A NUL (U+0000) is a 422 validation-failed naming admin_unit, value-free.

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.

Responses
  • 200: Successor row (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (the resolved window is unordered), ledger-date-after-today (or ledger-date-before-minimum, a date before -4713-11-24), or invalid-enum-value on admin_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_unit that is empty or over 100 bytes), or a NUL (U+0000) in admin_unit (validation-failed naming 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

Table 231. Parameters
Name In Required Description

id

path

Yes

Person ID

row_id

path

Yes

The live row being retracted

Table 232. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 233. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 234. Request Fields
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 created_by, captured from the live actor at stage time).

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.

Responses
  • 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.


GET /v1/cases/persons/{id}/siblings

Table 235. Parameters
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 effective_from ⇐ as_of and (effective_until NULL or as_of < effective_until).

Responses
  • 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-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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.


POST /v1/cases/persons/{id}/siblings

Table 236. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 237. Request Fields
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).

Responses
  • 200: Link recorded (or replayed — same client_request_id + intent); the pair is stored lower id first

  • 400: bad-request on 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, or ledger-date-after-today (or ledger-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.


GET /v1/cases/persons/{id}/siblings/history

Table 238. Parameters
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 from).

Responses
  • 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-date from) is the extractor’s value-free bad-request problem, before the handler; a date before -4713-11-24 (PostgreSQL’s minimum) is ledger-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.


POST /v1/cases/persons/{id}/siblings/{row_id}/close

Table 239. Parameters
Name In Required Description

id

path

Yes

Person ID (either side of the pair)

row_id

path

Yes

The live open link being closed

Table 240. Request Fields
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 effective_from, on or before today).

Responses
  • 200: The closed link (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (effective_until not after the link’s effective_from) or ledger-date-after-today (or ledger-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.


POST /v1/cases/persons/{id}/siblings/{row_id}/corrections

Table 241. Parameters
Name In Required Description

id

path

Yes

Person ID (either side of the pair)

row_id

path

Yes

The live link being corrected

Table 242. Request Fields
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.

Responses
  • 200: Successor link (or replayed — same client_request_id + intent)

  • 400: ledger-window-invalid (the resolved window is unordered) or ledger-date-after-today (or ledger-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.


POST /v1/cases/persons/{id}/siblings/{row_id}/retract

Table 243. Parameters
Name In Required Description

id

path

Yes

Person ID (either side of the pair)

row_id

path

Yes

The live link being retracted

Table 244. Request Fields
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 retired_note). A NUL (U+0000), which that column cannot store, is refused as a 422 validation-failed naming note, value-free.

Responses
  • 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-failed naming note, 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

Table 245. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 246. Request Fields
Field Type Required Description

reason

string

Yes

Why the SSN is being removed. A NUL (U+0000) is a 422 validation-failed naming reason, value-free.

Responses
  • 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 empty reason or one over 500 bytes (validation-failed), or a NUL (U+0000) in reason (validation-failed naming 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

Table 247. Parameters
Name In Required Description

id

path

Yes

Person ID

Responses
  • 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

Table 248. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 249. Request Fields
Field Type Required Description

digest

string

Yes

The digest the attester reviewed (from the digest GET), in canonical v{n}:{base64} form; a non-canonical value is rejected as a 422 body rejection.

method

string

Yes

Evidence source (e.g. ssa_card, shines_record, gateway_record). A NUL (U+0000) is a 422 validation-failed naming method, value-free.

Responses
  • 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 empty method or one over 500 bytes (validation-failed), or a NUL (U+0000) in method (validation-failed naming 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

Table 250. Parameters
Name In Required Description

id

path

Yes

Person ID

Table 251. Request Fields
Field Type Required Description

reason

string

Yes

Why the verification is being revoked. A NUL (U+0000) is a 422 validation-failed naming reason, value-free.

Responses
  • 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 empty reason or one over 500 bytes (validation-failed), or a NUL (U+0000) in reason (validation-failed naming 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

Table 252. Request Fields
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. Screened with zero entries is legal (Gateway answered for the month and listed no in-taxonomy benefit, so every active fact ends) — the projection row is what distinguishes it from NoGatewayRecord, which is why the projection exists.

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).

Responses
  • 200: Idempotent replay — the ORIGINAL outcome re-derived from the projection row

  • 201: Outcome recorded (the entries' facts, a terminated fact 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 (field outcome.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 an outcome listing more than 16 entries, or an entry whose beneficiary_role is empty, over 32 bytes or malformed, or a screened_month that 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

Table 253. Parameters
Name In Required Description

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

worker

query

No

Filter by creating worker. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

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 invalid-enum-value on admin_unit, a NUL (U+0000) included. Elsewhere the match is exact, and a NUL, which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

search

query

No

Substring search across the plaintext reporter_type, admin_unit, and created_by (worker) columns — per-column, so a term must match within a single column. The encrypted reporter name/phone columns are opaque ciphertext at rest and are deliberately NOT searchable. LIKE metacharacters are escaped and matched literally. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

person_id

query

No

Filter to referrals where this person appears as victim or perpetrator on any allegation.

sort_by

query

No

Sort column: received_at, response_priority (the ruleset token text, ordered lexically — not by urgency), reporter_type, admin_unit. Any other key (including the retired priority) falls back to the entity’s default ordering.

sort_dir

query

No

Sort direction: asc or desc (default: desc).

Responses
  • 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-value on admin_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-UUID person_id) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Forbidden

  • 422: A filter over its length cap: worker 64, admin_unit 100, search 500, sort_by / sort_dir 32 bytes; or a NUL (U+0000) in worker or search, or in admin_unit where the jurisdiction has no US unit table, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failed naming 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}

Table 254. Parameters
Name In Required Description

id

path

Yes

Referral ID

Responses
  • 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

Table 255. Parameters
Name In Required Description

id

path

Yes

Referral ID

Table 256. Request Fields
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 ChMal code is crate::ncands::abuse_type_to_chmal.

child_fatality

boolean

No

Whether this maltreatment allegation was fatal to the child — the NCANDS Child File maltreatment-death (element 34) source. Defaults to false when omitted; usually set during the investigation via the update path.

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 idempotency-conflict.

description

string (optional)

No

Free-form narrative description of the allegation. A NUL (U+0000) is a 422 validation-failed naming description, value-free.

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.

Responses
  • 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-failed naming 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}

Table 257. Parameters
Name In Required Description

id

path

Yes

Referral ID

allegation_id

path

Yes

Allegation ID

Table 258. Request Fields
Field Type Required Description

child_fatality

boolean (optional)

No

Updated child-fatality indicator (NCANDS element 34); None leaves it unchanged (the fatality determination is often reached during the investigation).

disposition

Disposition (optional)

No

Disposition

version

integer

Yes

The allegation version from the caller’s last read — REQUIRED. The update only applies to a row still at this version; a stale value (a replay, or a lost race against a concurrent disposition write) is a 409 concurrent-modification — re-read and re-review, never a silent clobber of a newer disposition.

Responses
  • 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

Table 259. Parameters
Name In Required Description

id

path

Yes

Report ID

Responses
  • 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

Table 260. Parameters
Name In Required Description

id

path

Yes

Report ID

Table 261. Request Form Fields (multipart/form-data)
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.

Responses
  • 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}

Table 262. Parameters
Name In Required Description

id

path

Yes

Report ID

att_id

path

Yes

Attachment ID

Responses
  • 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

Table 263. Parameters
Name In Required Description

id

path

Yes

Report ID

att_id

path

Yes

Attachment ID

Responses
  • 200: Attachment file

  • 206: Partial content: the one Range slice (bytes=a-b, a- or -n) with Content-Range, Accept-Ranges: bytes and the slice’s Content-Length; honoured only when an If-Range strong-matches the ETag. 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

Table 264. Parameters
Name In Required Description

id

path

Yes

Report ID

Table 265. Request Fields
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 UNIQUE (report_id, person_id, role) backstop still refuses different-key duplicates.

jsonb_index

integer (optional)

No

Index into the report’s children[] or adults[] array. Optional for forward-compat — when present, validated against the array length.

person_id

UUID

Yes

UUID of the craig_cases.persons row to link.

role

string

Yes

child or adult.

ruleset_name

string (optional)

No

Some(name + version) when the worker confirmed a suggestion; None when the worker bypassed via "Link existing person" picker. The orchestration layer’s audit signal that no rules ran. A present name must be a rule-set name: 1 to 64 bytes of lowercase letters, digits, - and _, starting and ending with a letter or digit (a NUL included, anything else is a 422 validation-failed naming ruleset_name, value-free).

ruleset_version

string (optional)

No

Companion to Self::ruleset_name — version string of the ruleset that produced the confirmed suggestion. A NUL (U+0000) is a 422 validation-failed naming ruleset_version, value-free.

Responses
  • 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_name outside 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) in ruleset_version (validation-failed naming 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}

Table 266. Parameters
Name In Required Description

id

path

Yes

Report ID

link_id

path

Yes

report_persons row ID

Responses
  • 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

Table 267. Parameters
Name In Required Description

id

path

Yes

Report ID

seed_case_id

query

No

Optional case id whose case_household joins the candidate seed when the active jurisdiction’s ruleset declares case_household in metadata.seed_sources. Omitted → degraded mode for that source (zero contribution).

Responses
  • 200: Ranked candidates per entry

  • 400: A malformed query parameter (e.g. a non-UUID seed_case_id) is the extractor’s value-free bad-request problem, 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

Table 268. Parameters
Name In Required Description

page

query

No

1-indexed page number (default 1).

per_page

query

No

Page size (default 25).

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 invalid-enum-value on admin_unit, a NUL (U+0000) included. Elsewhere the match is exact, and a NUL, which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

person_id

query

No

Filter to reports that have at least one report_persons link to this person id.

search

query

No

Substring search over the plaintext admin_unit + reporter_type columns. The encrypted narrative and reporter-name columns are opaque ciphertext at rest and are deliberately NOT searchable — under EncryptionMode=Required a search over them would silently match nothing. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

sort_by

query

No

Sort column: received_at, admin_unit, reporter_type.

sort_dir

query

No

Sort direction: asc or desc (default: desc).

Responses
  • 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-value on admin_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-UUID person_id) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 422: A filter over its length cap: admin_unit 100, search 500, sort_by / sort_dir 32 bytes; or a NUL (U+0000) in search, or in admin_unit where the jurisdiction has no US unit table, checked before the list scope, so a caller whose scope lists nothing gets it too (validation-failed naming 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

Table 269. Request Fields
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 invalid-enum-value on this field. A jurisdiction without such a list keeps the string as sent, where a NUL (U+0000) is a 422 validation-failed naming admin_unit, value-free.

adults

object

No

JSONB array of Adult entries (PII; server stores encrypted), under the same size limits as children.

children

object

No

JSONB array of Child entries (PII; server stores encrypted). 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 it is a 422 validation-failed naming this field.

narrative

string

Yes

Free-text narrative (PII; server stores encrypted).

partner_context

object

Yes

Who submitted a report: {"type":"anonymous"} for a submission with no partner identity, or {"type":"authenticated","id":"<uuid>"} naming the submitting partner.

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 validation-failed naming this field.

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 validation-failed naming this field). Part of the report’s idempotency intent: a replay of the same received_request_id with a different receipt is the identity-mismatch 409.

received_ip_hash

string (optional)

No

HMAC-SHA256 hash of the originating IP, stored as sent. A NUL (U+0000) is a 422 validation-failed naming received_ip_hash, value-free.

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 RptSrc of the Child File, captured as a REQUIRED intake fact on every channel and distinct from the reporter’s status (ReporterType).

Transcribed from the NDACAN NCANDS Child File Codebook (rev 2025-09-12); one variant per codebook value, so craig_reference::ncands::report_source_to_rptsrc is total. The snake_case token is simultaneously the JSON wire value, the literal the database admits on a report and on a referral, and the intake / craig-web <option value>. Provenance: only codes 4/8/9/10/11/13 were named in-tree at first; the maintainer’s gate review confirmed 7 = Substitute Care Provider and 12 = Alleged Perpetrator; 88 = Other, 99 = Unknown.

reporter_anonymous

boolean

No

The reporter chose to report anonymously (intake’s anonymous flag). Valid only with concerned_citizen: any other reporter type is a 422 naming this field. Record views withhold the reporter’s contact details; the audited reveal returns them. Omitted ⇒ false. Part of the report’s idempotency intent when true, so a replay that flips it is the identity-mismatch 409.

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 RptSrc (#10) category is captured separately as ReportSource. A mandated reporter may be medical, education, social-services … personnel, so no status maps to a source code.

Responses
  • 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-value on admin_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, a received_at more than a minute in the future, or reporter_anonymous true for a reporter_type other than concerned_citizen (validation-failed), or a NUL (U+0000) in received_ip_hash, or in the free-text admin_unit of a jurisdiction without a US unit table (validation-failed naming the field, value-free); or more than 10 children (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}

Table 270. Parameters
Name In Required Description

id

path

Yes

Report ID

Responses
  • 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

Table 271. Parameters
Name In Required Description

id

path

Yes

Report ID

Table 272. Request Fields
Field Type Required Description

icwa_flag

boolean

No

true when ICWA may apply.

seed_case_id

UUID (optional)

No

Optional case id whose household persons join the auto-link candidate seed set.

Responses
  • 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 malformed seed_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

Table 273. Parameters
Name In Required Description

id

path

Yes

Report ID

Responses
  • 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.

Table 274. Parameters
Name In Required Description

id

path

Yes

Report ID

Responses
  • 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

Table 275. Parameters
Name In Required Description

id

path

Yes

Report ID

Table 276. Request Fields
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 disposition_kinds.

rationale

string

Yes

The worker’s stated reason — required, at least one non-blank character. A NUL (U+0000) is a 422 validation-failed naming rationale, value-free.

supersedes_id

UUID (optional)

No

If overriding a prior decision, the decision_id being superseded.

Responses
  • 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, or rules-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 as ruleset-moved against 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_priority outside the surface’s attestable set — NONE included; or a NUL (U+0000) in rationale, validation-failed naming the field, value-free) or screening-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. Or service-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

Table 277. Parameters
Name In Required Description

id

path

Yes

Report ID

decision_id

path

Yes

Screening decision ID

Responses
  • 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

Table 278. Parameters
Name In Required Description

id

path

Yes

Report ID

decision_id

path

Yes

Screening decision ID

Responses
  • 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

Table 279. Parameters
Name In Required Description

id

path

Yes

Report ID

decision_id

path

Yes

Screening decision ID

Table 280. Request Fields
Field Type Required Description

action_kind

string

Yes

Action kind (schedule_contact, request_records, etc.).

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 validation-failed naming notes, value-free.

target

string (optional)

No

Optional target entity (person UUID, agency, etc.): at most 500 bytes (a 422 validation-failed naming target past it); an absent, null or empty value is kept as sent. A NUL (U+0000) is a 422 validation-failed naming target, value-free.

Responses
  • 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 target over 500 bytes, or a NUL (U+0000) in target or notes (validation-failed naming 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

Responses
  • 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

Responses
  • 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.


Edit this page · latest