Support configuration
Support configuration is the ruleset that says, for each of a provider's product codes, which support documents are required. It's what seeds the PENDING document placeholders on a pre-appointment: when a charge references a provider_product_code that has required supports configured, those placeholders appear automatically.
In the pilot there is no admin UI for this — the configuration is loaded in bulk from a CSV.
What the support configuration decides — and what it doesn't
The support configuration only says which documents are required for each product code. Whether an uploaded document is then validated by AI depends on two further configurations that OSIGU sets up for your provider. If either is missing nothing fails: the document simply ends with the NOT_APPLICABLE AI validation status.
| Missing configuration | What happens |
|---|---|
| Document-type catalog (which document types go through AI validation) | The document is accepted and set to NOT_APPLICABLE right away. |
| AI validation rule | The document is sent for validation, finds no rule and comes back as NOT_APPLICABLE. |
Ask OSIGU to confirm both are in place before relying on AI validation.
Asynchronous CSV upload
POST /v1/checkin/support-configs/upload
Content-Type: multipart/form-data (part: file, text/csv)
The upload is validated synchronously, then processed asynchronously:
- The provider is resolved from the authenticated token — never from the request or the CSV content.
- The file is validated up front: correct MIME type (
text/csv) and the required header columns. A failure returns400with no side effect — nothing is stored, nothing is queued. - On success the CSV is stored in S3, a
SupportConfigUploadProcessis persisted with statusPENDING, and a message is published to pre-attendance-worker for background parsing / validation / upsert. - The endpoint returns
202 Acceptedwith aprocess_id. Keep the CSV under 10 MB: larger files are rejected during processing (the process ends asFAILED).
CSV format
The header must contain these five columns. Their order doesn't matter, matching ignores case and surrounding spaces, and extra columns are ignored.
| Column | Required | What it holds |
|---|---|---|
product_code | yes | Product / procedure code (up to 100 characters). |
product_name | yes | Readable name (up to 255). It must be identical on every row of the same product_code. |
service_codes | yes (the value can be empty) | ALL or empty = applies to every service. Otherwise a list separated by /. |
agreement_codes | yes (the value can be empty) | ALL or empty = applies to every agreement. Otherwise a list of agreement codes (not names) separated by /. |
documents | yes, at least one | Document codes separated by /. A leading ? marks the document as optional. |
Check before uploading:
- Fields missing at the end of a row are read as empty values. If the missing ones are
service_codesoragreement_codes(whendocumentscomes before them in your header), the scope widens to every service and agreement; ifdocumentsis missing, the row is rejected. Make sure every row has all five fields. - Document codes are not validated against the document-type catalog. A typo is saved as is and only shows up when the pre-appointment checklist doesn't ask for the document.
- The CSV can't express substitute documents ("A or B"): each code is required or optional on its own.
Tracking the process
GET /v1/checkin/support-configs/process/{processId}
Returns the current status and metrics of the process. The response always includes errors_file_url — a presigned download URL for the validation-errors CSV, or null when there were no row-level errors. Only the process owned by the authenticated provider is visible; another provider's process returns 404.
To download the errors CSV directly (as a text/csv attachment):
GET /v1/checkin/support-configs/process/{processId}/errors
Because parsing is per-row, a process can partially succeed: valid rows are upserted while invalid rows are collected into the errors CSV. Each product's configuration is replaced as a whole by the rows you send, so when you fix rejected rows, re-upload every row of that product. Always check errors_file_url after the process finishes. A COMPLETED status doesn't mean every row was applied: also check failed_registrations.
Endpoints
| Operation | Endpoint |
|---|---|
| Upload CSV | POST /v1/checkin/support-configs/upload |
| Get process status | GET /v1/checkin/support-configs/process/{processId} |
| Download errors CSV | GET /v1/checkin/support-configs/process/{processId}/errors |
For a step-by-step walk-through see Upload a support-config CSV.
Common pitfalls
- Wrong MIME type. The part must be
text/csv. Exporting from a spreadsheet as.xlsxwon't work. - Missing header columns →
400, before anything is stored. Fix the header and re-upload. - Not polling for row errors. A
202means accepted, not fully applied. Poll the process and download the errors CSV to see which rows were rejected. - Reading another provider's process →
404. Processes are provider-scoped.