Cancellation API

Before getting started, Scrive has to be in place:

  • Scrive API key has to be sent to Insurely and added to your account configuration
  • Cancellation PDF template with correct parameterization has to be sent to Insurely

The Cancellation API along with insurance collection module makes it possible to collect power of attorney for insurance cancellations.

Order of operation

  1. Insurance collection has already been performed - please see separate documentation
  1. Create cancellations - POST /cancellations - Power of attorney documents for the insurance cancellations are sent to the insurance holder for digital signature by Scrive - either by e-mail or SMS. - Document IDs are returned
  1. Get current status of document signature - GET /cancellations/{documentId} - Status is CLOSED when signed
  1. When cancellation has been signed, PDF of signed cancellation can be retrieved and archvied - GET /cancellations/{documentId}/pdf

Authentication

To use the API you need to obtain an authentication token. This key is to be set in the header ´Authorization-token` for all requests. E-mail us at support@insurely.com and we'll provide the API key.

HeaderHeader Value
Authorization-tokenThe auth key supplied by Insurely

API Versioning

The API will default to the lowest running API version. If you want to use a newer version you must set the Insurely-Version header on your requests, with the date of the version that you intend to use. The API version that this document references is specified at the top of this page.

HeaderHeader Value
Insurely-VersionThe version of the API

Mutual TLS (mTLS)

Our APIs have support for mTLS. These are the steps needed to enable mTLS for your client.

Create two private keys and two Certificate Signing Requests (CSR), one for test and one for production, and send them to support@insurely.com. Insurely will sign and send the certificates back.

genrsa -out my_test_client.key 2048
openssl req -new -key my_test_client.key -out my_test_client.csr
openssl genrsa -out my_prod_client.key 2048
openssl req -new -key my_prod_client.key -out my_prod_client.csr

Verify your received certificates

curl --key my_test_client.key --cert my_test_client.pem  'https://mtls.api.test.insurely.com/health'
curl --key my_prod_client.key --cert my_prod_client.pem  'https://mtls.api.insurely.com/health'

You should get the same response for both requests:

{ "status": "healthy" }
  1. To enforce mTLS - prefix all urls with the mtls subdomain as shown in verification examples above.