SHINES CPS Intake — Proposed API
|
Superseded (2026-08-31, epic &85 / #1610). Georgia’s real SHINES ingestion
path is an S3 bucket drop, not an HTTP endpoint. The This page is retained for the |
|
Historical (pre-#1610). SHINES has no intake API (ADR-042 § Context). CRAIG defined this reasonable target HTTP contract and built against a mock ( |
Overview
-
Transport: a single synchronous, durability-confirming HTTPS
POST. The edge is stateless (ADR-017), so the round-trip is the only durability receipt — no optimistic acks, no local buffering. The returned SHINES record id becomes the reporter’s tracking reference. -
Direction: CRAIG → SHINES only. SHINES has no signature capability; CRAIG → SHINES is an authenticated
POST— JSON when there are no attachments, andmultipart/form-datawhen a signed report carried supporting documents (ADR-042 §D9, #942). (3rd-party → CRAIG signing is a separate concern — see the keyring sidecar.) -
No status read: SHINES exposes no status-lookup contract in v1, and legacy record ids are guessable `NUMBER`s (not UUIDs), so a status-by-id route would be an enumeration vector. The tracking reference is a durable receipt the reporter keeps, not a lookup key (ADR-042 §D7).
Endpoint
POST /shines/cps-requests (the mock path; the real SHINES base path is #691).
Request body — two forms (the receiver content-negotiates on Content-Type):
-
application/json— aCpsRequestJSON object (below). The default; used whenever the submission carried no attachments. -
multipart/form-data— used when a signed report carried supporting documents (ADR-042 §D9, #942): arequestpart (the sameCpsRequestJSON, with a populatedsupportingDocuments) + one repeatedfilepart per attachment (the raw bytes,filename= the reporter’s sanitized file name). Each file’s SHA-256 is already verified at the CRAIG edge against the JWS-signedsupportingDocumentsmanifest before the forward, so SHINES MAY re-verify but need not.
Response (200, both forms):
{ "record_id": "100000001", "status": "accepted" }
record_id is a string (a legacy SHINES NUMBER; string avoids the leading-zero loss an integer would cause). status is the literal "accepted". Error shapes are #691.
CpsRequest — wire shape
The wire keys are the exact SHINES spellings emitted by the mapper, including the SHINES quirks isInfosterCare (lowercase f), chindInfo (the SHINES array name), and the questionChidDanger typo — preserved verbatim for fidelity. CRAIG-side struct fields are idiomatic snake_case; the mapper translates both names and values. The full field-by-field CRAIG→SHINES mapping + the RefVal crosswalk live in the plan (Appendix A/B).
Free-text values are plain text, no longer HTML-entity-encoded: CRAIG strips markup, control characters and the bidi format controls when the request deserializes (craig_intake_contracts::SanitizedText, #2524), so &, < and > arrive literal and SHINES escapes at its own output (#691). The signed manifest’s supportingDocuments[].fileName / fileType are sanitized the same way (#1755); its sha256 is forwarded byte-exact.
A JSON Schema (draft 2020-12) of the stored object is published as
cps-request.schema.json:
every key, which keys may be omitted (the numeric *Id keys), the Y / N code sets and the date formats. It is hand-written
from the mapper structs (services/craig-intake/src/backend/shines/mapper.rs),
not generated — a mapper change updates it in the same MR, and the mapper unit test
the_json_schema_key_sets_match_the_mapped_request fails while an object’s properties / required key sets differ
from the mapped keys. supportingDocuments[].fileType is constrained to the accepted attachment extensions
(attachments::check_declared_file_types), pinned by the_schema_file_type_pattern_spells_the_accepted_types. CRAIG’s own claim
record beside it is
craig-receipt.schema.json
(not for SHINES ingestion).
Top-level scalars
| Wire key | Type | Source / notes |
|---|---|---|
|
string |
incident datetime (date portion) |
|
string |
reporter county — a SHINES "County" list label (#2098) |
|
string |
incident location |
|
string |
reporter’s relationship to the victim child — a SHINES "Alleged Maltreator Relationship" 2-letter code (#2099) |
|
string |
sanitized concern description |
|
string |
submit-time (date) — always the server’s receipt date |
|
string |
RFC 3339 UTC date-time to the second ( |
|
string |
safety concerns |
|
string |
reporter phone (truncated) |
|
string |
caretaker block (ExtraFields) |
|
string |
secondary caretaker (ExtraFields) |
|
string |
ExtraFields — at most 50 characters (#2100) |
|
string |
foster-care block, asked once per report (bool → |
|
string |
ExtraFields |
|
string |
screening flags ( |
|
string |
ICWA / Indian heritage |
|
string |
household-illness flag (bool → |
|
string |
ExtraFields |
|
string |
the nine narrative |
Nested objects
-
reporterInfo{ emailId, firstName, lastName, telephone, repType, reportSource, sex, state, isHouseholdMember, relToPrimaryCaretaker, altContactInfo }—repTypeis the reporter’s SHINES Reporter Type when one is given — required of a mandated reporter (a SHINES "Reporter Type" list label, #2098) — else the reporter-type free-text via the placeholder crosswalk (#692; the signed channel carries the non-public reporter types —professional/law_enforcement/self_report).sexis the reporter’s gender asF/M/Uandstatea SHINES "State" list label (both #2098, empty when not given). -
adultInfo[]— every adult on the report, in submission order:{ firstName, lastName, dob, ssn, sex, raceId?, ethnicityId?, maritalStatusId?, langId?, county, address, contactNumber, altContactInfo, isAllegedMaltreator, isHouseholdMember, relToPrimaryCaretaker }(the demographic keys are sourced from the adult’s SHINES pick-list values, #2101). An adult’s role is itsrelToPrimaryCaretakercode. Since #2351 this one list replaces the singularmotherInfo/fatherInfoslots andotherHouseholdInfo[](ADR-042 § "Amendment 2026-10-13"): DFCS’s call scripts keep one adult list and ask for no mother or father, so the per-adultshines_household_roleanswer is removed andisOtherMemberwith it. -
chindInfo[]—{ firstName, lastName, dob, ssn, isVictim, sex, raceId?, grade, isHouseholdMember, relToPrimaryCaretaker, address, county }. -
supportingDocuments[]—{ fileName, fileType, sha256 }(always emitted;[]when none). The signed attachment manifest (ADR-042 §D9, #940):fileNamethe reporter’s file name,fileTypeits extension (e.g..pdf),sha256the lowercase-hex SHA-256 the reporter signed and the edge verified. Only the signed channel carries files: the unsigned public form refuses any manifest entry (400attachment-manifest-mismatch, naming no file), so itssupportingDocumentsis always[](#2512). On the multipart form the manifest travels in therequestpart while the bytes travel as thefileparts; the two are correlated bysha256.fileNameandfileTypeare free-text sanitized at the CRAIG edge like every other free-text value (plain text: markup, bidi format controls and every control character but tab and line feed stripped), butfileTypeis first matched exactly as sent against the accepted types below, so markup or a control character around.pdfis refused (the same generic 400attachment-content-unaccepted), never sanitized into an accepted type;sha256is forwarded byte-exact. Since #2105 the edge also checks each file against its declaredfileType: only PDF and image types (.pdf,.jpg/.jpeg,.png,.gif,.tif/.tiff,.webp) are accepted and the bytes must open with that type’s magic signature (else a generic 400attachment-content-unacceptednaming no file) — a signature sniff, not a full parse, so SHINES should still treat attachments as untrusted content.
Portal-parity extensions (epic &100)
Keys the mandated-portal parity work (plan shines-portal-parity) adds to the
wire. Each is a proposal until SHINES confirms it: a blocking go-live dependency under #691, as every key here is.
Value sets are the SHINES pick-lists in craig_reference::shines_codes.
| Wire key | Added by | Values / notes |
|---|---|---|
|
#2098 |
|
|
#2098 |
a SHINES "State" list label |
|
#2099 |
|
|
#2099 |
a SHINES "Relationship to Primary Caregiver" 2-letter code: the Principal list when |
|
#2100 |
free text, at most 100 characters |
|
#2100 |
was a date ( |
|
#2101 |
|
|
#2101 |
placeholder id of the adult’s SHINES Ethnicity (#692); omitted when unanswered |
|
#2101 |
a SHINES "County" list label; the adult’s |
|
#2101 |
the child’s SHINES Gender — |
|
#2102 |
|
|
#2102 |
a "Relationship to Primary Caregiver" 2-letter code — Principal list for a household member, Collateral otherwise |
|
#2103 |
the child’s address composed |
|
#2103 |
a SHINES "County" list label; empty for a household-member child with no address |
|
#2101 |
now the placeholder position of a SHINES Race / Marital Status / Language value; race is single-select, so the former multi-race fallback id is gone |
Call-intake extensions (#2333)
Keys the call-intake contract (plan shines-call-intake-contract) adds for
the P28 call-taker form. The mandated-reporter form sends none of this data, so for its submissions the strings are
empty, the Id keys absent and an adult’s isDfcsStaff N. Every key is a *proposal until SHINES confirms it (#692 /
#693). Until staff authorization exists (#2617), CRAIG refuses the reporter-demographics, triage, notification and
screening inputs on every channel, POST /signed/v1/reports included (a 403 field-permission-denied naming the
block), so today the keys those inputs fill are empty, and the reporter *Id keys absent, in every stored request. A bool maps to Y / N (empty when an optional answer — a block answer or a child’s isInFosterCare — was not given).
| Wire key | Values / notes |
|---|---|
|
the reporter’s ISO date of birth, the "unsure or approximate" flag, and SSN (digits only) |
|
placeholder ids of the reporter’s SHINES Race / Ethnicity / Marital Status / Language, as on an adult; omitted when unanswered |
|
free text |
|
whether the caller is DFCS county staff, and whether the county met its response time |
|
free text describing the safety concern answered in |
|
|
|
the adult’s employer, the "DFCS Staff" flag, and where an active-duty adult is stationed |
|
the child’s designation, whether this child is in foster care, and the placement / provider name (required at the CRAIG edge when in foster care). The report-level |
|
an apartment / unit, when given, is composed after the street: |
|
always emitted. |
|
always emitted. |
|
always emitted. |
|
always emitted. |
ssn is a string (digits-only after stripping separators) — same leading-zero rationale as record_id. raceId/ethnicityId/maritalStatusId/langId are numeric SHINES RefVal ids from a placeholder (craig-reference::shines::code_table_placeholder_id — the value’s 1-based position in its SHINES pick-list, #2101), swapped for the authoritative tables before go-live (#692); an unanswered field omits the optional *Id key (no silent unwrap_or(0)). sex is M/F/U (U for an Unknown gender, a #692 placeholder); booleans are Y/N (or empty for Option::None).
Idempotency + retry (decision, #701)
The proposed POST carries no idempotency key today, and ShinesSink performs exactly one POST per
submission with no retry (regression-locked by a sink unit test, forward_posts_exactly_once). So there is
no double-submit risk in the current design. When SHINES-outage buffering lands (the deferred
#215 local-outbox) and introduces a retry,
the contract MUST gain an idempotency key — e.g. carrying the intake received_request_id as a SHINES dedup key
— so a retry after an accepted-but-unacknowledged POST cannot create a duplicate CpsRequest. That key is part
of the authoritative contract negotiation (#691); CRAIG does not invent it ahead of SHINES. Until then, the
exactly-one-POST invariant is the guarantee.
Related
-
ADR-042 — the backend-profile architecture + the SHINES mapping decision.
-
Standalone intake architecture — how a submission reaches this API.
-
craig-intake-keyring sidecar — the no-partner-tenancy signed-API auth.
-
Go-live data dependencies: #691 (this contract), #692 (RefVals), #693 (required-field set).