Reporting & Data Quality API Reference
Data quality monitoring, plus submission management for AFCARS (the Adoption and Foster Care Analysis and Reporting System) and NCANDS (the National Child Abuse and Neglect Data System).
Endpoints
AFCARS
List AFCARS submissions
GET /v1/reporting/afcars
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size; clamped to the fleet ceiling, and 0 returns only |
status |
query |
No |
Exact match on the submission status, e.g. |
search |
query |
No |
Case-insensitive substring matched against the status. |
sort_by |
query |
No |
|
sort_dir |
query |
No |
|
-
200: Page of AFCARS submissions
-
400: A page past the depth cap; a malformed query parameter (e.g. a non-integer
page) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden — including a worker- or supervisor-scoped caller: these rows carry no per-worker ownership, so an assignment scope is refused rather than widened
-
422: A filter or sort value longer than its documented maximum (
validation-failed, naming the field) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Enqueue AFCARS submission generation for one report half
POST /v1/reporting/afcars/generate
Enqueues ONE generation of the AFCARS out-of-home-care file for the report half reporting_period (<YYYY><A|B>) as the background job afcars_generate. Body = { client_request_id, reporting_period } — strict (deny_unknown_fields).
The enqueue IS the idempotency claim transaction. The SAME client_request_id replays the SAME job (202, whatever its state or the surface’s). A FRESH request first needs the verified AFCARS surface, then a generable half: ended, on or after the crosswalk’s supported_from, served by a dictionary period row. Either refusal records nothing.
The job’s input carries the label and as_of (the enqueue instant minus the 5-minute extended ceiling). Poll Location (GET /v1/reporting/jobs/{id}): result is the finalized submission (validated or validated_with_errors) whose id IS the job id.
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED. Same id + identical intent replays the SAME job; a different intent under the same id is a 409 idempotency-conflict. |
reporting_period |
string |
Yes |
The report half |
-
202: Generation enqueued (or a replay of the stored job — nothing re-enqueued);
Location=/v1/reporting/jobs/{id} -
401: Unauthorized
-
403: Forbidden
-
409: A generation for this half is already queued or running in this jurisdiction (
job-already-active), or this client_request_id was used with a different intent or by a request made before generation became a background job (idempotency-conflict), or the replayed job is gone (replay-entity-gone) -
422: Validation failure (
validation-failed) — a missingclient_request_id, an unknown field, areporting_periodthat is not<YYYY><A|B>, or (surface verified) a half not yet ended, beforesupported_fromor without a dictionary period row -
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 — or the AFCARS surface is not verified (
AFCARS_SURFACE_NOT_READY; the detail is the closed reason token; 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.
AFCARS surface metadata
GET /v1/reporting/afcars/metadata
The verifier’s state and reason, the dictionary + crosswalk identities the surface is looking at, the current report period on the jurisdiction clock (the completed half through its due date rolled off a weekend, then the half in progress) and the crosswalk’s supported_from — read from the retained CANDIDATE, so every field but surface.state is absent until the federal ruleset and this jurisdiction’s crosswalk are promoted. Never cached.
-
200: The surface metadata
-
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.
Get AFCARS submission by ID
GET /v1/reporting/afcars/{id}
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: AFCARS submission details
-
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.
Approve AFCARS submission
PUT /v1/reporting/afcars/{id}/approve
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Submission approved
-
400: Invalid state transition
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Status moved concurrently since your read — re-read and retry
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Generate AFCARS flat file export
POST /v1/reporting/afcars/{id}/export
Generates a tab-delimited flat file from the submission data and stores it in object storage. Deterministic per (submission, generated_on): a replay under the same client_request_id returns the byte-identical artifact. The metadata row names the submission’s RETAINED dictionary and crosswalk (rule-set id, revision, content sha256), read from its policy row with each document’s hash re-verified — never the live surface — so a promotion under the same name changes no re-export. The stored object is the file sealed under the reporting column key (AES-256-GCM-SIV, bound to the submission, the attempt and generated_on); a keyless optional deployment stores it as built. export_sha256 is the digest of the delivered (decrypted) file. A submission that is ready for transmission is never re-exported (409 afcars-artifact-frozen).
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID (optional) |
No |
Client-held idempotency id: replays under it are answered from the pinned attempt (byte-identical artifact). |
-
200: Export generated (a same-client_request_id retry replays the SAME artifact byte-identically)
-
400: Invalid state
-
401: Unauthorized
-
403: Forbidden (including a foreign actor replaying another’s client_request_id)
-
404: Not found
-
409: export-source-changed: the submission’s data changed since this client_request_id first exported it (prior artifact retained; mint a fresh id) — or concurrent retries kept finalizing — or afcars-policy-missing: the submission has no retained policy row (nothing was written) — or afcars-artifact-frozen: the submission is ready for transmission, so its artifact is frozen (nothing was written)
-
422: client_request_id reused against a different submission or kind, or a body field whose value does not deserialize, e.g. a malformed client_request_id (
validation-failed; the field is named, the value never echoed) -
500: Internal error — incl. a retained policy document that no longer hashes to its key (nothing was written), or a reporting key that does not match the stored key lineage (nothing was claimed)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (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 AFCARS export flat file
GET /v1/reporting/afcars/{id}/export/download
The decrypted flat file as a text/plain attachment (Cache-Control: no-store). A keyed deployment opens the stored envelope first and never serves an object that does not open.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Export file
-
206: Partial content: the one
Rangeslice (bytes=a-b,a-or-n) withContent-Range,Accept-Ranges: bytesand the slice’sContent-Length; honoured only when anIf-Rangestrong-matches theETag. A multi-range request is the full 200 -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
416: Range not satisfiable:
Content-Range: bytes */<length> -
500: Internal error — incl. a stored artifact that does not open under its context (the detail is logged, never served)
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Mark an AFCARS submission ready for transmission
PUT /v1/reporting/afcars/{id}/ready-for-transmission
Certifies the submission’s CURRENT export for transmission. Outside any transaction: authorization, the row, the verified AFCARS surface, the readiness record the export finalizer wrote for the current export generation, then the digest chain — the stored object hashes to the recorded object digest, opens under its context (keyless: as stored), and the opened file’s digest equals the recorded file digest and export_sha256. Then, under the row lock: the export unchanged since, approved, records and no validation errors, the head of its half, and the recorded dictionary and crosswalk identities equal to the surface’s. One reporting.afcars_ready_for_transmission event. Afterwards every export of the submission is refused (afcars-artifact-frozen); a regenerate stays allowed.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Submission ready for transmission
-
400: invalid-state-transition: the submission is not approved — or afcars-submission-invalid: it has no records or carries validation errors
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: afcars-export-missing: no readiness record names the current export, or its stored object is gone (export, then retry) — or afcars-superseded: a regenerate superseded the submission — or afcars-artifact-stale: the dictionary or crosswalk was promoted since the export (regenerate) — or conflict: the export moved since the verification (retry). Nothing was written
-
500: Internal error — incl. a stored artifact whose digest chain does not hold or that does not open (the detail is logged, never served; nothing was written)
-
503: Service Unavailable (RFC 9457 problem document) — incl. the AFCARS surface is not verified (
afcars-surface-not-ready; the detail is the closed reason token; nothing was written) -
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Review AFCARS submission
PUT /v1/reporting/afcars/{id}/review
Marks the submission as reviewed (validated → reviewed).
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Submission reviewed
-
400: Invalid state transition
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Status moved concurrently since your read — re-read and retry
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (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 the AFCARS validation report
GET /v1/reporting/afcars/{id}/validation
The per-element results, the cross-file steps, the generator’s gaps counted per reason, the observation-error row count and the findings counted per kind. Bounded by the view’s elements, never by the children; the rows themselves are paged by the errors and findings routes.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: The validation report; a submission without results answers empty lists
-
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.
Page the AFCARS observation errors
GET /v1/reporting/afcars/{id}/validation/errors
Ids, keys and class tokens only, ordered by id (UUID v7 — creation order), at most limit (default 100, at most 500) per page; cursor is exclusive and next_cursor is present only when the page was full. limit, class and element_key are checked before the submission is read, so a bad filter on an unknown id is 422.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
element_key |
query |
No |
Only rows of this oohc element key (at most 64 bytes). |
class |
query |
No |
Only rows of this error class. |
cursor |
query |
No |
The |
limit |
query |
No |
Rows per page, 1..=500 (default 100). |
-
200: One page of observation errors; a submission without results answers an empty list
-
400: A malformed query parameter (e.g. a non-UUID
cursor) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
422:
limitoutside 1..=500, an unknownclass, or anelement_keyover 64 bytes (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.
Page the AFCARS findings
GET /v1/reporting/afcars/{id}/validation/findings
The review-only findings: ids and kind tokens only, ordered by id (UUID v7 — creation order), at most limit (default 100, at most 500) per page; cursor is exclusive and next_cursor is present only when the page was full. limit and kind are checked before the submission is read, so a bad filter on an unknown id is 422.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
kind |
query |
No |
Only findings of this kind. |
cursor |
query |
No |
The |
limit |
query |
No |
Rows per page, 1..=500 (default 100). |
-
200: One page of findings; a submission without results answers an empty list
-
400: A malformed query parameter (e.g. a non-UUID
cursor) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
422:
limitoutside 1..=500 or an unknownkind(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.
Background Jobs
Poll a background job
GET /v1/reporting/jobs/{id}
The generic read-only poll of a reporting background job: the job as a LOGICAL resource — state (queued / running / succeeded / failed; the last two are terminal and immutable), the current attempt and the attempts[] ledger (an interrupted / crash attempt re-queues a convergent kind up to max_attempts), the typed progress document (done = cases pages fetched in the running attempt), result (the kind’s report — for ncands_generate the finalized NcandsSubmission the route answered as its 200 body before generation became a background job, whose id IS this job’s id — present iff succeeded), error (a CLOSED token + a categorical detail — exhausted after three crashed / interrupted attempts, engine_failed naming the engine error’s variant, e.g. CasesUnavailable when a cases page missed the 8 s hop budget — present iff failed). Authorized on the BackgroundJob resource type: admin realm-flat, the creator (human or service principal) by assigned_worker_sub; another actor is the fleet’s typed 403; an unknown id is 404 (no existence collapse — the row is looked up before the check). Cache-Control: no-store. Never writes.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Job id — the last segment of the |
-
200: The job (
Cache-Control: no-store) -
401: Unauthorized
-
403: Forbidden — not the creator and not admin
-
404: No such job
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Data Quality
Data quality dashboard
GET /v1/reporting/quality/dashboard
Returns data quality metrics, unresolved issue counts by severity, and latest readiness scores.
-
200: Dashboard data
-
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.
List data quality issues
GET /v1/reporting/quality/issues
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size; clamped to the fleet ceiling, and 0 returns only |
source_service |
query |
No |
Exact match on the emitting service, e.g. |
issue_type |
query |
No |
Exact match on the issue class, e.g. |
severity |
query |
No |
Exact match on severity (producers write |
resolved |
query |
No |
|
search |
query |
No |
Case-insensitive substring matched against severity or source service. |
sort_by |
query |
No |
|
sort_dir |
query |
No |
|
-
200: Page of data quality issues
-
400: A page past the depth cap; a malformed query parameter (e.g. a non-boolean
resolved) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden
-
422: A filter or sort value longer than its documented maximum (
validation-failed, naming the field) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Resolve a data quality issue
PUT /v1/reporting/quality/issues/{id}/resolve
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Issue ID |
-
200: Issue resolved
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Unreachable defensive arm: a live-but-unresolved row after a zero-row miss (no un-resolve route 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.
EventReplay
Replay outbox events in a time window
POST /v1/admin/events/replay
Re-stages the published outbox rows created in [from, to] (optionally one event_type) so the outbox worker republishes them. At most 100000 rows per call; when more is true, call again with the same window and resume_from. Rows already pending are left alone. dry_run=true only counts. A from older than the service’s outbox retention window is refused. Each batch commits on its own, so after a 5xx the committed batches stay re-staged and re-running the same window picks up the rest. Every admitted call, a dry run included, records an admin.events_replayed act naming the worker.
| Name | In | Required | Description |
|---|---|---|---|
from |
query |
Yes |
RFC 3339 inclusive lower bound on |
to |
query |
Yes |
RFC 3339 inclusive upper bound on |
event_type |
query |
No |
Optional |
dry_run |
query |
No |
If true, return the would-replay count without modifying rows. |
resume_from |
query |
No |
The |
-
200: The window’s count and what this call re-staged
-
400:
bad-request: a malformed or missingfrom/to, a non-booleandry_run,fromafterto,fromolder than the outbox retention window, or aresume_fromthat is not a replay cursor (fieldnames it) -
401: Missing or invalid bearer token
-
403: The acting identity is not an admin, or is a bare service principal (
worker-required): a replay is a worker’s act -
422:
validation-failed:event_typelonger than 255 bytes -
500: Internal error (the re-staged count overflowed, or an unclassified database error); batches already committed stay committed
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
NCANDS
List NCANDS submissions
GET /v1/reporting/ncands
| Name | In | Required | Description |
|---|---|---|---|
page |
query |
No |
1-indexed page number (default |
per_page |
query |
No |
Page size; clamped to the fleet ceiling, and 0 returns only |
status |
query |
No |
Exact match on the submission status, e.g. |
search |
query |
No |
Case-insensitive substring matched against the status. |
sort_by |
query |
No |
|
sort_dir |
query |
No |
|
-
200: Page of NCANDS submissions
-
400: A page past the depth cap; a malformed query parameter (e.g. a non-integer
page) is the extractor’s value-freebad-requestproblem, before the handler -
401: Unauthorized
-
403: Forbidden — including a worker- or supervisor-scoped caller: these rows carry no per-worker ownership, so an assignment scope is refused rather than widened
-
422: A filter or sort value longer than its documented maximum (
validation-failed, naming the field) -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Enqueue NCANDS submission generation for one fiscal year
POST /v1/reporting/ncands/generate
Enqueues ONE generation of the NCANDS Child File submission for the given Federal Fiscal Year as a background job. Body = { client_request_id, reporting_year } (the enqueue IS the idempotency claim transaction; the SAME client_request_id replays the SAME job, 202 again whatever its state; a FRESH id while a generation for the year is queued / running is the typed 409 job-already-active). The job’s input carries the year and as_of = the enqueue instant — the FIXED cohort (received_at ∈ [ffy) AND created_at ⇐ as_of) the paged cases walk reads under on every attempt. Poll Location (GET /v1/reporting/jobs/{id}): result is the finalized submission (the document the route once returned directly) whose id IS the job id, committed in ONE transaction with the job’s succeeded; a cases page that misses the 8 s hop budget fails the attempt with zero rows written (engine_failed).
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID |
Yes |
Client-minted idempotency id — REQUIRED.
Same id + identical intent replays the SAME job (202 again,
whatever its state — the cases export is never re-fetched for a
replay); a different intent under the same id is a 409
idempotency-conflict; a fresh id while a job for the year is
active is the typed 409 |
reporting_year |
integer |
Yes |
Calendar reporting year (e.g. |
-
202: Generation enqueued (or a replay of the stored job — nothing re-enqueued);
Location=/v1/reporting/jobs/{id} -
401: Unauthorized
-
403: Forbidden
-
409: A generation for this fiscal year is already queued or running in this jurisdiction (
job-already-active), or this client_request_id was used with a different intent (idempotency-conflict), or the replayed job is gone (replay-entity-gone) -
422: Validation failure — a missing
client_request_idor a forged field (validation-failed) -
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.
Approve NCANDS submission
PUT /v1/reporting/ncands/{id}/approve
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Submission approved
-
400: Invalid state transition
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Status moved concurrently since your read — re-read and retry
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Generate NCANDS Child File export
POST /v1/reporting/ncands/{id}/export
Builds the tab-delimited NCANDS Child File from the submission’s materialized rows and stores it in object storage. Deterministic: the body is timestamp-free, so a replay under the same client_request_id returns the byte-identical artifact.
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
| Field | Type | Required | Description |
|---|---|---|---|
client_request_id |
UUID (optional) |
No |
Client-held idempotency id: replays under it are answered from the pinned attempt (byte-identical artifact). |
-
200: Export generated (a same-client_request_id retry replays the SAME artifact byte-identically)
-
401: Unauthorized
-
403: Forbidden (including a foreign actor replaying another’s client_request_id)
-
404: Not found
-
409: export-source-changed: the submission’s materialized rows changed since this client_request_id first exported them (prior artifact retained; mint a fresh id) — or concurrent retries kept finalizing
-
422: client_request_id reused against a different submission or kind, or a body field whose value does not deserialize, e.g. a malformed client_request_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.
Download NCANDS Child File export
GET /v1/reporting/ncands/{id}/export/download
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Export file
-
206: Partial content: the one
Rangeslice (bytes=a-b,a-or-n) withContent-Range,Accept-Ranges: bytesand the slice’sContent-Length; honoured only when anIf-Rangestrong-matches theETag. A multi-range request is the full 200 -
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
416: Range not satisfiable:
Content-Range: bytes */<length> -
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.
Review NCANDS submission
PUT /v1/reporting/ncands/{id}/review
Marks the submission as reviewed (validated → reviewed).
| Name | In | Required | Description |
|---|---|---|---|
id |
path |
Yes |
Submission ID |
-
200: Submission reviewed
-
400: Invalid state transition
-
401: Unauthorized
-
403: Forbidden
-
404: Not found
-
409: Status moved concurrently since your read — re-read and retry
-
503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.
-
504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.