FreshBooks

Search


API Calls

Resources

Categories

Staff have access to the get, list and create API calls listed below if the Expenses tab is enabled for staff. Staff cannot delete or update Categories.

The Categories API provides access to the Expense Categories in the application. They relate to the category_id field as used in the Expenses API.

category.create

Create a new category. If successful, returns the category_id of the newly created item.

Request

<?xml version="1.0" encoding="utf-8"?>

  
    Gasoline  
  

Response

<?xml version="1.0" encoding="utf-8"?>

  12

category.update

Update an existing expense category with the given category_id. Any category fields left out of the request will remain unchanged.

Request

<?xml version="1.0" encoding="utf-8"?>

  

    12  

    

  

Response

<?xml version="1.0" encoding="utf-8"?>
	

category.get

Return the complete category details associated with the given category_id.

Request

<?xml version="1.0" encoding="utf-8"?>

  12

Response

<?xml version="1.0"?>

  
  12
  Gasoline
  

category.delete

Delete an existing expense category.

Request

<?xml version="1.0" encoding="utf-8"?>

  12

Response

<?xml version="1.0" encoding="utf-8"?>
	

category.list

Returns a list of expense categories.

Request

<?xml version="1.0" encoding="utf-8"?>


Response

<?xml version="1.0" encoding="utf-8"?>

  
    
      1
      Food
    
    
      2
      Parking
    
    ...