Reporter icon

Reporter

Interact with Reporter API

Actions120

Document → Upload a document

AI-generated

Summary

Upload a document file associated with a specified model type and section using binary data from a workflow node.

Inputs

  • Documentable type (required) — Select the model type the document belongs to, e.g., Finding or Assessment.
  • Section (required) — Specify the section of the associated model where the document will belong; must be a valid section value as per the API documentation.
  • Binary Property (required) — Name of the binary property containing the file data to upload (e.g., 'data').
  • Additional Fields — Optional fields including documentable id (ID of the associated model, must be alphanumeric), caption (image caption or document title used in markdown, not stored in the database), and language id (for translations when applicable).

Output shape

a single JSON object containing details of the uploaded document as returned by the API.

The operation performs a multipart/form-data upload using the binary file data from the specified property. Additional optional parameters can further specify metadata for the document. The response includes the created document's data in JSON format.

Examples

Example 1: Upload a PDF document to the 'description' section of a Finding model with an optional caption.

  • Set Documentable type to 'Finding'.
  • Enter 'description' for Section.
  • Choose the binary property holding the PDF file data.
  • Optionally provide Documentable id and Caption in Additional Fields.

Links

Discussion