Error envelope
All error responses use a consistent JSON envelope:| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error code |
message | string | Human-readable description |
requestId | string | Idunox-generated request identifier |
correlationId | string | Echoes x-correlation-id when supplied |
details | object or array | Validation context (shape depends on code) |
Canonical body validation (VALIDATION_ERROR)
POST /v1/submissions returns VALIDATION_ERROR when the JSON does not match canonical_submission_v1. Details use Zod flatten format:
details.formErrors— top-level issuesdetails.fieldErrors— map of JSON paths to message arrays
- Map questionnaire into
subject.*(not legacymarkers.healthQuestionnaireMarkers) - Use structured
sourceMetadata.markerRangesobjects{ unit, lowerBound, upperBound }(not display strings) - Omit
currentFrequencyforsmoking.status: "former" - Align
familyHistory.*.aliveStatuswithcurrentAge/deathAge(only send the age that applies)
Blood panel validation (SUBMISSION_VALIDATION_ERROR)
When the 14-marker panel fails code/unit/bounds checks, the code may be SUBMISSION_VALIDATION_ERROR with details as an array:
Partner id mismatch (PARTNER_ID_MISMATCH)
403 when partnerId in the body does not match the authenticated credential UUID.
HTTP status codes
| Status | Meaning |
|---|---|
200 | Request succeeded |
202 | Submission accepted and queued |
204 | Success with no body (e.g. auth probe) |
400 | Bad request — validation failure |
401 | Missing or invalid API key |
403 | Forbidden — e.g. partnerId mismatch |
404 | Resource not found or different account |
409 | Idempotency conflict — same key, different body hash |
429 | Rate limit exceeded |
500 | Internal server error — include requestId / correlationId when contacting support |
Partner-safe notices
GET /v1/results may include notices[] on outcomes with informational messages. Notices are not errors. They never contain internal model codes or stack traces.
x-correlation-id
Include a uniquex-correlation-id on every POST. The platform binds it to logs and error responses. Provide it when reporting issues to partner@idunox.com.