TABLE OF CONTENTS
- Parameters
- Example
ADDITIONAL INFO
- API Explorer
- General Information
This request method allows you to update an existing task.
This API is available via SSL-secured HTTPS connection on the Cloud using the REST PUT 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 PUT 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 PUT verb allows you to update any existing task in your account. The required and optional parameters for a PUT 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. | ✓* |
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', 'Organization', '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). |
|
CompleteBy | Date | Date/time by which this Task must be completed. |
|
StartBy | Date | Date/time by which this Task is expected to start. |
|
IsAllDay | Boolean | If true, this Task is an all-day task. |
|
AllDayUtcOffset | Integer | Specifies the midnight offset in Hours to use for StartBy and CompleteBy when IsAllDay is true. |
|
AllDayDate | Date | Date used for the IsAllDay flag. |
|
CompleteAtText | String | Textual description of location at which Task should be performed. |
|
CompleteAtLat | Double | Latitude coordinates in decimal degrees of a location at which the Task should be performed. |
|
CompleteAtLon | Double | Longitude coordinates in decimal degrees of a location at which the 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 | A free text area for additional information about this Task to be displayed to the 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 the last file upload). |
|
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. |
|
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. |
|
TargetUsers | Array[string] | Targets this Task at the given list of User identifiers. |
|
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. |
|
RetrieveEntries | Boolean |
|
|
MediaAsUrl | Boolean |
|
|
AnswerFormat | String | ['Raw', 'Rich', 'Flat'] |
|
PurgeDays | Integer |
|
|
CompanyId | Integer | Your unique Company ID is found on the Organization Setup page of the secure website. | ✓ |
IntegrationKey | String | Your unique Integration Key is found on the Organization 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 the Postman API Platform.
Request URL
https
://secure.amplusforms.com:443/api/v2/task
Response Body
{
"Task": {
"Id": "dd3XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"UserId": "c9bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Name": "This task has been updated by API",
"Icon": "Flag",
"Status": "InProgress",
"CompleteBy": "2021-04-02T22:27:00.0000000Z",
"StartBy": "2021-04-02T21:27:00.0000000Z",
"IsAllDay": false,
"CompleteAtText": "",
"AdditionalInfo": "This is a test.",
"DisableNotes": false,
"UserCanReject": false,
"RestrictToGroup": "00000000000000000000000000000000",
"UserCanReassign": false,
"ReassignType": "Any",
"Activities": [
{
"Name": "New Test Activity",
"FormId": "088XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"EntryId": "00000000000000000000000000000000",
"ActivityType": "FillOutForm",
"ActivityId": "946XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
],
"Files": [],
"History": [
{
"EventDate": "2021-04-01T14:28:00.7670000Z",
"Status": "Draft"
},
{
"EventDate": "2021-04-01T14:28:31.4800000Z",
"Status": "Sent"
},
{
"EventDate": "2021-04-01T14:28:49.1230000Z",
"Status": "InProgress"
}
],
"StartTime": "2021-04-01T14:28:48.5400000Z",
"CompleteTime": "1990-01-01T00:00:01.0000000Z",
"CompanyId": 6XXXX
}
}