Planned Expenses
A planned expense is committed future spend on a project row of the Forecast board — a purchase order, a subcontractor, a licence — which the board adds to that project’s forecast cost, and to its forecast revenue when it is re-billed to the client; it is the plan, not money already spent, so there is nothing to reconcile with a Harvest expense. This page covers listing the plan, reading one row back, and creating, editing and deleting one.
The planned expense object
| Attribute | Type | Description |
|---|---|---|
id |
integer | Unique ID for the planned expense. |
project_id |
integer | The board project the spend is committed against. It is set on create and never changes: the amount is denominated in that project’s currency, so a move would silently re-label a committed figure. |
description |
string | What the spend is for, up to 255 characters. |
amount |
decimal | The committed amount, in currency, with at most two decimal places. It must be greater than 0 and less than 1,000,000,000. |
currency |
string | The three-letter ISO 4217 code the amount is denominated in. It is stamped from the project’s currency — the project’s own code, then its client’s, then the account’s — when the expense is created, and it never changes afterwards, so editing the project’s currency later never re-labels a committed amount. There is no conversion between currencies. |
expected_on |
date | The day the spend is expected. |
billable |
boolean | true when the expense is re-billed to the client, so it also counts towards the project’s forecast revenue. Defaults to false. |
expense_category |
object | The account expense category the expense is filed under, or null when it is uncategorised. See the expense category object. A row keeps the category it was filed under even after that category is archived. |
updated_at |
datetime | Date and time the expense was last updated. Use the ISO 8601 Format. |
The expense category object
| Attribute | Type | Description |
|---|---|---|
id |
integer | Unique ID for the expense category. |
name |
string | Name of the expense category. |
is_active |
boolean | false once the category has been archived in Harvest, which is how /v2/expense_categories reports the same state. An archived category stays on the rows already filed under it. |
Required permissions
Both halves of this surface are behind the same two account switches, checked in this order, and both refusals are the account’s rather than the caller’s:
- the account must be in the Forecast financials rollout, or every request
answers
403withForecast financials are not enabled for this account; - the account’s Project financial estimates switch must be on, or every request
answers
403withProject financial estimates are turned off for this account.
On top of those, the caller must be allowed to see cost rates, or the request
answers 403 with Not authorized! — a planned expense is cost data, and the
cost-rate permission is an ordinary one, so its refusal keeps the generic wording.
On the list, the two switches are the first gates a request meets. On the write half the shared Forecast account and caller gates described below answer before them, so the order a caller sees the refusals in depends on which half it calls.
The two caller-side gates are worded differently on the read and on the write, because the two halves do not share a controller:
- the list is served by the collection endpoint, which answers one message for a
caller with no Forecast seat, no board scope, or a company whose permissions
regime is not ready:
403withForecast access is required for this endpoint. It is asked of the same predicate the board asks, so a caller who can open the board can list the plan. - the member read and the three writes inherit the Forecast base controller, so
the account gate and the caller gate are the shared Forecast ones:
403withForecast is not enabled for this accountwhen the account has no Forecast board or is not on the permissions framework the caller’s scopes are written in, and403withForecast is not enabled for this userwhen the caller has no Forecast seat or no claim that grants a board scope.
Creating, editing and deleting additionally need a Forecast write claim and an
account that is not read-only: a caller who can read the plan but not write it
answers 403 with Forecast editing access is required. Retrieving one expense
is the dependent read of a write, so it does not need it — a read-only seat reads
back the row it can list.
A write is then bounded per project, by the caller’s edit scope. A caller scoped
to the whole plan may write an expense on any project; a caller scoped to the
projects they manage may write only expenses on those projects, and naming
another project answers 403 with Not authorized!. A caller scoped to their own
schedule has no planned expenses at all: their list is empty and every row answers
404 with Record not found.
The shared Forecast gates, the beta contract, pagination and the error envelope
are on the Forecast API overview.
The amounts listed here are the cost side of
the project financials.
List planned expenses
Beta endpoint. Fully available, but the response shape may still change. Until it is frozen, every response includes
Harvest-Api-Stability: beta.
Returns the committed spend on every project the caller’s board shows, ordered by
expected_on and then by id. The read is not windowed: it is the whole plan,
not a date range.
There is no project or date filter. A project_id, client_id, from, to or
scope sent in the query string is ignored rather than honoured — the scope is
resolved from the token’s user, never from a request parameter. A row on a project
that has been archived, or that is not on the board, is absent from the list.
The response contains an object with a planned_expenses property that contains
an array of up to per_page planned expense objects, plus the pagination
properties and the two completeness fields. truncated reports whether the
board’s own project list was cut at 2,500 projects, which is the only cap that can
omit rows from this list; truncation.projects carries that cap when it was
reached and null otherwise. The cap is reported on every page, so following
next_page to the end does not clear it — and pagination counts the rows within
the cap, so total_entries describes the listed subset, not the plan a truncated
board holds.
A page past the last one answers an empty array with the plan’s total_entries
rather than an error.
GET /v2/forecast/planned_expenses
| Parameter | Type | Description |
|---|---|---|
page |
integer | The page number to use in pagination. (Default: 1) It must be an integer greater than 0, and no larger than 2305843009213693; a larger one is refused with 422 rather than answered with an empty page. |
per_page |
integer | The number of records to return per page. Can range between 1 and 2000. (Default: 2000) |
cursor |
string | Accepted and ignored: this collection is paged by offset only. A malformed value is still refused with 422 by the shared cursor validator. |
updated_since |
datetime | Not supported: an archived project removes its rows without stamping them, so a delta would silently miss exactly those rows. Any value is refused with 422; an empty one is treated as absent. |
Example Request:
curl "https://api.harvestapp.com/v2/forecast/planned_expenses?per_page=100" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"planned_expenses": [
{
"id": 5128841,
"project_id": 1428577,
"description": "Hosting — annual renewal",
"amount": 2400.0,
"currency": "USD",
"expected_on": "2026-05-01",
"billable": false,
"expense_category": {
"id": 88412,
"name": "Lodging",
"is_active": true
},
"updated_at": "2026-04-18T14:02:37Z"
},
{
"id": 5128846,
"project_id": 1428577,
"description": "Subcontractor — Q3 build",
"amount": 1500.5,
"currency": "USD",
"expected_on": "2026-06-01",
"billable": true,
"expense_category": null,
"updated_at": "2026-05-22T09:41:05Z"
}
],
"truncated": false,
"truncation": {
"projects": null
},
"per_page": 100,
"total_pages": 1,
"total_entries": 2,
"next_page": null,
"previous_page": null,
"page": 1,
"links": {
"first": "https://api.harvestapp.com/v2/forecast/planned_expenses?per_page=100&page=1",
"next": null,
"previous": null,
"last": "https://api.harvestapp.com/v2/forecast/planned_expenses?per_page=100&page=1"
}
}Retrieve a planned expense
Beta endpoint. Fully available, but the response shape may still change. Until it is frozen, every response includes
Harvest-Api-Stability: beta.
Returns one planned expense and a 200 OK response code. It is the read a
create’s Location header points at, and how a client confirms a write whose
response it never saw.
The row must be one this caller may see: another company’s expense, an unknown
id, a malformed id such as 5128841abc, and a row on a project outside the
caller’s board scope all answer 404 with Record not found. The test is the
caller’s scope tier rather than the board’s current project list, so a row on a
project that has been archived, or that is not yet on the board, is still
readable here — and it is still editable, since it is a row the caller could have
created.
GET /v2/forecast/planned_expenses/{PLANNED_EXPENSE_ID}
Example Request:
curl "https://api.harvestapp.com/v2/forecast/planned_expenses/5128846" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"id": 5128846,
"project_id": 1428577,
"description": "Subcontractor — Q3 build",
"amount": 1500.5,
"currency": "USD",
"expected_on": "2026-06-01",
"billable": true,
"expense_category": null,
"updated_at": "2026-05-22T09:41:05Z"
}Create a planned expense
Beta endpoint. Fully available, but the response shape may still change. Until it is frozen, every response includes
Harvest-Api-Stability: beta.
Commits a planned expense to a project and returns it with a 201 Created
response code and a Location header holding the URL of the new expense. The
body answered is the same field set show serves, so the Location reads back
the row that was created.
The body is read as a JSON object, and only the fields below are writable.
currency_code is not one of them: the currency is stamped from the project on
create, and a client that sends one is ignored rather than re-denominating a
committed amount. company_id and updated_by_id are server-set and ignored if
sent.
The project is the record’s gate as well as its owner. project_id must name a
project the caller may write: a project outside the caller’s edit scope answers
403 with Not authorized!, and a project that is not the account’s own — an
unknown id, or another company’s project — is refused by the model with 422 and
Project can't be blank or Project must belong to the same company. A project
that is simply archived or not yet on the board is not refused: the row is a real
row and stays readable through show.
A create is not idempotent: two identical requests commit two expenses.
A write does not touch the project it belongs to — no project updated_at moves,
no notification or email is sent, and no Activity Log entry is written.
POST /v2/forecast/planned_expenses
| Parameter | Type | Description |
|---|---|---|
project_id |
integer | Required. The board project to commit the spend against, as a positive id. It cannot be changed after the create. |
description |
string | Required. What the spend is for, up to 255 characters. |
amount |
decimal | Required. The committed amount, greater than 0, less than 1,000,000,000, with at most two decimal places. A plain numeric string such as "1500.50" is accepted; a grouped or comma-decimal one such as "1,500.00" is refused rather than truncated. |
expected_on |
date | Required. The day the spend is expected, as YYYY-MM-DD, between 1000-01-01 and 9999-12-31. A shortened date such as 26-06-01 is refused rather than filed under another year. |
expense_category_id |
integer | The account expense category to file the expense under, as a positive id. It must be one of the account’s active, amount-based categories. Omit it, or send null or an empty string, to leave the expense uncategorised. |
billable |
boolean | Whether the expense is re-billed to the client. Defaults to false. Accepts true, false, 1, 0, "true", "false", "1" and "0"; any other value is refused rather than coerced. |
Example Request:
curl -X POST "https://api.harvestapp.com/v2/forecast/planned_expenses" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp ([email protected])" \
-d '{"project_id": 1428577, "description": "Subcontractor — Q3 build", "amount": 1500.50, "expected_on": "2026-06-01", "expense_category_id": 88412, "billable": true}'
Example Response:
{
"id": 5128846,
"project_id": 1428577,
"description": "Subcontractor — Q3 build",
"amount": 1500.5,
"currency": "USD",
"expected_on": "2026-06-01",
"billable": true,
"expense_category": {
"id": 88412,
"name": "Lodging",
"is_active": true
},
"updated_at": "2026-11-17T09:24:11Z"
}Update a planned expense
Beta endpoint. Fully available, but the response shape may still change. Until it is frozen, every response includes
Harvest-Api-Stability: beta.
Edits the fields a client may change and returns the expense with a 200 OK
response code. The body is partial: an attribute it omits keeps its stored value,
and a body that repeats the stored values is a no-op that answers the same row
with the same updated_at.
An expense cannot move to another project, because the amount is denominated in
the project’s currency. A body that names the project the expense is already on
is not a move, so the natural full-row edit — read the row, change one field, send
it back — succeeds and the field is ignored. A body that names any other project
answers 422 with A planned expense can't move to another project and the row
is unchanged.
The body’s shape is settled before the row is looked up, so a malformed field
answers 422 even when the id is unknown. Once the body is well formed, the
record decides: an unknown id, another company’s expense, a malformed id, or a row
outside the caller’s board scope answers 404 with Record not found.
PATCH /v2/forecast/planned_expenses/{PLANNED_EXPENSE_ID}
| Parameter | Type | Description |
|---|---|---|
description |
string | What the spend is for, up to 255 characters. |
amount |
decimal | The committed amount, greater than 0, less than 1,000,000,000, with at most two decimal places. |
expected_on |
date | The day the spend is expected, as YYYY-MM-DD, between 1000-01-01 and 9999-12-31. |
expense_category_id |
integer | The account expense category to file the expense under, as a positive id. It must be one of the account’s active, amount-based categories. An empty string clears the category. A category that was archived after the expense was filed stays on the row, and an edit that does not name a category does not re-check it. |
billable |
boolean | Whether the expense is re-billed to the client. |
project_id |
integer | Accepted only when it names the project the expense is already on, where it is ignored. Any other project is refused with 422. |
Example Request:
curl -X PATCH "https://api.harvestapp.com/v2/forecast/planned_expenses/5128846" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp ([email protected])" \
-d '{"description": "Subcontractor — Q3 and Q4 build", "amount": 2750.75, "expected_on": "2026-07-15"}'
Example Response:
{
"id": 5128846,
"project_id": 1428577,
"description": "Subcontractor — Q3 and Q4 build",
"amount": 2750.75,
"currency": "USD",
"expected_on": "2026-07-15",
"billable": true,
"expense_category": {
"id": 88412,
"name": "Lodging",
"is_active": true
},
"updated_at": "2026-11-17T10:06:48Z"
}Delete a planned expense
Beta endpoint. Fully available, but the response shape may still change. Until it is frozen, every response includes
Harvest-Api-Stability: beta.
Deletes a planned expense and returns the expense it deleted with a 200 OK
response code — the same body show served, not a 204 No Content and not an
empty body, so a client can confirm which row went. Nothing references a planned
expense, so the delete is real rather than an archive, and a second delete of the
same id answers 404 with Record not found.
A row outside the caller’s board scope, another company’s expense or an unknown
id cannot be deleted and answers 404 with Record not found. A row the caller
can read but may not write answers 403 with Forecast editing access is
required, and one on a project outside their edit scope answers 403 with
Not authorized!.
DELETE /v2/forecast/planned_expenses/{PLANNED_EXPENSE_ID}
Example Request:
curl -X DELETE "https://api.harvestapp.com/v2/forecast/planned_expenses/5128846" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"id": 5128846,
"project_id": 1428577,
"description": "Subcontractor — Q3 and Q4 build",
"amount": 2750.75,
"currency": "USD",
"expected_on": "2026-07-15",
"billable": true,
"expense_category": {
"id": 88412,
"name": "Lodging",
"is_active": true
},
"updated_at": "2026-11-17T10:06:48Z"
}Errors
| Status | When |
|---|---|
400 |
On the list, a page or per_page value is not an integer or is outside its range (Invalid page parameter: must be an integer, Invalid page parameter: must be greater than 0, Invalid per_page parameter: must be an integer, Invalid per_page parameter: must be from 1 to 2000), or an updated_since is not an ISO 8601 datetime (Invalid updated_since datetime provided: "<value>"). A write ignores the list parameters rather than refusing them. |
401 |
Authentication failed: Authentication failed for API request. |
403 |
The account is outside the Forecast financials rollout (Forecast financials are not enabled for this account), or its Project financial estimates switch is off (Project financial estimates are turned off for this account), on either half. On the list, the caller has no Forecast seat, no board scope, or is in a company whose permissions regime is not ready (Forecast access is required for this endpoint). On the member read and the writes, the account has no Forecast board or is not on the permissions framework (Forecast is not enabled for this account), and a caller without a Forecast seat or claim gets Forecast is not enabled for this user. The caller may not see cost rates (Not authorized!); a write comes from a caller who can read the plan but not write it (Forecast editing access is required); or a write names a project outside the caller’s edit scope (Not authorized!). |
404 |
The id names no expense this caller can reach, with the same message in every case — Record not found: an unknown id, a malformed id such as 5128841abc, another company’s expense, a row on a project outside the caller’s board scope, a row already deleted, or an expense destroyed between the lookup and the write. |
406 |
The Accept header admits neither JSON nor */*. |
409 |
The account’s Forecast schedule is being imported, so no write is accepted: Your Forecast schedule is being imported, so this change wasn’t saved. Try again once the import finishes. with error_code: "migration_in_progress". Or the row is locked by a concurrent edit: This planned expense is being changed by someone else. Try again. with error_code: "locked". The import freeze answers last: the account gates, the body preflight and the lookup all answer before it, so a malformed body is still 422 and an unresolvable id still 404 during an import. |
415 |
A request body was sent with a media type other than JSON or form data: Content-Type header required to be application/json, got ... |
422 |
On the list: an updated_since (The updated_since parameter is not supported on this endpoint: an archived project removes rows without stamping them, so a delta would silently miss them), a malformed cursor (Invalid cursor parameter, Invalid cursor parameter: must not be empty, Invalid cursor parameter: must be a valid base64 encoded JSON string), or a page past 2305843009213693 (Invalid page parameter: must be from 1 to 2305843009213693). On a write: a body that is not a JSON object (Invalid body: must be a JSON object, with error_code: "invalid_planned_expense"); a field sent as an array or an object where a single value is expected (Invalid <field> parameter: must be a single value, every offending field named in one message, joined with , ); an amount that is not a number or has more than two decimal places (Invalid amount parameter: must be a number, Invalid amount parameter: must have at most 2 decimal places); an expected_on that is not a YYYY-MM-DD date or that the date column cannot hold (Invalid expected_on date provided: '<value>', expected_on must be a date between 1000-01-01 and 9999-12-31); an expense_category_id that is not a plain positive id (Invalid expense_category_id parameter: must be a positive expense category id); a project_id that is not a plain positive id (project_id must be a positive project id); a billable that is not a boolean (billable must be a boolean, with error_code: "invalid_boolean_param"); a project named on an edit (A planned expense can't move to another project); or a row the model refuses (Description can't be blank, Description is too long (maximum is 255 characters), Amount can't be blank, Amount is not a number, Amount must be greater than 0, Amount must be less than 1000000000, Expected on can't be blank, Billable is not included in the list, Project can't be blank, Project must belong to the same company, Expense category must be one of the company’s active expense categories, Expense category can’t be a unit-based category). A write refusal carries error_code: "invalid_planned_expense" with its messages in errors, except a non-boolean billable, which carries error_code: "invalid_boolean_param", and the field-shape preflight, which answers message alone. |