Tasks¶
This API allows listing, retrieving, creating, updating, and deleting business tasks. Tasks are identified by their UUID.
List Tasks¶
- GET /task/¶
List all tasks.
Sample request:
GET /task/ HTTP/1.1 Host: api.fieldaware.net Authorization: Token 9dcae3660ec84eac94bb506e09a9af40 Accept: application/json
Sample response:
HTTP/1.1 200 OK Content-Type: application/json { "count": 500, "items": [ { "name": "Service Walsh conventional battery", "uuid": "01c9373d6d22438096503fe72a7c1612", "link": { "rel": "detail", "url": "https://api.fieldaware.net/task/01c9373d6d22438096503fe72a7c1612" } }, { "name": "Install Cole emergency battery", "uuid": "01f359aabafb4ff28347bddd9a24f28a", "link": { "rel": "detail", "url": "https://api.fieldaware.net/task/01f359aabafb4ff28347bddd9a24f28a" } }, { "name": "Install Bailey bulkhead filter", "uuid": "0274f3fa2e224e17ba9e6a36ce3f4b0a", "link": { "rel": "detail", "url": "https://api.fieldaware.net/task/0274f3fa2e224e17ba9e6a36ce3f4b0a" } } ], "page": 0, "pageSize": 3, "sortedBy": [] }
- Query Parameters:
sortedBy – Available sorting criteria:
name
name – A filtering value for task name
taxable – A filtering value
glAccount – A filtering value for glAccount
Get Task¶
- GET /task/(task_ref)¶
Retrieve a given task.
Sample request:
GET /task/0274f3fa2e224e17ba9e6a36ce3f4b0a HTTP/1.1 Host: api.fieldaware.net Authorization: Token 9dcae3660ec84eac94bb506e09a9af40 Accept: application/json
Sample response:
HTTP/1.1 200 OK Content-Type: application/json { "glAccount": null, "mandatory": true, "name": "Service Heat Cable", "uuid": "07af3523740340fb8685ae2eece650c3", "markupType": "fixed", "taxable": true, "markupValue": 15.00, "estDuration": null, "unitPrice": 70.46, "unitCost": 55.46, "description": "", "customFields": {} }
Create Task¶
- POST /task/¶
Create a new task.
Sample request:
POST /task/ HTTP/1.1 Host: api.fieldaware.net Authorization: Token 9dcae3660ec84eac94bb506e09a9af40 Accept: application/json { "name": "Test", "description": "", "mandatory": false, "estDuration": 120, "unitCost": 10.50, "unitPrice": 15.00, "markupType": "fixed", "markupValue": 20.87, "taxable": false, "tax1": { "group": "tagGr1", "name": "income" }, "tax2": { "group": "tagGr2", "name": "income" }, "glAccount": "gl account", "customFields": { "declaration key": "value" }, }
- Request JSON Object:
name (string) – Name of the task (required)
description (string) – Description of the task
estDuration (int) – The estimated duration of the task in minutes
unitCost (number) – The unit cost of the task
unitPrce (number) – The unit price of the task
markupType (string) – The markup type of the task, one of
fixed
orpercentage
markupValue (number) – The markup type of the task
taxable (bool) – Whether the task is taxable
tax1 (obj) – JSON object representing tax group and name, only applicable when tax system of business is non-US
tax2 (obj) – JSON object representing tax group and name, only applicable when tax system of business is non-US
glAccount (string) – General Ledger account of the task
customFields (obj) – Mapping of declaration keys to values
Sample response:
HTTP/1.1 201 Created Content-Type: application/json
- POST /task/¶
Create a new minimal task.
Sample request:
POST /task/ HTTP/1.1 Host: api.fieldaware.net Authorization: Token 9dcae3660ec84eac94bb506e09a9af40 Accept: application/json { "name": "Test", }
- Request JSON Object:
name (string) – Name of the task (required)
Sample response:
HTTP/1.1 201 Created Content-Type: application/json
Update Task¶
- PUT /task/(task_ref)¶
Update a given task.
Sample request:
Same as Create Task, with all properties being optional.
PUT /task/00bd62a92a004faea233951510167cad HTTP/1.1 Host: api.fieldaware.net Authorization: Token 687fe20baeef448bb30db579139dad33 Accept: application/json { "name": "Replace Air filter" }
Sample response:
HTTP/1.1 204 NO CONTENT
Delete Task¶
- DELETE /task/(task_ref)¶
Delete a given task.
Sample request:
DELETE /task/00bd62a92a004faea233951510167cad HTTP/1.1 Host: api.fieldaware.net Authorization: Token 687fe20baeef448bb30db579139dad33 Accept: application/json
Sample response:
HTTP/1.1 204 No Content