Skip to content

POLICY_CANCELED

This event is fired when a policy is canceled in the system.
It indicates that the policy is no longer active and that related processes, such as notifications or document generation, should be triggered.

When and what fires this event?

This event is typically fired automatically by the platform when a policy cancellation is confirmed.
It may also be triggered by backoffice processes or via automation workflows that handle policy termination events.

  • Copilot: fires when an administrator cancels a policy manually;
  • API: can fire this event externally on demand.

Request payload

POST: https://api.{ENV}.dais.com/ioi/v3/event/fire

curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/event/fire' \
--header 'Authorization: Basic <yourAuthHere>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "POLICY_CANCELED",
  "payload": {
    "policyId": "<UUID>",
    "clientId": "<UUID, optional>",
    "documents": [],
    "event": {
      "eventId": "<UUID>",
      "type": "POLICY_CANCELED",
      "label": "<string>",
      "description": "<string>"
    },
    "policy": {
      "id": "<UUID>",
      "policyNumber": "<string>"
    }
    
  }
}'
{
  "type": "POLICY_CANCELED",
  "payload": {
    "policyId": "abf2e01a-5c38-4d13-9bb2-bc88a0a8348e",
    "clientId": "c07a0db0-0667-46b1-ad8b-d1a19829f03e",
    "documents": [],
    "event": {
      "eventId": "e1f2a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
      "type": "POLICY_CANCELED",
      "label": "Policy Cancellation",
      "description": "Policy has been cancelled"
    },
    "policy": {
      "id": "abf2e01a-5c38-4d13-9bb2-bc88a0a8348e",
      "policyNumber": "POL-2024-001"
    }
  }
}

Request fields

PropertyRequiredDescription
typetrueMust be POLICY_CANCELED
payloadtrueSee below

Payload fields

PropertyRequiredDescription
policyIdtrueUUID of the policy.
clientIdfalseUUID of the client associated with the policy.
documentsfalseList of documents related to the event.
eventfalseContaining event details.
policyfalseContaining policy information.

Event object fields

PropertyRequiredDescription
eventIdfalseUUID of the event.
typefalseType of the event (POLICY_CANCELED).
labelfalseLabel for the event.
descriptionfalseDescription of the event.

Policy object fields

PropertyRequiredDescription
idfalseUUID of the policy.
policyNumberfalsePolicy number.

Response json

{
  "triggerRequestId": "386861af-6875-49b2-b38c-c435263039be",
  "executedActionCount": 0,
  "expectedResponseCount": 0,
  "metadata": {}
}

Response fields

PropertyRequiredDescription
triggerRequestIdtrueUUID that uniquely identifies the trigger execution instance.
executedActionCounttrueNumber of actions executed during this trigger run.
expectedResponseCounttrueNumber of responses expected from the executed actions.
metadatatrueContains dynamically generated data from executed workflow actions.