POLICY_DOC_GENERATED
This event is fired after a policy document generation process completes successfully.
When and what fires this event?
If this event is defined on a product, and it has actions that are enabled:
- 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 '{
"lineId": "<UUID of the product>",
"type": "POLICY_DOC_GENERATED",
"payload": {
"clientId": "<UUID of the client>",
"policyId": "<UUID of the policy>",
"documents": [
{
"name": "PolicyDeclarations.pdf",
"extension": "pdf",
"contentId": "<CMS-CONTENT-ID>",
"url": "https://public.cdn/<...>"
},
{
"name": "CertificateOfInsurance.pdf",
"extension": "pdf",
"contentId": "<CMS-CONTENT-ID>",
"url": null
}
]
}
}'
{
"lineId": "262e67be-c08c-43c0-bb51-06fe4408b4e9",
"type": "POLICY_DOC_GENERATED",
"payload": {
"clientId": "220c4020-7f20-4a16-ba51-d0945804dd83",
"policyId": "b31e1d1e-31e0-4d9a-9a86-7f9d0a1a2b33",
"documents": [
{
"name": "PolicyDeclarations.pdf",
"extension": "pdf",
"contentId": "CMS-12345",
"url": "https://public.cdn/documents/policy/12345"
}
]
}
}
Request fields
| Property | Required | Description |
|---|---|---|
lineId | true | UUID for the product. |
type | true | Must be POLICY_DOC_GENERATED. |
payload | true | See below. |
Payload fields
| Property | Required | Description |
|---|---|---|
policyId | true | The target policy for which documents were generated. |
clientId | true | The client associated with the policy. |
documents[] | true | List of document objects that were generated. |
documents[].name | true | File name of the generated document. |
documents[].extension | true | File extension (e.g., pdf, docx). |
documents[].contentId | true | Identifier of the document stored in CMS. |
documents[].url | false | Public or internal URL to the stored file. |
Response json
A standard trigger response is returned.
{
"triggerRequestId": "<UUID>",
"executedActionCount": 0,
"expectedResponseCount": 0,
"metadata": {
"POLICY_DOC_GENERATED": {
"policyId": "b31e1d1e-31e0-4d9a-9a86-7f9d0a1a2b33",
"clientId": "220c4020-7f20-4a16-ba51-d0945804dd83",
"documents": [
{
"name": "PolicyDeclarations.pdf",
"extension": "pdf",
"contentId": "CMS-12345",
"url": "https://public.cdn/documents/policy/12345"
}
]
}
}
}
Response fields
| Property | Required | Description |
|---|---|---|
triggerRequestId | true | UUID that identifies the execution of the trigger. |
executedActionCount | true | Number of workflow actions executed for this trigger. |
expectedResponseCount | true | Number of responses expected from executed actions. |
metadata | true | Contains dynamically generated data from payment setup actions. |