× Freshbooks App Logo
FreshBooks
Official App
Free - Google Play
Get it

Services

General Info

In Freshbooks services represent things that your business offers to clients. Services are added to projects to to allow tracking of time entries by type of work. Services keep track of details such as hourly rate. Services automatically get converted to tasks for inclusion on invoices.

*Requires Authorization*

Important Note

When using GET calls for Projects and Time Tracking, please leave out the Content Type from your header.

Includes

Include Description
include_task_id Include the accounting task_id in the response

Filters

There are no filters for services.

Field Descriptions

underlined fields are required on creation

Field Type Description
business_id int unique id for business
id it unique id of the service 
name string descriptive name of service
billable bool whether the service is billable to clients or not
project_default bool whether the service will be automatically added to new projects in the FreshBooks UI (will not be automatically added in API calls)
vis_state int 0 for active, 1 for deleted

Get Single Service

Request: GET https://api.freshbooks.com/comments/business/<businessid>/service/<serviceid>

Response:

{ 
   "service" : {
     "business_id": 25,
     "id": 4054453,
     "name": "Document Review",
     "billable": true,
     "vis_state": 0
     }
}

 

Get Single Service Rate

Request: GET https://api.freshbooks.com/comments/business/<businessid>/service/<serviceid>/rate

Response:

{ 
   "service_rate" : {
     "rate": "10.00",
     "business_id": 25,
     "service_id": 4054453
    }
}

Create a Service

Request: POST https://api.freshbooks.com/comments/business/<businessid>/service

{ 
   "service" : {
     "name": "Research"
    }
}

Response:

{ 
   "service" : {
     "business_id": 25,
     "id": 4054453,
     "name": "Research",
     "billable": false,
     "vis_state": 0
     }
}

Add a Service Rate

Request: POST https://api.freshbooks.com/comments/business/<businessid>/service/<serviceid>/rate

{ 
   "service_rate" : {
     "rate": "10.00"
    }
}

Update a Service Rate

Request: PUT https://api.freshbooks.com/comments/business/<businessid>/service/<service_id>/rate

{ 
   "service_rate" : {
     "rate": "10.00"
    }
}

List Services

Request: GET
https://api.freshbooks.com/comments/business/<businessid>/services

Response:

{ 
   "services" : [
     {
     "business_id": 25,
     "id": 4054453,
     "name": "Document Review",
     "billable": true,
     "vis_state": 0
     },
     {
     "business_id": 1,
     "id": 4054451,
     "name": "Administration",
     "billable": false,
     "vis_state": 0
     }
   ], 
  "meta": {
       "total": 2,
       "per_page": 50,
       "page": 1,
       "pages": 1
  }
}

List Services

Request: GET
https://api.freshbooks.com/comments/business/<businessid>/services


url = "https://api.freshbooks.com/comments/business/<businessid>/services"
headers = {'Authorization': 'Bearer &ltBearer Token&gt', 'Api-Version': 'alpha'}
res = requests.get(url, data=None, headers=headers)

Response:


{ 
   "services" : [
     {
     "business_id": 25,
     "id": 4054453,
     "name": "Document Review",
     "billable": true,
     "vis_state": 0
     },
     {
     "business_id": 1,
     "id": 4054451,
     "name": "Administration",
     "billable": false,
     "vis_state": 0
     }
   ], 
  "meta": {
       "total": 2,
       "per_page": 50,
       "page": 1,
       "pages": 1
  }
}