Update Expense Report
PATCH /accounting/expense-reports/{id}
Group: Accounting › Expense Reports · Operation ID: updateExpenseReport
Updates the expense report with the given identifier. Only the fields in the request body change.
Only the fields in the request body change. Expense items change through three arrays, applied in the order delete, then update, then create, so one call can retire an item and add its replacement. updateExpenseItems and deleteExpenseItems address items by the id the report publishes, and an item id belonging to another report is refused with ITEM_NOT_FOUND. Omit all three to leave the items untouched. reimbursable stays derived: after the merge the report is reimbursable unless a surviving item sets it to false. The response is empty. Read the record with GET accounting/expense-reports/:id.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
Idempotency-Key |
header | string | no | An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored. |
id |
path | string | yes | The unique identifier for the expense report to update. |
Request body
Required, application/json: updateExpenseReportInput.
| Field | Type | Required | Description |
|---|---|---|---|
employeeId |
string | no | The employee the report belongs to, given as an id. See id on GET people/:id. Omit to leave unchanged. |
entityId |
string | no | The legal entity the report is posted under, given as an id. See id on GET base/entities. Omit to leave unchanged. |
reimbursementCurrency |
string | no | The currency the employee is reimbursed in. Format ISO 4217, for example 'USD'. Omit to leave unchanged. |
submittedDate |
string (date) | no | The date the report is submitted. Use format YYYY-MM-DD. Omit to leave unchanged. |
departmentId |
string | no | The department the report is charged to, given as an id. See id on GET departments/:id. Omit to leave unchanged. |
offsetAccountId |
string | no | The GL offset account for the reimbursement, given as an id. See id on GET accounting/accounts/:id. Omit to leave unchanged. |
externalExpenseReportId |
string | no | The identifier this report has in the upstream system that produced it. Omit to leave unchanged. |
externalUrl |
string | no | A link to the report in the upstream system that produced it. Omit to leave unchanged. |
origin |
string | no | The source system this report came from, as free-form text. Omit to leave unchanged. |
markAsPaid |
boolean | no | Whether the report is marked paid. Omit to leave unchanged. |
createExpenseItems |
array of object | no | The expense items to add. Omit for no additions. |
createExpenseItems[].amount |
string (decimal) | yes | The amount of the expense, as a decimal in this item's own currency. |
createExpenseItems[].currency |
string | yes | The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency. |
createExpenseItems[].billDate |
string (date) | yes | The date on the receipt. Use format YYYY-MM-DD. |
createExpenseItems[].merchant |
string | yes | The merchant the expense was paid to, as printed on the receipt. |
createExpenseItems[].expenseType |
string | yes | The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'. |
createExpenseItems[].description |
string | no | A description of the expense. |
createExpenseItems[].categoryId |
string | no | The expense category this item is booked under. See id on GET accounting/expense-categories/:id. |
createExpenseItems[].accountId |
string | no | The GL account this item posts to. See id on GET accounting/accounts/:id. Omit to let the category decide. |
createExpenseItems[].reimbursable |
boolean | no | Whether this item is reimbursed to the employee. Defaults to true. |
createExpenseItems[].externalExpenseItemId |
string | no | The identifier this item has in the upstream system that produced it. |
createExpenseItems[].origin |
string | no | The source system this item came from, as free-form text. |
createExpenseItems[].attendees |
string | no | Who attended, when the item's category requires it. Free text. |
createExpenseItems[].attachments |
array of object | no | Receipts for this item, each naming an already-uploaded file by its id. Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them. |
createExpenseItems[].attachments[].fileName |
string | yes | The display name of the attached file. |
createExpenseItems[].attachments[].fileId |
string | yes | The identifier of the already-uploaded file. There is no endpoint for it. |
updateExpenseItems |
array of object | no | The expense items to change, each addressed by the id the report publishes. Every field but the id is optional, and omitting one leaves it unchanged. Omit for no changes. |
updateExpenseItems[].id |
string | yes | The unique identifier for the expense item to change. It must belong to this report. |
updateExpenseItems[].amount |
string (decimal) | no | The amount of the expense, as a decimal in this item's own currency. |
updateExpenseItems[].currency |
string | no | The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency. |
updateExpenseItems[].billDate |
string (date) | no | The date on the receipt. Use format YYYY-MM-DD. |
updateExpenseItems[].merchant |
string | no | The merchant the expense was paid to, as printed on the receipt. |
updateExpenseItems[].expenseType |
string | no | The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'. |
updateExpenseItems[].description |
string | no | A description of the expense. |
updateExpenseItems[].categoryId |
string | no | The expense category this item is booked under. See id on GET accounting/expense-categories/:id. |
updateExpenseItems[].accountId |
string | no | The GL account this item posts to. See id on GET accounting/accounts/:id. Omit to let the category decide. |
updateExpenseItems[].reimbursable |
boolean | no | Whether this item is reimbursed to the employee. Defaults to true. |
updateExpenseItems[].externalExpenseItemId |
string | no | The identifier this item has in the upstream system that produced it. |
updateExpenseItems[].origin |
string | no | The source system this item came from, as free-form text. |
updateExpenseItems[].attendees |
string | no | Who attended, when the item's category requires it. Free text. |
updateExpenseItems[].attachments |
array of object | no | Receipts for this item, each naming an already-uploaded file by its id. Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them. |
updateExpenseItems[].attachments[].fileName |
string | yes | The display name of the attached file. |
updateExpenseItems[].attachments[].fileId |
string | yes | The identifier of the already-uploaded file. There is no endpoint for it. |
deleteExpenseItems |
array of string | no | The ids of expense items to remove, applied before the updates and creates. Each must belong to this report. Omit for no deletions. |
Example:
{
"employeeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reimbursementCurrency": "<reimbursementCurrency>",
"submittedDate": "2026-01-15",
"departmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"offsetAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalExpenseReportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalUrl": "<externalUrl>",
"origin": "<origin>",
"markAsPaid": true,
"createExpenseItems": [
{
"amount": "12.50",
"currency": "EUR",
"billDate": "2026-08-21",
"merchant": "Taxi",
"expenseType": "Pur"
}
],
"updateExpenseItems": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amount": "19.99",
"currency": "<currency>",
"billDate": "2026-01-15",
"merchant": "<merchant>",
"expenseType": "<expenseType>",
"description": "<description>",
"categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reimbursable": true,
"externalExpenseItemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"origin": "<origin>",
"attendees": "<attendees>",
"attachments": [
{
"fileName": "<fileName>",
"fileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}
],
"deleteExpenseItems": [
"<deleteExpenseItems>"
]
}
Response
200 Success
Response headers
Idempotency-Replayed— Present andtrueonly when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent asfalse.
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
REFERENCE_NOT_FOUND |
400 |
ITEM_NOT_FOUND |
400 |
TOO_MANY_LINES |
400 |
CATEGORY_REQUIREMENT_UNMET |
400 |
CATEGORY_INACTIVE |
400 |
ITEM_NEEDS_CATEGORY_OR_ACCOUNT |
400 |
IDEMPOTENCY_KEY_CONFLICT |
409 |
IDEMPOTENCY_PAYLOAD_MISMATCH |
422 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, ITEM_NOT_FOUND, TOO_MANY_LINES, CATEGORY_REQUIREMENT_UNMET, CATEGORY_INACTIVE, ITEM_NEEDS_CATEGORY_OR_ACCOUNT401— Missing or invalid access token403— Not authorized404— Not found409— The Idempotency-Key is still being processed by another request.422— The Idempotency-Key was already used with a different request payload.429— Too many requests500— Internal server error