Invoice Item Categories
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 | DEPRECATED The page number to use in pagination. For instance, if you make a list request and receive 2000 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 2000. (Default: 2000) |
page
parameter.
For more information, visit the pagination guide.
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 ([email protected])"
Example Response:
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 ([email protected])"
Example Response:
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 ([email protected])" \
-X POST \
-H "Content-Type: application/json" \
-d '{"name":"Hosting"}'
Example Response:
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 ([email protected])" \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"name":"Expense"}'
Example Response:
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 ([email protected])" \
-X DELETE