Using the Float API you can assign project tasks to your team.

In this tutorial we’ll cover:

Adding a task

To assign a task, you’ll need to know the people’s and project’s IDs. See People and Project sections for help on identifying these.

Adding a task requires the following mandatory values:

  • Person
  • Project
  • Start Date
  • End Date
  • Hours per day

An example of this may be:

POST /v3/tasks HTTP/1.1
Host: https://api.float.com 

{
    "people_id": 11,
    "project_id": 2,
    "start_date": "2017-12-01",
    "end_date": "2017-12-15",
    "hours_pd": 2
}

It is useful to add a name too:

"name": "Concepting"

If the submission is successful, then you will receive a 201 Created response with a representation of the task that you have just created:

HTTP/1.1 201 Created
Date: Thu, 01 Dec 2017 17:08:17 GMT
Location: https://api.float.com/v3/people/6
Content-Length: 552
Content-Type: application/json; charset=UTF-8

{
  "task_id": 1000001613,
  "project_id": 101162,
  "start_date": "2017-12-01",
  "end_date": "2017-12-15",
  "start_time": null,
  "hours": "2.0",
  "people_id": 46677,
  "priority": 0,
  "name": "Concepting",
  "notes": null,
  "repeat_state": null,
  "repeat_end_date": null,
  "created_by": null,
  "modified_by": null,
  "created": "2017-04-27 08:41:08",
  "modified": null
}

Updating a task

To update a task, Send a PATCH request to the task’s endpoint. For instance, you could add a note with the task_notes field and also set the priority so that it appears above all else within the time frame:

PATCH /v3/tasks/56 HTTP/1.1
Host: https://api.float.com 

{
    "notes": "Remember to contact client before starting",
    "priority": 1
}

Repeating tasks

Some tasks need to repeat on a regular weekly, fornightly or monthly basis. Float supports this with the repeat_state and repeat_end properties of the task. So, to make our task repeat every week until the 22 November 2017, we update it like this:

PATCH /v3/tasks/56 HTTP/1.1
Host: https://api.float.com 

{
    "repeat_state": 1,
    "repeat_end_date": "2017-11-22"
}

The repeat_state property is a number which you set to 0 if the task does not repeat, 1 if it needs to happen every week, 2 if it’s monthly and 3 if it’s every 2 weeks.