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

Staff

staff.current

Return the current user’s details. Staff have access to this call, but only for their own staff_id.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="staff.current"></request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
	<staff>
		<staff_id>1</staff_id>
		<username>John</username>
		<first_name>John</first_name>
		<last_name>Smith</last_name>
		<email>John@example.org</email>
		<business_phone></business_phone>
		<mobile_phone></mobile_phone>
		<rate>0</rate>
		<last_login>2010-07-12 13:55:58</last_login>
		<number_of_logins>700</number_of_logins>
		<signup_date>2010-07-07 10:38:57</signup_date>
		<street1></street1>
		<street2></street2>
		<city></city>
		<state></state>
		<country></country>
		<code></code>
	</staff>
</response>

staff.get

Return the complete staff details associated with the given staff_id. Staff have access to this call, but only for their own staff_id.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="staff.get">
	<staff_id>2</staff_id>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
	<staff>
		<staff_id>2</staff_id>
		<username>staff1</username>
		<first_name>test</first_name>
		<last_name>test2</last_name>
		<email>jsmith@abcorp.com</email>
		<business_phone>(123) 456-7890</business_phone>
		<mobile_phone>(123) 456-7890</mobile_phone>
		<rate>0</rate>
		<last_login>2008-11-20 13:26:00</last_login>
		<number_of_logins>13</number_of_logins>
		<signup_date>2008-10-22 13:57:00</signup_date>
		<street1>123 ABC Street</street1>
		<street2></street2>
		<city>Toronto</city>
		<state>Ontario</state>
		<country>Canada</country>
		<code>M1M 1A1</code>
	</staff>
</response>

staff.list

Returns a list of staff.

Note: This method uses pagination.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="staff.list"></request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
	<staff_members page="1" per_page="25" pages="1" total="5">
		<member>
			<staff_id>1</staff_id>
			<username>admin</username>
			<first_name></first_name>
			<last_name>abcorp</last_name>
			<email>abc@abcorp.com</email>
			<business_phone></business_phone>
			<mobile_phone></mobile_phone>
			<rate></rate>
			<last_login>2011-04-01 12:00:00</last_login>
			<number_of_logins>50</number_of_logins>
			<signup_date>2011-04-01 12:00:00</signup_date>
			<street1></street1>
			<street2></street2>
			<city></city>
			<state></state>
			<country></country>
			<code></code>
		</member>

		<member>
			<staff_id>2</staff_id>
			<username>staff1</username>
			<first_name>John</first_name>
			<last_name>Smith</last_name>
			<email>jsmith@abcorp.com</email>
			<business_phone></business_phone>
			<mobile_phone></mobile_phone>
			<rate></rate>
			<last_login>2011-04-01 12:00:00</last_login>
			<number_of_logins>25</number_of_logins>
			<signup_date>2011-04-01 12:00:00</signup_date>
			<street1></street1>
			<street2></street2>
			<city></city>
			<state></state>
			<country></country>
			<code></code>
		</member>
		...
	</staff_members>
</response>

staff.create

Creates a new staff member

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="staff.create">
	<staff>
		<first_name>John</first_name>
		<last_name>Doe</last_name>
		<email>jdoe@example.com</email>
		<!-- Username/Password are optional, but both are required if either is informed -->
		<username>user</username>
		<password>pass</password>
		<!-- the following is a boolean field: 1 or 0 -->
		<email_credentials>1</email_credentials>
		<country>Canada</country>
		<state>Ontario</state>
		<city>Toronto</city>
		<street1>123 Fake St.</street1>
		<street2>Apt 2</street2>
		<code>M5M3M4</code>
		<home_phone>5555555</home_phone>
		<business_phone>41611111111</business_phone>
		<mobile_phone>416-2222222</mobile_phone>
		<fax>416-3333333</fax>
		<rate>75.5</rate> <!-- numeric values only -->
		<projects>
			<project>
				<project_id>2</project_id>
			</project>
		</projects>
	</staff>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
	<staff_id>37</staff_id>
</response>

staff.update

Updates an existing staff member.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="staff.update">
	<staff>
		<staff_id>2</staff_id>
		<!-- required -->
		<first_name>first</first_name>
		<last_name>last</last_name>
		<email>first-last@test.com</email>
		<username>first-last</username>
		<password>secret</password>
		<!-- the following is a boolean field: 1 or 0 -->
		<email_credentials>1</email_credentials>
		<country>brazil</country>
		<state>my state</state>
		<city>my city</city>
		<street1>some street 1</street1>
		<street2>some street 2</street2>
		<code>12345</code>
		<home_phone>416-0000000</home_phone>
		<business_phone>416-1111111</business_phone>
		<mobile_phone>416-2222222</mobile_phone>
		<fax>416-3333333</fax>
		<rate>34.5</rate>
		<!-- this list will override the current project list if exists -->
		<projects>
			<project>
				<project_id>2</project_id>
			</project>
			<project>
				<project_id>3</project_id>
			</project>
		</projects>
		<notes>some notes not visible by staff members</notes>
	</staff>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok"></response>

staff.delete

Deletes the specified staff member.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="staff.delete">
		<staff_id>2</staff_id>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok"></response>