×
FreshBooks
Official App
Free – Google Play
Get 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.

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

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