Skip to content

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

PropertyRequiredDescription
lineIdtrueUUID for the product.
typetrueMust be UPLOAD_POLICY_DOCUMENTS.
payloadtrueSee below.

Payload fields

PropertyRequiredDescription
clientIdtrueClient identifier carried through to the follow-up event.
policyIdtruePolicy to which the documents will be attached and where the DOCUMENT_UPLOADED event will be created.
descriptionfalseOptional description stored on the created PolicyEvent.
documents[]trueArray 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

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