cURL
Policy Ingestion
Upload Policy File
Upload a CSV or Excel file for asynchronous policy ingestion
POST
cURL
Upload a policy data file for asynchronous processing. The file headers are validated synchronously. If validation passes, the file is uploaded to storage and a worker job is queued for ingestion. Returns an
uploadId that you can poll via Get Upload Status.
Workflow
1
Upload your file
Send a
POST /v2/upstream/policies/upload request with your CSV or Excel file as multipart/form-data. The response includes an uploadId with status QUEUED.2
Poll for status
Call
GET /v2/upstream/policies/uploads/{uploadId} every 3-5 seconds. The status will move from QUEUED to PROCESSING as a worker picks up the file.3
Handle the result
Stop polling once the status reaches a terminal state:
COMPLETED, COMPLETED_WITH_FAILURES, or FAILED. Check the errors array for any row-level failures. Once complete, retrieve your policies via List Policies or Get Policy.File Requirements
Column Headers
Column headers in your file must exactly match the supported field names listed below. Unrecognized headers are rejected immediately with a400 response.
Required Columns
These columns must be present in every upload:Agency Identifier (at least one required)
At least one of these columns must be present for entity matching:Optional Columns
Success Response
All successful responses are wrapped in the standard response envelope. See Request/Response Conventions.
Error Scenarios
Unsupported File Format (400)
Returned when the file is not CSV or XLSX.Unsupported Column Headers (400)
Returned when any column header doesn’t match a supported field name.Missing Required Columns (400)
Returned when one or more required columns are absent.Missing Agency Identifier (400)
Returned when none ofagencyName, agencyNpn, or agencyFein columns are present.
No File Uploaded (400)
File Too Large (413)
Files exceeding 10 MB are rejected by the server before reaching the handler.Unauthorized (401)
Missing or invalid authentication token. See Authentication.Idempotency
This endpoint supports idempotency. If you include anidempotency-key header, duplicate requests within 1 hour return the original response without reprocessing. See Idempotency.
Multi-Transaction Policies
Multiple rows sharing the samepolicyNumber are grouped into a single policy with multiple transactions. For example, a CSV with:
Creates 1 policy with 3 transactions. The policy’s
currentStatus is automatically resolved from its transaction history.Headers
UUID to ensure idempotent request processing
Example:
"550e8400-e29b-41d4-a716-446655440000"
Alternative UUID header for idempotent request processing
Example:
"550e8400-e29b-41d4-a716-446655440000"
Body
multipart/form-data