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 Shines backend profile now writes the conformed CpsRequest (and signed-path attachments) to an object store via craig_store::store_blob_create — see ADR-042 § "Amendment 2026-08-31" and Standalone Intake — Backend-Profile Architecture. The POST /shines/cps-requests HTTP contract and its mock (tools/craig-mock-server/src/shines.rs) are removed. The object schema and the key layout ({prefix}/{client_request_id}/cps_request.json, with CRAIG’s craig_receipt.json beside it) are CRAIG’s proposal and are not yet confirmed by BOTS (#691).

This page is retained for the CpsRequest schema section below — it is the shape of the object written to cps_request.json. The transport / endpoint / response prose no longer reflects reality.

Historical (pre-#1610). SHINES has no intake API (ADR-042 § Context). CRAIG defined this reasonable target HTTP contract and built against a mock (tools/craig-mock-server, POST /shines/cps-requests). This page is the source-of-truth derived from the CRAIG CpsRequest mapper (services/craig-intake/src/backend/shines/mapper.rs).

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, and multipart/form-data when 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 — a CpsRequest JSON 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): a request part (the same CpsRequest JSON, with a populated supportingDocuments) + one repeated file part 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-signed supportingDocuments manifest 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

incidentDate

string

incident datetime (date portion)

county

string

reporter county — a SHINES "County" list label (#2098)

location

string

incident location

reporterRelationship

string

reporter’s relationship to the victim child — a SHINES "Alleged Maltreator Relationship" 2-letter code (#2099)

narrative

string

sanitized concern description

dateReported

string

submit-time (date) — always the server’s receipt date

intakeDate

string

RFC 3339 UTC date-time to the second (2026-10-12T14:03:00Z, #2100): the reporter’s intake_datetime when given (may be backdated), else the server’s receipt instant

emergencyInfo

string

safety concerns

reporterContactNumber

string

reporter phone (truncated)

primaryCaretaker (+Address, +Relationship)

string

caretaker block (ExtraFields)

secCaretaker (+Address)

string

secondary caretaker (ExtraFields)

firstHandInfo

string

ExtraFields — at most 50 characters (#2100)

isInfosterCare, fosterCareName

string

foster-care block, asked once per report (bool → Y/N; the name at most 50 characters). fosterCareAddress was REMOVED by #2104 — the portal asks no provider address

familyName

string

ExtraFields

isInMilitary, isInMilitaryParent, isPreviouslyReported

string

screening flags (Y/N/empty)

isNaorit, isNaoritComments

string

ICWA / Indian heritage

isAnyoneIll

string

household-illness flag (bool → Y/N/empty) (ExtraFields, #935)

isAnyoneIllComments

string

ExtraFields

questionMalNegOrAbuse … questionFswsComments, questionOccurAgain, questionChidDanger

string

the nine narrative question* fields

Nested objects

  • reporterInfo { emailId, firstName, lastName, telephone, repType, reportSource, sex, state, isHouseholdMember, relToPrimaryCaretaker, altContactInfo } — repType is 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). sex is the reporter’s gender as F/M/U and state a 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 its relToPrimaryCaretaker code. Since #2351 this one list replaces the singular motherInfo / fatherInfo slots and otherHouseholdInfo[] (ADR-042 § "Amendment 2026-10-13"): DFCS’s call scripts keep one adult list and ask for no mother or father, so the per-adult shines_household_role answer is removed and isOtherMember with 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): fileName the reporter’s file name, fileType its extension (e.g. .pdf), sha256 the 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 (400 attachment-manifest-mismatch, naming no file), so its supportingDocuments is always [] (#2512). On the multipart form the manifest travels in the request part while the bytes travel as the file parts; the two are correlated by sha256. fileName and fileType are 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), but fileType is first matched exactly as sent against the accepted types below, so markup or a control character around .pdf is refused (the same generic 400 attachment-content-unaccepted), never sanitized into an accepted type; sha256 is forwarded byte-exact. Since #2105 the edge also checks each file against its declared fileType: 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 400 attachment-content-unaccepted naming 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

reporterInfo.sex

#2098

F / M / U from the reporter’s SHINES Gender; U is a placeholder code (#692)

reporterInfo.state

#2098

a SHINES "State" list label

reporterInfo.isHouseholdMember

#2099

Y / N (empty when not answered) — whether the reporter lives in the child’s household

reporterInfo.relToPrimaryCaretaker

#2099

a SHINES "Relationship to Primary Caregiver" 2-letter code: the Principal list when isHouseholdMember is Y, the Collateral list otherwise

reporterInfo.altContactInfo

#2100

free text, at most 100 characters

intakeDate (format change)

#2100

was a date (YYYY-MM-DD); now an RFC 3339 UTC date-time

adultInfo[].sex

#2101

F / M / U from the adult’s SHINES Gender

adultInfo[].ethnicityId

#2101

placeholder id of the adult’s SHINES Ethnicity (#692); omitted when unanswered

adultInfo[].county

#2101

a SHINES "County" list label; the adult’s state (a SHINES "State" label) rides in the composed address

chindInfo[].sex gains U

#2101

the child’s SHINES Gender — F / M / U

adultInfo[] / chindInfo[] .isHouseholdMember

#2102

Y / N — whether the person lives in the child’s household

adultInfo[] / chindInfo[] .relToPrimaryCaretaker

#2102

a "Relationship to Primary Caregiver" 2-letter code — Principal list for a household member, Collateral otherwise

chindInfo[].address

#2103

the child’s address composed street, city, state, zip (as the adult address); required at the CRAIG edge when the child is not a household member; empty when no address part is given

chindInfo[].county

#2103

a SHINES "County" list label; empty for a household-member child with no address

raceId / maritalStatusId / langId (value change)

#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

reporterInfo .dob, .dobApproximate, .ssn

the reporter’s ISO date of birth, the "unsure or approximate" flag, and SSN (digits only)

reporterInfo .raceId?, .ethnicityId?, .maritalStatusId?, .langId?

placeholder ids of the reporter’s SHINES Race / Ethnicity / Marital Status / Language, as on an adult; omitted when unanswered

reporterInfo .employer, .additionalContactName, .additionalContactNumber

free text

reporterInfo .isDfcsCountyStaff, .countyMetResponseTime

whether the caller is DFCS county staff, and whether the county met its response time

safetyConcernDescription

free text describing the safety concern answered in emergencyInfo

adultInfo[] .designation

Principal / Collateral (placeholder codes); empty when not given

adultInfo[] .employer, .isDfcsStaff, .stationedAt

the adult’s employer, the "DFCS Staff" flag, and where an active-duty adult is stationed

chindInfo[] .designation, .isInFosterCare, .fosterCareProviderName

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 isInfosterCare / fosterCareName are unchanged

chindInfo[].address (value change)

an apartment / unit, when given, is composed after the street: street, apt, city, state, zip

triageInfo { triageNeeded, triageResponseTime }

always emitted. triageResponseTime is IMM/24 / 5 DAY / SOR/SO (placeholder codes), required at the CRAIG edge when triage is needed

notificationInfo { countyContactName, countyNotified, notificationDateTime, notificationNotes, notificationMethod, countyContactAssigned, cisJustification, supervisorJustification }

always emitted. countyNotified is a SHINES "County" list label, notificationDateTime an RFC 3339 UTC date-time, notificationMethod Phone / Email

additionalInfo { previousTruancy, previousTruancyDescription, digitalPaymentPlatforms, digitalPaymentDetails, hasRecentPhotos, canEmailPhotos, childFatalityOrSeriousInjury }

always emitted. previousTruancy, digitalPaymentPlatforms, hasRecentPhotos are Y / N / U; canEmailPhotos, childFatalityOrSeriousInjury are Y / N; the two descriptions are free text

screeningInfo { enteringIntoShines, isAbuseNeglectReport, victimIsMinor, previouslyReportedThis, callerIsLawEnforcement, immediateAssistanceNeeded, mandatedReporterDisclosure }

always emitted. enteringIntoShines is Y when the agent enters the intake into SHINES by hand and N when a downstream bot is to; mandatedReporterDisclosure is Accepted / Declined. CRAIG records these answers and does not act on them

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.

Edit this page · latest