Updates a bill
Changed onIMPORTANT: This is a full-replace operation (PUT semantics). All fields must be included in the request body — omitting any field will set it to null, wiping existing data. Always call retrieve-a-bill first to fetch the current record, then include ALL existing fields in your update request along with your changes. Bills with line allocations return 422 BillHasSubsidiaryAllocations, even for a no-op update. These allocations cannot be sent through this API; edit the bill in Rillet instead.
Request
- Base URLhttps://api.rillet.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
UUID of the bill to be used in this operation.
Request body
Example request
{
"expense_number": "B123",
"items": [
{
"description": "API Bill",
"account_code": "11112",
"amount": {
"amount": "1.01",
"currency": "USD"
},
"tax_rate": {
"percentage": "0",
"tax_amount": {
"amount": "1.01",
"currency": "USD"
},
"country": "US"
}
}
],
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
],
"exchange_rate": {
"base": "USD",
"target": "USD"
}
}Response
OK
Example response
{
"expense_number": "B123",
"items": [
{
"description": "API Bill",
"account_code": "11112",
"amount": {
"amount": "1.01",
"currency": "USD"
},
"tax_rate": {
"percentage": "0",
"tax_amount": {
"amount": "1.01",
"currency": "USD"
},
"country": "US"
}
}
],
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
],
"exchange_rate": {
"base": "USD",
"target": "USD"
}
}Changes
- breaking
the
///////////request property type changed fromnumbertostring, and format from no format tonumber - breaking
the
///////////////response's property type changed fromnumbertostring, and format from no format tonumberfor status - breaking
the
////////////////response's property type changed fromnumbertostring, and format from no format tonumberfor status - warning
added the new
DRAFTenum value to the/response property for the response status - info
added the new optional request property
- info
added the optional property
////to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- breaking