Assignment
Assignments are planned work, either autogenerated based on Agreements or manually created. Assignments are kept even after work has completed and then functions as a history of the work that has been executed, by whom, when etc.
If the organization is connected to a financial system then Previsto will do bookkeeping in the financial system for the assignments.

The assignment object

Example Response
1
{
2
"id" : "asgmt-klJ23j4L23j43",
3
"createdDate" : "2017-05-21T20:22:28.110Z",
4
"meta" : { },
5
"contactId" : "cont-242342DgHH2lkjkj23",
6
"payingContactId" : "cont-242342DgHH2lkjkj23",
7
"accountId" : "acct-dfEfdv3342FD",
8
"action" : "None",
9
"remoteOrderId" : null,
10
"location" : [ 10.5286863, 56.8039035 ],
11
"status" : "None",
12
"plan": {
13
"executionTime" : "2017-05-31T08:05",
14
"indicativeDate" : "2017-05-29",
15
"accountIds" : [],
16
"indicativeDateType" : "Optimal",
17
},
18
"tasks" : [ {
19
"agreementId" : "agrmt-DOKwO3VLJ6Sy3YxnlWop",
20
"description" : "Pudsning2",
21
"amount" : 20000,
22
"duration" : 16,
23
"workType" : "WindowCleaning"
24
} ]
25
}
Copied!
Field
Type
Required
Description
id
string
No
-
createdDate
date
No
Date of creation.
contactId
string
Yes
Id of the contact related to this assignment.
payingContactId
string
No
Id of the contact paying for this assignment.
accountId
string
Yes
Id of the account that reflects the worker that is scheduled to execute the assignment.
action
string
No
Action taken on the assignment. None, Skippedor Completed.
remoteOrderId
string
No
Id of the order created in the financial system.
location
number[]
Yes
Array of 2 numbers holding longitude and latitude in specified order according to geojson syntax. (Fx. [11.543540954589844, 56.703469017862034])
status
string
No
Financial status of this assignment. None, AppendedToOrder, Invoiced or Fulfilled.
plan
assignment_plan
No
Planning details for the assignment.
tasks
task[]
No
Array of task elements in this assignments.

The assignment_plan object

Field
Type
Required
Description
executionTime
date
Yes
The planned time for executing this assignment.
indicativeDate
date
No
Date for guiding planning of executionTime.
indicativeDateType
string
No
Fixed for planning executionTime exact date of indicativeDate or Optimal for flexible planning that allows optimizing routes by planning executionTime some day within the same week as indicativeDate.
accountIds
string[]
No
Ids of accounts reflecting the workers that should handle this assignment. Empty list allows all accounts.

The task object

Field
Type
Required
Description
reference
string
No
Reference for this task, fx the id of the agreement that is the base of this task.
description
string
No
Description of the work.
unitPrice
number
No
The amount to charge in 1⁄100 of the monetary unit (fx. cents or øre) without VAT.
duration
number
No
The duration in minutes of the work. Minimum 3 minutes.
workType
string
No
The type of work. Currently only 'WindowCleaning'.
post
https://api.previsto.io/assignments
/
Create an Assignment
get
https://api.previsto.io/assignments
/:id
Read an Assignment
put
https://api.previsto.io/assignments
/:id
Update an Assignment
delete
https://api.previsto.io/assignments
/:id
Delete an Assignment
get
https://api.previsto.io/assignments
/
List all assignments

Last modified 2yr ago