TABLE OF CONTENTS

  • Parameters
  • Example


ADDITIONAL INFO

  • API Explorer

 

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 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"

Parameters

 

The POST verb allows you to create a new task and send that task to a specified user.


The required and optional parameters for a POST call to the Task API are outlined below.


 

Name

 
 

Type

 
 

Description

 
 

Required

 
 

ExternalId

 
 

String

 
 

Your external identifier for this Task

 
 


 

 
 

UserId

 
 

String

 
 

Identifier for the user assigned to this Task.

'First Available ID' is '00000000000000000000000000000001'.
'First To Claim ID' is '00000000000000000000000000009998'.
'All To Complete' is '00000000000000000000000000009997'.

 When working with a 'First to Claim' or 'All To Complete' case, you must specify a TargetGroup OR a TargetUsers value.

 
 

*

 
 

UserEmail

 
 

String

 
 

Registered email address for the user assigned to this Task.

 
 

*

 
 

UserExternalId

 
 

String

 
 

Your external identifier for the user assigned to this Task

 
 

*

 
 

Name

 
 

String

 
 

Title/Description of this Task - displayed to the app user

 
 


 

 
 

Icon

 
 

String

 

['Airplane', 'Book', 'Building', 'Science', 'Clipboard', 'Clock', 'Organisation', 'Contact', 'Globe', 'Group', 'Help', 'Home', 'Bug', 'LightBulb', 'Marker', 'MedicalCase', 'Power', 'PriceTag', 'Roller', 'AddressBook', 'SignPost', 'SpeechBubble', 'Star', 'TrafficLight', 'Report', 'Truck', 'Rain', 'UnderConstruction', 'User', 'Warning', 'Hammer', 'Anchor', 'Announce', 'Calendar', 'Drill', 'Services', 'List', 'History', 'Settings', 'Documents', 'Info', 'Flag']


 

The name of the icon to display for this Task. e.g., use 'Airplane' for the standard Airplane icon. 

If you have uploaded your own custom icons (via the App Setup page in the platform), specify the name of the replaced standard icon.

 


 

 
 

TemplateId

 
 

String

 
 

Identifier of the Task Template that this Task is derived from (if any).

 Currently, only connectors are inherited from the task template.

 
 


 

 
 

CompleteBy

 
 

Date

 
 

Date/time by which this Task must be completed.

Must be specified in ISO-8601 format as a UTC.
 Ignored when IsAllDay is true.

 
 


 

 
 

StartBy

 
 

Date

 
 

Date/time by which this Task is expected to start.

Must be specified in ISO-8601 format as a UTC time.
 Ignored when IsAllDay is true.

 
 


 

 
 

IsAllDay

 
 

Boolean

 
 

If true, this Task is an all-day task.

AllDayDate is mandatory when this is true.
By default, all tasks with this set to true will start and end at UTC midnight of the AllDayDate specified.
 Update AllDayUtcOffset to change the start and end.

 
 


 

 
 

AllDayUtcOffset

 
 

Integer

 
 

Specifies the midnight offset in Hours to use for StartBy and CompleteBy when IsAllDay is true.

 By default, IsAllDay tasks will start and end at UTC midnight of the AllDayDate specified.

 
 


 

 
 

AllDayDate

 
 

Date

 
 

Date used for the IsAllDay flag.

 Must be specified in ISO-8601 format as a UTC time. This is mandatory when IsAllDay is true.

 
 


 

 
 

CompleteAtText

 
 

String

 
 

Textual description of location at which Task should be performed.

 Generally expected to be address in format Unit/Number, Street Name, Suburb, City, State, Country.

 
 


 

 
 

CompleteAtLat

 
 

Double

 
 

Latitude co-ordinate in decimal degrees of location at which Task should be performed.

 
 


 

 
 

CompleteAtLon

 
 

Double

 
 

Longitude co-ordinate in decimal degrees of location at which Task should be performed.

 
 


 

 
 

PerformWithin

 
 

Integer

 
 

Required radius in meters of the location that the user must be within for the Task to be performed.

 
 


 

 
 

AdditionalInfo

 
 

String

 
 

Free text area for additional information about this Task to be displayed to app user.

 
 


 

 
 

DisableNotes

 
 

Boolean

 
 

If true, users will not be able to add free text notes to this Task. Default (if unspecified) is false.

 
 


 

 
 

SendImmediate

 
 

Boolean

 
 

If true or unspecified, the Task will be sent immediately (or if files are attached, then immediately on last file upload).

 If explicitly set to false, then the Task will be created in a Draft status and will require a separate PUT action that sets this property to true in order to send the Task to the user.

 
 


 

 
 

UserCanReject

 
 

Boolean

 
 

The user that the task is assigned to is allowed to reject the task or not.

 
 


 

 
 

RestrictToGroup

 
 

String

 
 

Restrict access to a specific User Group identifier.

 This only allows access to users in the selected group. Users in this Group will also be able to access all items that are not assigned to any Groups.

 
 


 

 
 

UserCanReassign

 
 

Boolean

 
 

Whether or not the assigned app user is permitted to reassign this Task to another user.

 
 


 

 
 

ReassignType

 
 

String

 

['Any', 'Available', 'Group']


 

Controls how the list of reassignable users is generated. NOTE: Any group restrictions on this Task are also automatically used to filter the user list.

 


 

 
 

TargetGroup

 
 

String

 
 

Targets this Task at the given User Group identifier.

 Only used when working with a 'First to Claim' or 'All To Complete' Task.

 
 


 

 
 

TargetUsers

 
 

Array[string]

 
 

Targets this Task at the given list of User identifiers.

 Only used when working with a 'First to Claim' or 'All To Complete' Task.

 
 


 

 
 

Activities

 
 

Array[TaskActivity]

 
 

Activities to be performed on this Task.

 
 

 
 

Files

 
 

Array[TaskFile]

 
 

Files to be included with this Task.

 
 


 

 
 

ValidateFormAnswers

 
 

Boolean

 
 

Whether or not to validate preset FormAnswers on 'Fill Out Form' activities.

 For testing/debug purposes only, should not be used in production.

 
 


 

 
 

RetrieveEntries

 
 

Boolean

 
 


 

 
 


 

 
 

MediaAsUrl

 
 

Boolean

 
 


 

 
 


 

 
 

AnswerFormat

 
 

String

 
 

['Raw', 'Rich', 'Flat']

 
 


 

 
 

PurgeDays

 
 

Integer

 
 


 

 
 


 

 
 

CompanyId

 
 

Integer

 
 

Your unique Company Id found on the Organisation Setup page of the secure website.

 
 

 
 

IntegrationKey

 
 

String

 

 
 

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

 
 

 


 

* - At least one of these values is required.


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://secure.amplusforms.com:443/api/v2/task

 

Request Body

 

{
  "UserEmail": "johnsmith@yourcompany.com",
  "Name": "This is a test task",
  "CompleteBy": "2023-09-27 18:00:00",
  "StartBy": "2023-09-26 18:00:00",
  "IsAllDay": false,
  "AllDayUtcOffset": 0,
  "AllDayDate": "Date",
  "CompleteAtText": "",
  "CompleteAtLat": 0,
  "CompleteAtLon": 0,
  "PerformWithin": 0,
  "AdditionalInfo": "This is a test task description.",
  "DisableNotes": false,
  "SendImmediate": true,
  "UserCanReject": false,
  "RestrictToGroup": "",
  "UserCanReassign": true,
  "ReassignType": "",
  "TargetGroup": "",
  "Activities": [
    {
      "Name": "The App To Open",
      "FormExternalId": "ext_id_form_to_open",
    }
  ],
  "ValidateFormAnswers": false,
  "RetrieveEntries": false,
  "MediaAsUrl": false,
  "AnswerFormat": "",
  "PurgeDays": 0,
  "CompanyId": 6XXXX,
  "IntegrationKey": "995XXXXXXXXXXXXXXXXXXXXXXXX"
}