Verify Policy (Async)
POST /api/v1/verify/async
Submits a verification job. Returns 202 immediately with a job_id. Poll GET /api/v1/jobs/{job_id} or supply a webhook_url for a callback.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
policy_number | string | ✓ | Policy number |
country | string | ✓ | UK, DE, or FR |
insurance_type | string | ✓ | motor, travel, or health |
provider | string | Insurer name | |
document | string | Base64-encoded PDF (max 14 MB). Enables OCR. | |
webhook_url | string | HTTPS URL for result callback |
Response (202)
| Field | Type | Description |
|---|---|---|
job_id | string | UUID — use with GET /api/v1/jobs/{job_id} |
status | string | Always pending |
poll_url | string | Convenience URL for polling |
Example
curl -X POST https://policynumbers.com/api/v1/verify/async \
-H "Authorization: Bearer pk_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"policy_number":"AXK12345678","country":"UK","insurance_type":"motor","webhook_url":"https://yourapp.com/webhooks/policy"}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66efa6",
"status": "pending",
"poll_url": "/api/v1/jobs/3fa85f64-5717-4562-b3fc-2c963f66efa6"
}