Admin or project manager permissions required.

The invoice item category object

Attribute Type Description
id integer Unique ID for the invoice item category.
name string The name of the invoice item category.
use_as_service boolean Whether this invoice item category is used for billable hours when generating an invoice.
use_as_expense boolean Whether this invoice item category is used for expenses when generating an invoice.
created_at datetime Date and time the invoice item category was created.
updated_at datetime Date and time the invoice item category was last updated.

List all invoice item categories

Returns a list of your invoice item categories. The invoice item categories are returned sorted by creation date, with the most recently created invoice item categories appearing first.

The response contains an object with a invoice_item_categories property that contains an array of up to per_page invoice item categories. Each entry in the array is a separate invoice item category object. If no more invoice item categories are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your invoice item categories.

GET /v2/invoice_item_categories
Parameter Type Description
updated_since datetime Only return invoice item categories that have been updated since the given date and time.
page integer The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)
per_page integer The number of records to return per page. Can range between 1 and 100. (Default: 100)

Example Request:

curl "https://api.harvestapp.com/v2/invoice_item_categories" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)"

Example Response:

{
"invoice_item_categories":[
{
"id":1466293,
"name":"Product",
"use_as_service":false,
"use_as_expense":true,
"created_at":"2017-06-26T20:41:00Z",
"updated_at":"2017-06-26T20:41:00Z"
},
{
"id":1466292,
"name":"Service",
"use_as_service":true,
"use_as_expense":false,
"created_at":"2017-06-26T20:41:00Z",
"updated_at":"2017-06-26T20:41:00Z"
}
],
"per_page":100,
"total_pages":1,
"total_entries":2,
"next_page":null,
"previous_page":null,
"page":1,
"links":{
"first":"https://api.harvestapp.com/v2/invoice_item_categories?page=1&per_page=100",
"next":null,
"previous":null,
"last":"https://api.harvestapp.com/v2/invoice_item_categories?page=1&per_page=100"
}
}

Retrieve an invoice item category

Retrieves the invoice item category with the given ID. Returns an invoice item category object and a 200 OK response code if a valid identifier was provided.

GET /v2/invoice_item_categories/{INVOICE_ITEM_CATEGORY_ID}

Example Request:

curl "https://api.harvestapp.com/v2/invoice_item_categories/1466293" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)"

Example Response:

{
"id":1466293,
"name":"Product",
"use_as_service":false,
"use_as_expense":true,
"created_at":"2017-06-26T20:41:00Z",
"updated_at":"2017-06-26T20:41:00Z"
}

Create an invoice item category

Creates a new invoice item category object. Returns an invoice item category object and a 201 Created response code if the call succeeded.

POST /v2/invoice_item_categories
Parameter Type Required Description
name string required The name of the invoice item category.

Example Request:

curl "https://api.harvestapp.com/v2/invoice_item_categories" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"name":"Hosting"}'

Example Response:

{
"id":1467098,
"name":"Hosting",
"use_as_service":false,
"use_as_expense":false,
"created_at":"2017-06-27T16:20:59Z",
"updated_at":"2017-06-27T16:20:59Z"
}

Update an invoice item category

Updates the specific invoice item category by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns an invoice item category object and a 200 OK response code if the call succeeded.

PATCH /v2/invoice_item_categories/{INVOICE_ITEM_CATEGORY_ID}
Parameter Type Description
name string The name of the invoice item category.

Example Request:

curl "https://api.harvestapp.com/v2/invoice_item_categories/1467098" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"name":"Expense"}'

Example Response:

{
"id":1467098,
"name":"Expense",
"use_as_service":false,
"use_as_expense":false,
"created_at":"2017-06-27T16:20:59Z",
"updated_at":"2017-06-27T16:21:26Z"
}

Delete an invoice item category

Delete an invoice item category. Deleting an invoice item category is only possible if use_as_service and use_as_expense are both false. Returns a 200 OK response code if the call succeeded.

DELETE /v2/invoice_item_categories/{INVOICE_ITEM_CATEGORY_ID}

Example Request:

curl "https://api.harvestapp.com/v2/invoice_item_categories/1467098" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X DELETE