Update expense information for a transaction
This endpoint updates expense information for an existing transaction.
Prerequisites:
To use this endpoint you need to have the ACCOUNTING scope for the API Key. Please contact your relation manager to get this permission.
Eligibility: The transaction type must be enabled in the business partner expense settings targets.
Request Body:
- category: Expense category IRI.
- costCenter: Expense cost center IRI.
- vatRate: Array of 1-3 VAT rates.
- vatAmount: Array of 1-3 VAT gross amounts.
- note: Optional comment.
Async Notice: Expense completion is calculated asynchronously. The expenseCompletedAt value in the response may reflect the last stored state and update shortly after processing.
Validation Errors: Responses return status 422 with an errors array containing field, code, and message. Possible code values include:
- transaction.type.not_supported
- input.category.not_valid
- input.cost_center.not_valid
- input.vat_rate.not_valid
- input.vat_amount.not_valid
- input.comment.not_valid
- expense.vat.not_valid
- expense.category.transaction_type_not_allowed
- expense.cost_center.transaction_type_not_allowed
- expense.category.card_group_not_allowed
- expense.cost_center.card_group_not_allowed
- invalid
Path Parameters
- id string required
Transaction identifier
- application/json
Request Body required
- category stringnull
- costCenter stringnull
- vatRate string[]
- vatAmount string[]
- note stringnull
- 401
- 403
- 422
Unauthorised -- Your access token is wrong.
- application/json
- Schema
- Example (from schema)
Schema
- type string
- title string
- detail string
{
"type": "string",
"title": "string",
"detail": "string"
}
Forbidden -- Access to the requested resource or action is forbidden.
- application/json
- Schema
- Example (from schema)
Schema
- type string
- title string
- detail string
{
"type": "string",
"title": "string",
"detail": "string"
}
Unprocessable Content -- We could not process your request due to invalid data provided.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- status integer
- message string
errors object[]
Array [field stringcode stringmessage string]
{
"status": 422,
"message": "Validation failed",
"errors": [
{
"field": "category",
"code": "input.category.not_valid",
"message": "Category is not valid."
}
]
}
{
"status": 422,
"message": "Validation failed",
"errors": [
{
"field": "category",
"code": "input.category.not_valid",
"message": "Category is not valid."
},
{
"field": "vatRate",
"code": "input.vat_rate.not_valid",
"message": "VAT rate must be an array of 1-3 numeric values."
}
]
}