Skip to main content
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 a 400 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 of agencyName, 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 an idempotency-key header, duplicate requests within 1 hour return the original response without reprocessing. See Idempotency.

Multi-Transaction Policies

Multiple rows sharing the same policyNumber 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

idempotency-key
string

UUID to ensure idempotent request processing

Example:

"550e8400-e29b-41d4-a716-446655440000"

x-idempotency-key
string

Alternative UUID header for idempotent request processing

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

multipart/form-data
file
file
required

Response

File upload initiated - returns uploadId for polling status

data
object
required
requestId
string
required

Unique request identifier

Example:

"dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8"

timestamp
string
required

Response timestamp

Example:

"2025-11-12T20:49:03.293Z"