Update expense
PUT
/api/expenses/{id}
const url = 'https://api.getvespy.com/api/expenses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amountCents":1,"category":"maintenance","categoryId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","description":"example","incurredOn":"2026-04-15","name":"example","vendorId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","vendorName":"example","workOrderId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.getvespy.com/api/expenses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amountCents": 1, "category": "maintenance", "categoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "description": "example", "incurredOn": "2026-04-15", "name": "example", "vendorId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "vendorName": "example", "workOrderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Any of:
object
amountCents
integer
category
string
categoryId
string format: uuid
description
string
incurredOn
string format: date
name
string
vendorId
required
string format: uuid
vendorName
string
workOrderId
string format: uuid
object
amountCents
integer
category
string
categoryId
string format: uuid
description
string
incurredOn
string format: date
name
string
vendorId
string format: uuid
vendorName
string
workOrderId
required
string format: uuid
object
amountCents
integer
category
string
categoryId
string format: uuid
description
string
incurredOn
string format: date
name
string
vendorId
string format: uuid
vendorName
required
string
workOrderId
string format: uuid
object
amountCents
integer
category
string
categoryId
required
string format: uuid
description
string
incurredOn
string format: date
name
string
vendorId
string format: uuid
vendorName
string
workOrderId
string format: uuid
object
amountCents
integer
category
required
string
categoryId
string format: uuid
description
string
incurredOn
string format: date
name
string
vendorId
string format: uuid
vendorName
string
workOrderId
string format: uuid
object
amountCents
integer
category
string
categoryId
string format: uuid
description
string
incurredOn
string format: date
name
required
string
vendorId
string format: uuid
vendorName
string
workOrderId
string format: uuid
object
amountCents
integer
category
string
categoryId
string format: uuid
description
required
string
incurredOn
string format: date
name
string
vendorId
string format: uuid
vendorName
string
workOrderId
string format: uuid
object
amountCents
required
integer
category
string
categoryId
string format: uuid
description
string
incurredOn
string format: date
name
string
vendorId
string format: uuid
vendorName
string
workOrderId
string format: uuid
object
amountCents
integer
category
string
categoryId
string format: uuid
description
string
incurredOn
required
string format: date
name
string
vendorId
string format: uuid
vendorName
string
workOrderId
string format: uuid
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
expense
required
object
amountCents
required
integer
amountPaidCents
required
integer
category
required
string
categoryId
required
string format: uuid
createdAt
required
string format: date-time
description
required
string
id
required
string format: uuid
incurredOn
required
string format: date
lastPaidAt
required
string format: date-time
lease
required
object
endDate
required
string format: date
id
required
string format: uuid
startDate
required
string format: date
status
required
string
leaseId
required
string format: uuid
name
required
string
organizationId
required
string format: uuid
outstandingCents
required
integer
owner
required
object
fullName
required
string
id
required
string format: uuid
ownerId
required
string format: uuid
paymentStatus
required
string
property
required
object
city
required
string
id
required
string format: uuid
name
required
string
state
required
string
propertyId
required
string format: uuid
status
required
string
unit
required
object
id
required
string format: uuid
unitNumber
required
string
unitId
required
string format: uuid
vendorId
required
string format: uuid
vendorName
required
string
workOrderId
required
string format: uuid
Example
{ "expense": { "category": "maintenance", "lease": { "status": "draft" }, "paymentStatus": "pending", "status": "active" }}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}