Skip to main content
Skip table of contents

Post Task

Task definition: execution of Dynamo application template (DAP) with parameters.

URI

POST: /v1/task

Success response

If the post response code is 202, it means that the post has been accepted for processing, but the processing has not been completed.

Post using DAP file from Salesforce

Salesforce integration using template parameter (Salesforce Content Document ID of DAP file).

The parameters can be defined using key value pairs within params object.

CODE
{ 
  "template": "contentDocumentID", 
  "params": {
    "id": "recordID"
  },
  "integration": { 
    "type": "Salesforce", 
    "sessionID": "sessionID", 
    "serverURL": "serverURL"
  }  
}

Post using embedded DAP

If a DAP is passed within the post request, a multi part request must be posted.

CODE
POST /v1/task HTTP/1.1
Host: dynamo-api.documill.com
Content-Type: multipart/form-data;boundary="boundary"

--boundary
Content-Disposition: form-data; name="template"; filename="example.dap"
Content-Type: application/octet-stream

-- binary data --
--boundary
Content-Disposition: form-data; name="data";
Content-Type: application/json

{
  "params": {
    "id": "recordID"
  },
  "integration": { 
    "type": "Salesforce", 
    "sessionID": "sessionID", 
    "serverURL": "serverURL"
  } 
}
--boundary--

Posting additional JSON part

It is possible to post additional parameters as separate JSON parts in the multipart request. JSON part’s Content-Disposition name value must specify the parameter name “param.paramName“.

CODE
--boundary
Content-Disposition: form-data; name="param.additionalData";
Content-Type: application/json

{
  "data1": "abc",
  "data2": {
    "data3": "xyz"
  }
}
--boundary--

Success Response

Response includes task id and informative message.

CODE
{ 
  "taskID": "t-223e5458ec7f9a57802e3e31deba48cb", 
  "message": "Success" 
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.