Post Task
Task definition: execution of Dynamo application template (DAP) with parameters.
URL
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 the params object.
{
"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 multipart request must be posted.
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“.
--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.
{
"taskID": "t-223e5458ec7f9a57802e3e31deba48cb",
"message": "Success"
}
Usage Reporting
Responses also include api and signing usage data.
In the below example the org has used 1/10000 available API calls:
{
"taskID": "t-f12de82ea4ed01ffb022d2c7855eaaef",
"message": "Success",
"usage": {
"api": {
"term": 1,
"termMax": 10000
},
"signature": {
"term": 1,
"termMax": 1000
}
}
}
All Responses
202
Description: Post has been accepted for processing, but the processing has not been completed.
400
Description: Invalid request
Common Causes: Unexpected post format.
Solution: Verify that the POST is formatted correctly according to the instructions above.
401
Description: Unauthorized
Common Causes: Insufficient permissions or Invalid API key or Tenant ID.
Solution: Verify user permissions. Contact support@documill.com
403
Description: Forbidden
Common Causes: Invalid API key or Tenant ID, Insufficient API Licenses.
Solution: Contact support@documill.com
500
Description: 500: Internal Server error.
Common Causes: Documill license or Documill service downtime.
Solution: Contact support@documill.com