Upload a support-config CSV
This guide covers loading the support configuration — the mapping of required documents per provider product code — through the asynchronous CSV upload.
Prerequisites
- Credentials enabled for support-config upload (the same permission lets you poll the process).
- A CSV file (
text/csv), under 10 MB, with the required header columns (see CSV format).
Prepare the CSV
One row per product code and scope. Example:
product_code,product_name,service_codes,agreement_codes,documents
PROC001,Consultation,ALL,ALL,MEDICAL_ORDER/?PRIOR_REPORT
PROC002,Imaging study,ALL,AGR2024001/AGR2024002,MEDICAL_ORDER
PROC001 requires MEDICAL_ORDER and accepts an optional PRIOR_REPORT for every service and agreement; PROC002 only applies to agreements AGR2024001 and AGR2024002. The document codes must exist in your provider's document-type catalog, which OSIGU configures: the upload does not check them (see Support configuration).
Step 1 — Upload the CSV
curl -X POST https://sandbox.osigu.com/pre-attendance-api/v1/checkin/support-configs/upload \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-F 'file=@support-config.csv;type=text/csv'
The provider is taken from your token, not from the file. The CSV is validated synchronously (MIME type and header columns) before anything is stored; if that fails you get 400 with no side effects.
On success you get 202 Accepted with a process_id:
{ "process_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301" }
Step 2 — Poll the process
curl https://sandbox.osigu.com/pre-attendance-api/v1/checkin/support-configs/process/$PROCESS_ID \
-H "Authorization: Bearer $ACCESS_TOKEN"
The response carries the current status and metrics, plus errors_file_url — a presigned link to a validation-errors CSV, or null if every row was valid. Poll until the process reaches a terminal status. COMPLETED doesn't mean every row was applied: also check failed_registrations.
Parsing is per-row: valid rows are upserted even if others fail. A finished process with a non-null errors_file_url means some rows were rejected — the valid ones still applied.
Step 3 — Download row errors (if any)
curl https://sandbox.osigu.com/pre-attendance-api/v1/checkin/support-configs/process/$PROCESS_ID/errors \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-o validation_errors.csv
Returns the errors as a text/csv attachment. Fix the flagged rows and re-upload all the rows of every affected product, not just the corrected ones. The upload is idempotent per product code and replaces that product's whole configuration, so re-sending only the fixed rows would remove the product's other rows.
What happens behind the scenes
Next steps
- Support configuration for the concept.
- Once configured, charges referencing those product codes get PENDING document placeholders automatically.