Add a policy

Create a policy on the report. policy_type and policy_status are required.

Coverages may be nested in the request body, together with their own limits, deductibles and premiums, and are created with the policy in the order they appear. Premiums may be nested at the policy level too, and are attached to the policy itself rather than to any of its coverages.

The request is validated in full before anything is written, so a body naming an unknown coverage — or omitting a field something in it cannot be created without — creates nothing at all. If a coverage still cannot be created after that, the policy is removed again, so a failed request leaves nothing behind.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
length ≥ 1

Identifies the report: either its Kalepa report ID (the id returned when the report is created) or the external_id you set on the report (on create, or later via PATCH). The value is auto-detected by shape — a UUID-shaped value (for example a dashed UUID or 32 hexadecimal characters; brace-wrapped and urn:uuid: forms count too) is treated as the Kalepa report ID, anything else as your external_id. Use the id_type query parameter to force the interpretation, and org_group / sub_org_group to narrow an external_id that is reused across groups. Deleted reports are never matched. When the same external_id is on several reports, archived reports are ignored if at least one non-archived report matches; if more than one report still matches, the request fails with 400 and error code AMBIGUOUS_IDENTIFIER (in the response body at detail.code). An external_id lookup searches only the reports available to your API client; anything else answers 404. URL-encode reserved characters (e.g. a space as %20). Two values cannot be used in this path segment: an external_id containing a forward slash (/), and the exact value extract when calling GET /external/reports/{report_id} (that path is a different endpoint). For those, look up the Kalepa report ID with GET /external/report_id and use that instead.

Query Params
string
enum

Overrides how the report_id path value is interpreted: uuid (the Kalepa report ID) or external_id (your own identifier). Omit for auto-detect (a UUID-shaped value is treated as uuid, otherwise as external_id). Set external_id when your identifier is itself UUID-shaped (for example a dashed UUID or 32 hexadecimal characters) and would otherwise be read as a Kalepa report ID. With id_type=uuid, a path value that is not a valid UUID returns 400; any id_type value other than uuid or external_id also returns 400.

Allowed:
string

Used only when the report is targeted by external_id: exact match on the report's org_group. Pass an empty value (?org_group=) to match reports that have no org_group. Omit the parameter to skip the filter.

string

Used only when the report is targeted by external_id: exact match on the report's sub_org_group. Pass an empty value (?sub_org_group=) to match reports that have no sub_org_group. Omit the parameter to skip the filter.

Body Params

One policy on a report. A report normally carries several: what was requested, what each market quoted, what was bound, and the expiring programme.

string | null

What this policy represents. For example: Requested, Underlying, Prior, Competitor. Further values may be added over time.

string | null

Where the policy stands. For example: In Progress, Quoted, Bound, Declined, Lost, Expiring. Further values may be added over time.

string | null
date | null
date | null
string | null

For example: New, Renewal, Endorsement, Policy Change, Cancellation. Further values may be added over time.

string | null

The carrier by name. Kalepa matches it to a carrier record for you, so no carrier identifier is ever sent or returned.

string | null
string | null
number | null

The full amount of the shared layer, not this policy's individual carrier participation. Omit the field on update to leave it unchanged; send an explicit null to clear it.

coverages
array of objects | null

Accepted when creating a policy and returned on reads. Not accepted when updating a policy — use the coverage endpoints.

coverages
premiums
array of objects | null

Premiums recorded against the policy as a whole rather than one of its coverages. Returned on reads only; not accepted when creating or updating a policy.

premiums
Responses

400

The request is invalid, for example id_type=uuid with a path value that is not a valid UUID, or an id_type other than uuid / external_id.

401

The bearer token is missing or invalid.

403

The authenticated client is not permitted to access this resource (e.g. insufficient permissions or org-group scope).

404

The specified report was not found.

422

The request could not be applied, and nothing was created. Either a field the resource cannot be created without was omitted, or the coverage_name is not one enabled for your organization, or that coverage does not allow the coverage_type requested. The response names the field or the coverage.

Every field in these schemas is nullable, so that fields can be added over time without breaking your generated client — which means the schema itself cannot mark anything required. Each endpoint's description states what it needs in order to create.

Also returned when report_id, read as your external_id, matches more than one report (error code AMBIGUOUS_IDENTIFIER, in the response body at detail.code). Narrow with org_group / sub_org_group, or target the report by its Kalepa report ID.

500

An unexpected error occurred.

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json