×
FreshBooks
Official App
Free – Google Play
Get it
Hey there - We have updated our privacy policy in accordance with GDPR. Got It
×

Tasks

General Info

Tasks in Freshbooks represent services that your business offers to clients. Tasks are used to keep track of details of the service such as name and hourly rate.

*Requires Authorization*

Includes

Include NameDescription
projectsList of Projects that contain the task

Filters

Filter TypeNameFieldDescription
Equalstaskidtaskidunique id related to a task
Intaskidstaskidmatches list of taskids, one specified per query arg
Equalsbillablebillabletrue if task is billable
Betweenrate_minratelist tasks with rates equal or greater
Betweenrate_maxratelist tasks with rates equal or less
Betweenupdated_minupdatedlist of tasks that have been updated since the given date
Betweenupdated_maxupdatedlist of tasks that have been updated before the given date
Inprojectidsprojectidmatches list of projectids, one specified per query arg

Field Descriptions

underlined fields are required on creation

FieldTypeDescription
updatedDateTimethe Date/Time the task was last updated
descriptionstringthe description of the task
rateobjectsubfields: amount, code
amountstringthe hourly amount charged for the task
codestringthe currency of the rate
taskidintthe unique id for the task
billablebooleantrue if the task is billable
tnamestringthe name for the task
tdescstringthe description of the task
idintthe unique id for the task
namestringthe name of the task
vis_stateint0 marks the task as active, 1 if inactive

Get a Single Task

Request: GET
https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks/<task_id>

Response:


{
 "response": {
   "result": {
     "task": {
       "updated": "2017-07-24 09:39:21",
       "description": "",
       "vis_state": 0,
       "rate": {
         "amount": "100.00",
         "code": "CAD"
       },
       "taskid": 159361,
       "billable": true,
       "tname": "Piloting",
       "tdesc": "",
       "id": 159361,
       "name": "Piloting"
       }
     }
   }
 }

Create a Task

Request: POST
https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks


  {
  "task": {
   "name": "Consulting"
  }
							

Update a Task

Request: PUT
https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks/<task_id>


{
 "task": {
  "name": "Walking Dogs",
  "rate": {
    "amount": "25.47",
    "code": "CAD"
   }
  }
}

Response:


{
 "response": {
   "result": {
     "task": {
       "updated": "2017-07-24 10:09:18",
       "description": "",
       "vis_state": 0,
       "rate": {
         "amount": "25.47",
         "code": "CAD"
        },
       "taskid": 159365,
       "billable": true,
       "tname": "Walking Dogs",
       "tdesc": "",
       "id": 159365,
       "name": "Walking Dogs"
       }
     }
   }
 }
 

Delete a Task

Request: PUT
https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks/<task_id>


{
 "task": {
    "vis_state": 1
   }
}

Response:


{
 "response": {
   "result": {
     "task": {
       "updated": "2017-07-24 10:13:38",
       "description": "",
       "vis_state": 1,
       "rate": {
        "amount": "25.47",
        "code": "CAD"
       },
       "taskid": 159365,
       "billable": true,
       "tname": "Walking Dogs",
       "tdesc": "",
       "id": 159365,
       "name": "Walking Dogs"
       }
     }
   }
 }

Listing Tasks

Request: GET
https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks

Response:


  {
    "response": {
       "result": {
         "total": 3,
          "per_page": 15,
          "tasks": [
            {
                //same as single task
            },
            {
                //same as single task
            },
            {
                //same as single task
            }
          ],
          "page": 1,
          "pages": 1
          }
        }
      }
  

Search examples

Some Task Search Examples:


https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks?search%5Bbillable%5D=false 

Returns all the tasks that are not billable


https://api.freshbooks.com/accounting/account/<account_id>/projects/tasks?search%5Brate_min%5D=25&search%5Brate_max%5D=75

Returns all the tasks with a rate between $25 and $100