FreshBooks API Guide

Projects

Staff access

Staff have access to the API calls listed below if the Time Tracking tab is enabled for staff. Each staff member can view all projects to which he or she is assigned. Each staff member can edit only those projects on which he or she is the Project Manager. Limited information is returned about projects that the staff member is assigned to, but not the manager of.

project.create

Create a new project. If you specify project-rate or flat-rate for billing_method, you must supply a rate.

Billing Method Types

  • task-rate
  • flat-rate
  • project-rate
  • staff-rate

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="project.create">
  <project>
    <name>Website Redesign</name>            # (Required)
    <bill_method>project-rate</bill_method>  # (Required)
    <client_id>21</client_id>                # Associated client (Optional)
    <rate>45.00</rate>                       # (Optional)
    <description></description>

    <tasks>                                  # (Optional)
      <task_id>5</task_id>
      <task_id>8</task_id>
      <task_id>22</task_id>
    </tasks>
  </project>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
  <project_id>15</project_id>
</response>

project.update

Update an existing project.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="project.update">
  <project>
    <project_id>15</project_id>

    # Remaining params are same as project.create
  </project>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok"/>

project.get

Retrieve an existing project.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="project.get">
  <project_id>15</project_id>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
  <project>
    ...
  </project>
</response>

project.delete

Delete an existing project.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="project.delete">
  <project_id>15</project_id>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok"/>

project.list

Returns a list of projects in alphabetical order.

Filters

  • client_id - return only projects assigned to this client
  • task_id - return only projects with the given task

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="project.list">
  <page>1</page>                        # The page number to show (Optional)
  <per_page>15</per_page>               # Number of results per page, default 25 (Optional)
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
  <project>
    ...
  </project>
  <project>
    ...
  </project>
  ...
</response>