v1

latestOpenAPI 3.0.02026-08-061380344.2 KB
Tasks

Create a Task

Create a new task

You can create a task at your account level using the /tasks path or under a supported resource (livestock, grow locations or equipment by using the path /:resource_type/:resource_id/tasks. For example[GET] /animals/:id/tasks will fetch the tasks for this animal.

Parameters

title REQUIRED

The name of your task.


end_time OPTIONAL

Due DateTime of your task in 'YYYY-MM-DD HH:MM' format.


assigned_to_id OPTIONAL

The ID or email address of the Farmbrite user to assign the item to.


description OPTIONAL

A summary description of the item.


reference_type OPTIONAL

Used to link the item to another resource. Supported values are:

"animal", "equipment", "plant", "location", "planting"

When providing a reference_type, you should also provide a reference_id. This can also be accomplished by creating the schedule item through its parent resource path. eg; /animals/:animal_id/tasks.


reference_id OPTIONAL

A Farmbrite ID for the resource type that this record is associated with. This can also be accomplished by creating the schedule item through its parent resource path. eg; /animals/:animal_id/tasks.


status OPTIONAL

The status of the item. Options are determined by your account settings. See our help and documentation center for more information.


complete OPTIONAL

Boolean value that indicates whether the task is complete or not.


color OPTIONAL

A HEX color value to set the item's color on the calendar or lis view.


checklist OPTIONAL

An array of hashes (JSON format) representing a list of items to complete in the following format:

[ {"name": "Item 1", "assignee": "(Optional) user_id assigned to", "done": true }, ... ]


priority OPTIONAL

A numeric value between 1 and 5 representing the items priority.

{5 = "Highest", 4 = "High", 3 = "Medium", 2 = "Low", 1 = "Lowest"}


hours_spent OPTIONAL

A numeric (float) value used to track the amount of time spent on the task.


latitude OPTIONAL

A latitude value, with longitude, to tag a certain location on the map.


longitude OPTIONAL

A longitude value used if wanting to tag a certain location on the map.

post/tasks

Headers

Content-Typestring

Request body

object required

Example request

{
  "color": "#bdbdbd",
  "checklist": [
    {
      "name": "Item"
    }
  ],
  "title": "The title of your task",
  "description": "",
  "assigned_to_id": "Farmbrite User ID or Email",
  "priority": 3,
  "status": "To Do",
  "end_time": "2022-04-01 11:30"
}

Response

Successful response