Skip to main content
These routes let backend jobs and services create insured records and look up existing insureds for matching and reconciliation.
Scope: paths, request format, and concise examples.

Endpoints

  • POST /api/companies/{company_id}/insureds
  • POST /api/companies/{company_id}/insureds/options

Authentication and headers

Authorization: ApiKey <YOUR_API_KEY>
Content-Type: application/json
Accept: application/json

Create an insured

Creates a new insured record for a company.

Request body

{
  "name": "Acme Manufacturing GmbH",
  "entityType": "dealership",
  "externalId": "ACME-001"
}
  • name: required.
  • entityType: optional classifier (for example, “dealership”).
  • externalId: optional upstream reference.

Example (curl)

curl -X POST "$BASE_URL/api/companies/$COMPANY_ID/insureds"   -H "Authorization: ApiKey $API_KEY"   -H "Content-Type: application/json"   -d '{
    "name": "Acme Manufacturing GmbH",
    "entityType": "dealership",
    "externalId": "ACME-001"
  }'

Typical response (shape)

{
  "id": "ins_9c8f2a",
  "name": "Acme Manufacturing GmbH",
  "entityType": "dealership",
  "createdAt": "2025-01-12T10:45:00Z"
}

Search insureds (options)

Purpose: fetch a lightweight list of existing insureds (id + name) so backend workflows can check if an incoming name already exists before creating a new record. A common case is reconciling names from loss‑run sheets. This endpoint supports prefix search and server‑side paging using an exclusion list of ids.

Request body

{
  "filterText": "acm",
  "excludeIds": ["ins_123", "ins_456"],
  "entityType": "dealership"
}
  • filterText: prefix to match on name. Use "" to retrieve a top set.
  • excludeIds: ids already retrieved; the server returns the next unseen batch.
  • entityType: optional filter.

Example (curl)

curl -X POST "$BASE_URL/api/companies/$COMPANY_ID/insureds/options"   -H "Authorization: ApiKey $API_KEY"   -H "Content-Type: application/json"   -d '{
    "filterText": "acm",
    "excludeIds": [],
    "entityType": "dealership"
  }'

Typical response (shape)

[
  { "id": "ins_9c8f2a", "name": "Acme Manufacturing GmbH" },
  { "id": "ins_b71e30", "name": "Acme Motors Ltd." }
]

Parameters

  • company_id is a required path parameter on both endpoints.