UPLOAD_POLICY_DOCUMENTS
This event uploads one or more policy documents to the CMS and records a policy event of type DOCUMENT_UPLOADED on the specified policy.
On success, it also emits an internal trigger POLICY_DOCUMENTS_UPLOADED with the uploaded document metadata for further processing.
When and what fires this event?
If this event is defined and actions are enabled:
- Copilot: fires when policy documents are uploaded;
- Storefront: fires when policy documents are uploaded;
- 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": "UPLOAD_POLICY_DOCUMENTS",
"payload": {
"clientId": "<UUID of the client>",
"policyId": "<UUID of the policy>",
"description": "Optional note for the upload",
"documents": [
{
"name": "Binder.pdf",
"extension": "pdf",
"mimeType": "application/pdf",
"base64EncodedFile": "data:application/pdf;base64,<BASE64_BYTES>"
},
{
"name": "COI.png",
"extension": "png",
"mimeType": "image/png",
"base64EncodedFile": "data:image/png;base64,<BASE64_BYTES>"
}
]
}
}'
{
"lineId": "262e67be-c08c-43c0-bb51-06fe4408b4e9",
"type": "UPLOAD_POLICY_DOCUMENTS",
"payload": {
"clientId": "220c4020-7f20-4a16-ba51-d0945804dd83",
"policyId": "b31e1d1e-31e0-4d9a-9a86-7f9d0a1a2b33",
"description": "Endorsement + COI uploaded",
"documents": [
{
"name": "Endorsement.pdf",
"extension": "pdf",
"mimeType": "application/pdf",
"base64EncodedFile": "data:application/pdf;base64,<BASE64_BYTES>"
}
]
}
}
Request fields
| Property | Required | Description |
|---|---|---|
lineId | true | UUID for the product. |
type | true | Must be UPLOAD_POLICY_DOCUMENTS. |
payload | true | See below. |
Payload fields
| Property | Required | Description |
|---|---|---|
clientId | true | Client identifier carried through to the follow-up event. |
policyId | true | Policy to which the documents will be attached and where the DOCUMENT_UPLOADED event will be created. |
description | false | Optional description stored on the created PolicyEvent. |
documents[] | true | Array of documents to upload (see below). Each item is processed and stored in CMS before creating the policy event. |
Response json
On success, the standard trigger response will include metadata with the policy event you requested to create:
{
"triggerRequestId": "<UUID>",
"executedActionCount": 1,
"expectedResponseCount": 1,
"metadata": {
"UPLOAD_POLICY_DOCUMENTS": {
"type": "DOCUMENT_UPLOADED",
"description": "Endorsement + COI uploaded",
"effectiveDate": "2025-10-28",
"documents": [
{
"name": "Endorsement.pdf",
"extension": "pdf",
"contentId": "<CMS-CONTENT-ID>",
"url": "https://public.cdn/<...>"
}
]
}
}
}
Response fields
| Property | Required | Description |
|---|---|---|
triggerRequestId | true | UUID that identifies the execution of the trigger. |
executedActionCount | true | Number of actions executed by this trigger. |
expectedResponseCount | true | Number of responses expected from the executed actions. |
metadata | true | Contains dynamically generated data from executed workflow actions. |