Policy

List Policies

GET /v1/policies

URL Parameters
ParameterDescription
rowsA limit of objects to be returned, between 1 and 100 itemsOptional
pageThe page for the list of objects to returnOptional
cursorThe cursor of the current page list of objectsOptional
Response

The above request returns JSON structured like this:

ParameterDescription
totalThe total of items
items.idThe ID of the policy
{
  "total": 0,
  "items": [
    {
      "id": "string"
    }
  ]
}

Cancel Policy

DELETE /v1/policies/{policy_id}

URL Parameters
ParameterDescription
policy_idThe ID of policy to cancel
Body Parameters

The request has the following parameters in body:

ParameterDescription
cancel_reasonThe cancel reason of the policyRequired
cancel_descriptionThe cancel description of the policyOptional
reversal_methodThe reversal methodOptional
reversal_bank_accountThe reversal bank accountOptional
The cancel reason can be:
ReasonName
1Policyholder requested
2Default
3Claimed
4Insurer request
The reversal method can be:
One Of
CreditCard, WireTransfer, Pix
{
  "cancel_reason": 0,
  "cancel_description": "string",
  "reversal_method": "string",
  "reversal_bank_account": {}
}
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the Policy
statusThe status canceled for the Policy
date_endThe date policy was canceled
{
  "id": "string",
  "status": 0,
  "date_end": "string"
}