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.

Log time

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

Logging a task requires the following mandatory values:

  • Person
  • Project
  • Date
  • Hours per day

An example of this may be:

POST /v3/logged-time HTTP/1.1
Host: https://api.float.com 

{
    "people_id": 11,
    "project_id": 2,
    "date": "2021-04-15",
    "hours_pd": 2
}

Updating logged time works the same as updating the regular task.

Adding a time off task

To assign a time off task, you’ll need to know the people’s and time off type’s IDs. See People and Time Off Types sections for help on identifying these.

Addingg a time off task requires the following mandatory values:

  • Person
  • Time off type
  • Start Date
  • End Date
  • Hours per day(Not required when a full day)

An example of this may be:

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

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

Updating time off task works the same as updating the regular task.

Regular task and logged time can be created over the API when full-day time off tasks exists on the same date, the task will still be saved in the database but it will not be visible on the UI. However, if there are already scheduled or log tasks present and full-day time off task is added on the same day then those tasks will be deleted. Creating a part-time time off task will not delete already existing tasks.