Upload documents to an application

Manually uploads one or more documents (e.g. bank statements) to an application. Uploading with documentCategory=BANK_STATEMENTS submits the files for automated statement processing and triggers asynchronous report generation. There is no webhook — poll GET /v1/subscriber/applications/{applicationId} until its transaction summary populates. Other categories are stored only. Requires a JWT bearer token.

Path Parameters
  • applicationId
    Type: string
    required

    ID of the application to upload documents to.

Headers
  • x-crm-platform
    Type: string
    required

    The external CRM platform name.

Body
required
application/json
Responses
  • application/json
  • 400

    Bad Request - no files, or none uploaded successfully

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

Request Example for post/v1/subscriber/applications/{applicationId}/documents
curl 'https://api.broker.v1.demo.affordx.nz/v1/subscriber/applications/{applicationId}/documents' \
  --request POST \
  --header 'x-crm-platform: Monday' \
  --header 'Content-Type: multipart/form-data' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --form 'files=' \
  --form 'documentCategory=BANK_STATEMENTS' \
  --form 'description='
{
  "applicationId": "string",
  "documentCategory": "BANK_STATEMENTS",
  "totalUploaded": 1,
  "statementProcessingTriggered": true,
  "documents": [
    {
      "fileId": "string",
      "fileName": "string",
      "fileType": "string",
      "fileSize": 1,
      "status": "string",
      "documentCategory": "string",
      "downloadUrl": "https://example.com",
      "processingReference": "string"
    }
  ],
  "errors": [
    "string"
  ]
}