Skip to Content
DevelopersAPI referenceExpenses

Update expense

PATCH
/v1/expenses/{id}

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (blk_…) from Settings → API keys.

Path Parameters

id*string

Request Body

application/json
  1. body
spentOn?string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatdate
vendor?|
Lengthlength <= 200
description?|
Lengthlength <= 1000
categoryId?|
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
amount?integer
Range1 <= value <= 10000000000
taxAmount?integer
Range0 <= value <= 9007199254740991
currency?string
Match^[A-Z]{3}$
Length3 <= length <= 3
paymentMethod?string
Value in"bank_transfer""card""cash""mobile_wallet""other"
reference?|
Lengthlength <= 200
clientId?|
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
projectId?|
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
billable?boolean

Response Body

application/json
  1. response
id*string
spentOn*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatdate
vendor*string|null
description*string|null
categoryId*string|null
categoryName*string|null
amount*integer
Range-9007199254740991 <= value <= 9007199254740991
taxAmount*integer
Range-9007199254740991 <= value <= 9007199254740991
currency*string
paymentMethod*string
Value in"bank_transfer""card""cash""mobile_wallet""other"
reference*string|null
clientId*string|null
clientName*string|null
projectId*string|null
projectName*string|null
billable*boolean
invoiceId*string|null
invoiceNumber*string|null
receipt*|null
createdAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
Example Request
curl -X PATCH 'https://your-billleaf-api/v1/expenses/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response200
{  "id": "string",  "spentOn": "2019-08-24",  "vendor": "string",  "description": "string",  "categoryId": "string",  "categoryName": "string",  "amount": -9007199254740991,  "taxAmount": -9007199254740991,  "currency": "string",  "paymentMethod": "bank_transfer",  "reference": "string",  "clientId": "string",  "clientName": "string",  "projectId": "string",  "projectName": "string",  "billable": true,  "invoiceId": "string",  "invoiceNumber": "string",  "receipt": {    "filename": "string",    "contentType": "string",    "url": "string"  },  "createdAt": "2019-08-24T14:15:22Z"}