How to store document metadata

Storing document metadata in DocuWare requires two configuration steps in the REST API destination of the document workflow. First, the Delivery request must be configured to capture the document ID returned by DocuWare after upload. Then, a second request is added to send the metadata fields to DocuWare using that captured ID.

1. Add a Response Parameter to the Delivery Request

The DocuWare upload response contains the ID of the newly created document. This ID must be captured so it can be referenced by the metadata request that follows.

  1. Open the OptimiDoc Cloud Admin Portal and navigate to Document Workflows.

  2. Open the relevant document workflow and switch to the Destinations tab. In the Requests area, select the Delivery tab.

    • In the Response parameters table, add a new row with the following values:

      • Keydocid

      • ValueFields[0].Item

image-20260616-074644.png

The Fields[0].Item selector extracts the document ID from the JSON response returned by the DocuWare upload API. Once parsed, the value is stored as docid and is available to all subsequent requests in the sequence.

2. Add a Request to Store Document Metadata

  1. In the Requests area, click Add request to create a new request tab.

  2. Drag the new tab to position it after the Delivery tab.

  3. Configure the request as follows:
    Request URL

         https://[customer_subdomain].DocuWare.cloud/DocuWare/Platform/FileCabinets/[cab]/Documents/[docid]/Fields
    
     - [customer_subdomain] — Use the correct DocuWare domain for your company account.
     - [cab] — Dynamically populated with the Cabinet ID selected in the workflow.
     - [docid] — Populated with the document ID captured in Step 1.
    
    1. Request methodPUT

    2. Request body typeJSON

    3. JSON body sourceJSON editor

    4. In the JSON body template, enter the metadata fields to be stored. The structure must follow the DocuWare field format. Example:

    json

       {
         "Field": [
           {
             "FieldName": "DOCUMENT_TYPE",
             "Item": "[document_type]"
           },
           {
             "FieldName": "COMPANY",
             "Item": "[company]"
           }
         ]
       }
    

    Replace DOCUMENT_TYPE and COMPANY with the actual DocuWare field names defined in your cabinet. Use [parameter_key] placeholders to reference values from the document workflow.

    1. In the Request parameters table, add the following headers:

      • First

        • KeyAccept

        • Valueapplication/json

        • TypeCustom parameter

        • LocationRequest header

      • Second

        • KeyContent-Type

        • Valueapplication/json

        • TypeCustom parameter

        • LocationRequest header

image-20260616-075754.png

Save the Workflow.

Note: The DocuWare API specification for updating document fields is available in the REST API | DocuWare SDK Documentation.