POST Task (Files)

POST Task (Files)

This request method allows you to upload files for a given task.  

On the Cloud, this API is available via SSL-secured HTTPS connection using the REST POST verb.
The format query string parameter controls the desired response format. Specify either XML or JSON.

/api/v2/task?format=xml/json

You may use either JSON or XML formats in your POST submission.
You indicate this by setting the ContentType HTTP header as “application/json” or “application/xml”.

If no ContentType is specified, XML format is assumed.

All XML formatted requests must specify the following XML namespace in the data source root element:
xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”


Endpoints & API Explorer

NodeAPI EndpointAPI Explorer
US/api/v2/taskModel Description/Schema & Parameters

Parameters

The POST verb allows you to upload files for a given task.
The required and optional parameters for a POST call to the Task API are outlined below.

NameTypeDescriptionRequired
TaskIdStringThe unique identifier of the Task to upload this file.
SendTaskOnUploadBoolean

Whether or not to send the Task on successful upload. If additional files are still required to be uploaded on the Task, this instruction will be ignored.

 
CompanyIdIntegerYour unique Company Id is found on the Organisation Setup page of the secure website.
IntegrationKeyString

Your unique Integration Key is found on the Organisation Setup page of the secure website.

FileFileThe file(s) to upload using multipart/form-data. Multiple files can be uploaded in a single request. Ensure you have registered the file name(s) in the Task. Files collection via the /task API ahead of uploading file(s). Uploaded file name(s) MUST match a pre-existing record in the target Task’s Files collection. Note, too, that file names may only contain a maximum of 200 characters comprising of numbers, letters, and underscores. Any other characters will automatically be removed.

Example

Given that the API is REST-based, you can access the API directly via your web browser to test or by using Postman API Platform.

Request URL

https://eforms.mobileform.net/api/v2/task/files?TaskId=537XXXXXXXXXXXXXXXXXXXX&SendTaskOnUpload=false&CompanyId=6XXXX&IntegrationKey=995XXXXXXXXXXXXXXXXXXXXXXXXXX

Response Body

{
"Id": "537XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Status": "Sent"
}
    • Related Articles

    • POST Task Recurring (Files)

      This request method allows you to upload and replace files for a recurring task. On the Cloud, this API is available via SSL-secured HTTPS connection using the REST POST verb. The format query string parameter controls the desired response format. ...
    • POST Task

      This request method allows you to create a new task and assign it to a specified user(s). On the Cloud, this API is available via SSL-secured HTTPS connection using the REST POST verb. The format query string parameter controls the desired response ...
    • POST Task Recurring

      This request method allows you to create a recurring task and assign it to a specified user(s). On the Cloud, this API is available via SSL-secured HTTPS connection using the REST POST verb. The format query string parameter controls the desired ...
    • POST Task

      The Tasks API allows you to retrieve, create and delete Tasks on the platform. This enables scenarios where jobs created/maintained in other systems (e.g. SAP, Salesforce) can be delivered through to your app users automatically. Any new Task created ...
    • POST User

      The POST User API allows you to create a new user. On the Cloud, this API is available via SSL-secured HTTPS connection using the REST GET verb. The format query string parameter controls the desired response format. Specify either XML or JSON. ...