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 will be automatically synchronised to the target User’s devices.
On the Cloud this API is available via SSL secured HTTPS connection using the REST GET, POST and DELETE verbs:
https://eforms.mobileform.net/api/v1/Task?format=[xml|json]
To search for and retrieve multiple Tasks at once, use a GET with the search API found at:
https://eforms.mobileform.net/api/v1/Task?format=[xml|json]
The format query string parameter controls the desired response format. Specify either xml or json.
If you use XML format, you must ensure that every XML element in your request payload is ordered alphabetically.
This requirement does not apply to JSON payloads.
Using the Task API
The Task API allows you to work with a single Task at a time.
GET Request
The GET verb allows you to retrieve a single Task, identified by its unique Id.
The required and optional parameters for a GET call to the Tasks API are outlined below.
Parameter Name | Data Type | Required | Description |
Format | String | Yes | Specifies the desired format of the response. |
ProviderId | Integer | Yes | Your unique Provider Id found on the Organisation Setup page of the secure website (under My Account) |
Integrationkey | String | Yes | Your unique Integration Key found on the Organisation Setup page of the secure website (under My Account) |
Id | GUID | Yes | The unique identifier of the Task you wish to retrieve |
GET Response
The data returned from a Task GET is provided as follows:
Task Response (<TaskResponse>)
Field Name | Data Type | Description |
Task | Task | The returned Task object |
ResponseStatus | ResponseStatus | Details of any errors that may have occurred |
Task (<Task>)
Field Name | Data Type | Description |
Id | GUID | Unique identifier of the Task |
ProviderId | Integer | The Provider identifier for this Task |
ExternalId | String | External identifier of the Task. Used to link this Task to external systems. Can be null/empty. |
UserExternalId | String | The external identifier of the App User assigned to the Task. This is for linking app users into other systems by a common ID. Can be null/empty. |
UserEmail | String | Email address of the App User assigned to this Task |
Name | String | Name/title of this Task |
Status | String | Status of this Task. Status options are: |
CompleteBy | DateTime | Date and time the Task must be completed by. |
| UserCanReject | Boolean | Whether or not the app user can reject the task when it is dispatched to them. Accepts values of True or False. Default is False. |
CompleteAtLat | Double | Latitude of the location at which the Task should be performed. |
CompleteAtLon | Double | Longitude of the location at which the Task should be performed. |
CompleteAtText | String | Description of the location at which the Task should be performed – e.g. the street address or directions. |
PerformWithin | Integer | The maximum distance from the CompleteAt location that the App User can be when performing the Task. |
AdditionalInfo | String | Any additional information relating to the Task, will be visible to the App User on the device. |
TaskActivities | Array of TaskActivity | Collection of the Task’s activities, see TaskActivity type definition below |
TaskHistories | Array of TaskHistory | The Task’s status change history, see TaskHistory type definition below. Only available on GET requests. |
StartTime | DateTime | Date and time the Task was started by the App User. |
CompleteTime | DateTime | Date and time that the Task was completed. |
ActualCompleteLat | Double | Latitude of the user when completing the Task. |
ActualCompleteLon | Double | Longitude of the user when completing the Task. |
IntegrationKey | String | Your unique Integration Key found on the Organisation Setup page of the secure website (under My Account) |
TaskActivity (<TaskActivity>)
Field Name | Data Type | Description |
FormCode | String | The code of the Form to be filled out by the App User. |
DocCode | String | The code of the Doc to be read by the App User. |
Instruction | String | The Instruction to be performed by the App User. |
OutcomeId | GUID | The unique identifier of the Form Entry resulting from this Activity. Only set when the App User has completed a “Fill out Form” activity. |
CompleteTime | DateTime | Date and time that the Activity was completed. |
TaskHistory (<TaskHistory>)
Field Name | Data Type | Description |
EventDate | DateTime | Date and time of the history event. |
Status | String | Status of this Task at the time of the event. Status options are: Draft – Task has been created but not yet sent |
StatusReason | String | The reason entered by the App User for the status change. Only used for Rejected status events at present. |
Response Status (<ResponseStatus>)
Input Name | Data Type | Description |
ErrorCode | String | The error code/message for the failure |
Message | String | Description of the error |
Errors | Collection | Collection of ResponseErrors compiled during the request |
Response Error (<ResponseError>)
Input Name | Data Type | Description |
ErrorCode | String | The error code/message for the failure |
FieldName | String | Name of field involved in error, if any |
Message | String | Error message |
POST Request
The POST verb allows you to create a single Task which will then immediately send out to the specified User.
You may use either JSON or XML formats in your request.
You indicate this by setting the ContentType HTTP header as “application/json” or “application/xml”. If no ContentType is specified, XML format is assumed.
The required and optional parameters for a POST to the Tasks API are outlined below.
Parameter Name | Data Type | Required | Description |
Task | Task | Yes | The Task that you wish to create. See the Task type definition from the GET above. |
Task (<Task>) Required Fields
The following fields must be specified when issuing a POST request to the Task API.
All other fields are optional. Task completion fields (e.g. Status, ActualCompleteLat) will be ignored.
Field Name | Data Type | Description |
IntegrationKey | String | Your unique Integration Key found on the Organisation Setup page of the secure website (under My Account) |
ProviderId | Integer | Your unique Provider Id found on the Organisation Setup page of the secure website (under My Account) |
Name | String | The name/title of the Task |
UserEmail | String | The email address of the target App User |
CompleteBy | DateTime | Date and time the Task must be completed by. |
TaskActivities | TaskActivities | Collection of the Task’s activities. |
TaskActivity (<TaskActivity>) Required Fields
At least one Task Activity must be specified when issuing a POST request to the Task API.
Activity completion fields (OutcomeId, CompleteTime) will be ignored.
Field Name | Data Type | Description |
FormExternalId | String | To create a “Fill Out Form” activity. To create a “Read Doc” activity. |
PresetAnswers | Collection | Collection of Answer elements that are to be pre-populated into the Form entry involved in a “Fill Out Form” activity. |
PresetAnswers and Answer (<Answer>)
Answers must be structured to match the related Form’s question structure.
When setting answers for Choices questions, you must ensure that the answer value you provide exists as a value in the Choices question’s list of options.
Note that Page Groups must be included as the parent Answer if you wish to set Answers for questions inside a Page Group.
Field Name | Data Type | Description |
Name | String | The data name of the Form question or page group that this Answer element relates to |
Value | String | The value of this Answer – will be pre-populated onto the Form entry that is sent to the user. |
Answers | Collection | Collection of child Answer elements. Use this option to create the necessary hierarchy to match your Form’s question structure when your Form contains Page Groups. |
As an example, consider a Form with a Page Group as follows:

To pre-populate the children Page Group, one would do the following (XML example):
<PresetAnswers>
<Answer>
<Answers>
<Answer>
<Name>child_name</Name>
<Value>John Smith</Value>
</Answer>
<Answer>
<Name>child_age</Name>
<Value>12</Value>
</Answer>
<Answer>
<Name>child_dob</Name>
<Value>2001-04-22T17:01:55Z</Value>
</Answer>
</Answers>
<Name>Children</Name>
</Answer>
<Answer>
<Answers>
<Answer>
<Name>child_name</Name>
<Value>Molly Smith</Value>
</Answer>
<Answer>
<Name>child_age</Name>
<Value>8</Value>
</Answer>
<Answer>
<Name>child_dob</Name>
<Value>2004-11-01T23:52:00Z</Value>
</Answer>
</Answers>
<Name>Children</Name>
</Answer>
</PresetAnswers>
Note that you must use ISO-8601 format (YYYY-MM-DDTHH:MI:SSZ) for dates and times.
If you want to provide multiple pre-populated answers for a repeatable Page Group, simply specify the Page Group answer set multiple times as seen above.
POST Response
The data returned from a Task POST is provided as follows:
Task Response (<TaskResponse>)
Field Name | Data Type | Description |
Task | Task | The returned Task object |
ResponseStatus | ResponseStatus | Details of any errors that may have occurred |
Task (<Task>) Response Fields
The Task returned is only populated with the following fields:
Field Name | Data Type | Description |
Id | GUID | Unique identifier of the Task |
Status | String | Status of this Task which will be set to Sent |
API Usage Example
Given that the API is REST based, you can access the API directly via your web browser to test it. Obviously for actual integration works, you will need to make a web request to the given REST URL and then parse the response.
Below is a simple POST example which creates a Task, using the XML format.
<Task xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AdditionalInfo>String</AdditionalInfo>
<CompleteAtLat>0</CompleteAtLat>
<CompleteAtLon>0</CompleteAtLon>
<CompleteAtText>String</CompleteAtText>
<CompleteBy>0001-01-01T00:00:00</CompleteBy>
<ExternalId>String</ExternalId>
<IntegrationKey>String</IntegrationKey>
<Name>String</Name>
<PerformWithin>0</PerformWithin>
<ProviderId>0</ProviderId>
<TaskActivities>
<TaskActivity>
<FormCode>String</FormCode>
</TaskActivity>
<TaskActivity>
<Instruction>String</Instruction>
</TaskActivity>
</TaskActivities>
<UserEmail>String</UserEmail>
<UserExternalId>String</UserExternalId>
</Task>
XML Response
<TaskResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Task>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Status>String</Status>
</Task>
<ResponseStatus>
<ErrorCode>String</ErrorCode>
<Message>String</Message>
<Errors>
<ResponseError>
<ErrorCode>String</ErrorCode>
<FieldName>String</FieldName>
<Message>String</Message>
</ResponseError>
</Errors>
</ResponseStatus>
</TaskResponse>