Update Expense
Description:
The /expense/{id}
endpoint allows updating details of a specific expense record.
Method:
PUT
Path Parameter:
Parameter | Type | Description |
---|---|---|
id | string | The unique identifier of the expense record |
Request Payload:
Parameter | Type | Description |
---|---|---|
title | string | Updated title/description |
type | string | Updated expense type |
amount | number | Updated expense amount |
amountUSD | number | Updated USD amount |
currency | string | Updated currency |
transactionDate | string | Updated transaction date |
split | array | Updated split information |
memo | string | Updated notes |
curl --request PUT \
--url https://server26-dot-royalti-project.uc.r.appspot.com/expense/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "<string>",
"type": "product",
"amount": 123,
"amountUSD": 123,
"currency": "<string>",
"conversionRate": 123,
"transactionDate": "2023-12-25",
"split": [
{}
],
"memo": "<string>",
"files": {}
}'
{
"message": "Expense updated successfully"
}
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Expense ID
Success
The response is of type object
.
curl --request PUT \
--url https://server26-dot-royalti-project.uc.r.appspot.com/expense/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "<string>",
"type": "product",
"amount": 123,
"amountUSD": 123,
"currency": "<string>",
"conversionRate": 123,
"transactionDate": "2023-12-25",
"split": [
{}
],
"memo": "<string>",
"files": {}
}'
{
"message": "Expense updated successfully"
}