REFERENCE · CONSUMERS AND REQUIREMENT SETS
POST /v1/consumers/{consumer_ref}/requirement-sets
Create a version. Under one of the consumer's requirement sets, named by key (0015; default default). JSON body with rules, or an SOP to parse into a draft with per-rule parse_confidence: source_text (JSON or multipart) or a multipart source_document (PDF/DOCX). Optional publish: true with applies_to to publish immediately (rules only; a parsed draft is published after review).
PARAMETERS
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| consumer_ref | string | yes | |
| Idempotency-Key | string | no | Optional, and the preferred way to make a retry safe. Send one on every POST and PUT; a replay returns the original response with idempotent_replay true and creates nothing new. POST /documents also accepts an idempotency_key form field as an alias; the header wins when both are sent |
| key | string | no | Optional; the requirement set (lineage) to add this version to. Lowercase letters, digits, - or _, up to 64 characters. Default default; a key not seen before starts a new requirement set for this consumer |
| rules | object[] | no | |
| source_text | string | no | The SOP or requirements as plain text (up to 200,000 characters). Parsed into a draft with per-rule parse_confidence and an ambiguities list. Cannot be combined with rules or publish. |
| review_states | string[] | no | 4.5.1; default ["OH","ND","WA","WY"] |
| applies_to | enum | no | Used only when publish is true |
| publish | boolean | no | true to publish immediately (JSON only); requires applies_to |
RESPONSE
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
| consumer_ref | string | |
| key | string | The requirement set (lineage) this version belongs to. Default default. At most one version per key may be published at a time |
| version | integer | |
| status | enum | draft, published, superseded. |
| applies_to | enum | new (engagements opened from now on) or all_active (every active engagement for the consumer) One of: new, all_active. |
| effective_on | string | |
| reverification_cadence | enum | Set-level default; overridable per rule (Rule.reverification_cadence) and per engagement |
| expiry_lead_days | integer | Set-level default; overridable per rule (Rule.expiry_lead_days) and per engagement |
| review_states | string[] | 4.5.1: an alternative satisfied by occupational accident for an insured in one of these states still passes, flagged state_review_required |
| rules | object[] | Compiled rules, included when fetching one version |
Errors: 400, 401, 403, 404, 409, 415, 422, 429, 500. Every error body carries error.code, error.message, and error.request_id.