Routes

SE · Cancellations API · 2021-01-01

Initiate insurance cancellations

POSThttps://api.anessa.co/cancellations

Initiate insurance cancellations for a specific collection. Calling this creates a cancellation power of attorney. What happens next depends on documentType: - SCRIVE (default): the power of attorney is sent to the insurance holder for signing through Scrive, using deliveryMethod and authenticationMethod. - MANUAL: the power of attorney is created but not sent anywhere. Fetch the unsigned PDF via GET /cancellations/{documentId}/pdf, have it signed outside the platform, and report the outcome via POST /cancellations/{documentId}/status.

Request

Request Body

authenticationMethodstring

The authentication method used by the insurance holder to sign the power of attorney. Also used for viewing document if not specified separately. Required for SCRIVE cancellations, not used for MANUAL cancellations.

Possible Enum values are BANK_ID or STANDARD.
authorEmailEmailrequired

The email address of the cancellation author.

collectionIdstringrequired

The id of the collection in which the insurances were fetched.

deliveryMethodstring

The method used by Scrive to deliver the power of attorney to the insurance holder. Required for SCRIVE cancellations, not used for MANUAL cancellations.

Possible Enum values are EMAIL, SMS or API.
documentTypestring

The type of cancellation. Defaults to SCRIVE, where the power of attorney is sent to the insurance holder for signing through Scrive. With MANUAL, the power of attorney is created but not sent: fetch the unsigned PDF via GET /cancellations/{documentId}/pdf, have it signed outside the platform, and report the outcome via POST /cancellations/{documentId}/status. deliveryMethod and the other Scrive fields are not used for MANUAL.

Possible Enum values are SCRIVE or MANUAL.
emailEmail

The email address of the insurance holder. Only required if deliveryMethod is EMAIL. Not used for MANUAL cancellations.

insuranceHolderNamestring

Optionally supply the insurance holder full name to use for the cancellation.

insurancesArray<CancellationRequest>required

The insurances to create cancellations for.

personalNumberstring

Optionally assign personal number unless present on collected insurance.

phoneNumberPhoneNumber

The phone number of the insurance holder. Only required if deliveryMethod is SMS. Not used for MANUAL cancellations.

rejectedRedirectUrlstring

Scrive redirects the insurance holder here if they reject the document. Not used for MANUAL cancellations.

signSuccessRedirectUrlstring

Scrive redirects the insurance holder here after signing the document. Not used for MANUAL cancellations.

Tags added to the Scrive document. Not used for MANUAL cancellations.

viewAuthenticationMethodstring

The authentication method used by the insurance holder to view the power of attorney. Default value is same as authenticationMethod. Not used for MANUAL cancellations.

Possible Enum values are BANK_ID or STANDARD.

Responses

Cancellations of insurances successfully initiated.

Body

cancelledInsurancesArray<CancellationResponse>

A list of the insurance information for the processed cancellations.

cURL
curl https://api.anessa.co/cancellations \
  -H "Api-Version: 2021-01-01" \
  -H "Content-Type: application/json" \
  -d '{
  "authenticationMethod": "BANK_ID",
  "authorEmail": {
    "value": "insurance.admin@anessa.co"
  },
  "collectionId": "08a7c9b2-77a0-462f-907d-461a94158872",
  "deliveryMethod": "SMS",
  "documentType": "SCRIVE",
  "email": {
    "value": "insurance.admin@anessa.co"
  },
  "insuranceHolderName": "Astrid Svensson",
  "insurances": [
    {
      "externalId": "0462c48b-ecd3-48fb-8438-6c0c6f840021",
      "newInsuranceNumber": "ABC12345",
      "terminationDate": "2022-12-03"
    }
  ],
  "personalNumber": "198312151234",
  "phoneNumber": {
    "countryCode": "SE",
    "number": 701234567
  },
  "rejectedRedirectUrl": "https://www.your-site.com/customer-rejected-document",
  "signSuccessRedirectUrl": "https://www.your-site.com/customer-signed-document",
  "tags": [
    {
      "name": "source",
      "value": "Anessa"
    }
  ],
  "viewAuthenticationMethod": "BANK_ID"
}' \
  -X POST