Cancel policy
Cancels a single policy; the other policies of the same order are not affected. To cancel all policies of an order at once, use the order cancellation on an emitted order.
The cancellation takes effect at the moment of the call: the response already shows the policy as canceled, charging of the following installments stops, and the policy cancelled webhook is sent. Communication with the insurer happens afterwards, asynchronously, and does not undo the cancellation.
Premium refund
The refund, when due, is computed over what has been paid, as of the moment of the request:
| Moment of cancellation | Refund |
|---|---|
| Within 7 calendar days of contracting — cooling-off right | Full refund of what was paid. |
| After 7 days | Proportional: the part of what was paid that exceeds the coverage period already elapsed. |
Request
ENDPOINT
/v1/insurance/policies/{policy_key}/cancelMETHOD
POSTPath params
| Parameter | Type | Requirement | Description |
|---|---|---|---|
policy_key | string | required | The policy key. |
Request Body
{
"reason": "Cliente solicitou o cancelamento"
}
| Field | Type | Requirement | Description |
|---|---|---|---|
reason | string | optional | Cancellation reason, 1 to 255 characters, recorded in the event trail and sent in the cancellation webhook. Without a reason, requester_requested is recorded. The whole body is optional. |
Response
STATUS
200Response Body
{
"policy_key": "0b6e7c1a-9a4e-4c1e-b1d4-2f5a8c9e0d31",
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"status": "canceled"
}
Behaviour by status
| Current policy status | Result |
|---|---|
active | 200 — the policy is cancelled. |
active, with the term already over | 409 POL000011 — the coverage has already ended. |
canceled | 409 POL000012 — the policy is already cancelled. |
finished | 409 POL000011 — the term has already ended. |
| another integration / nonexistent | 404 POL000001 |
Errors
Every error (non-2xx) returns the standard body { "title", "description", "translation", "code" } — handle only the code field programmatically.
| Status | Code | Description |
|---|---|---|
401 / 403 | — | Authentication or authorization failure. |
404 | POL000001 | Policy does not exist or belongs to another integration. |
409 | POL000011 | The coverage term has already ended. |
409 | POL000012 | The policy has already been cancelled. |