Updates an invoice
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-an-invoice first to fetch the current record, then include ALL existing fields in your update request along with your changes. Exceptions that keep stored data when the field is omitted:
- metadata: omit it to keep all existing metadata, or send only the keys you want to set or clear.
- shipping_customer_id, billing_address_id, shipping_address_id: omit them to keep the invoice's current ship-to customer and addresses, or send null to clear them. This is for backward compatibility: integrations built before these fields existed won't clear them on every update.
- email_selection: omit it to keep the invoice's current recipients.
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 invoice to be used in this operation.
Request body
Example request
{
"items": [
{
"price": {
"discount": {
"amount_off": {
"amount": "1.01",
"currency": "USD"
}
},
"amount_per_unit": {
"amount": "1.01",
"currency": "USD"
}
},
"revenue": {
"account_code": "11112"
},
"tax_rate": {
"percentage": "0",
"tax_amount": {
"amount": "1.01",
"currency": "USD"
},
"country": "US"
}
}
],
"purchase_order_number": "1",
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
]
}Response
OK
Example response
{
"invoice_number": "INV01",
"items": [
{
"description": "Description",
"revenue": {
"account_code": "11112"
},
"total_amount": {
"amount": "1.01",
"currency": "USD"
},
"total_discount": {
"amount": "1.01",
"currency": "USD"
},
"taxed_amount": {
"amount": "1.01",
"currency": "USD"
},
"gross_rate": {
"amount": "1.01",
"currency": "USD"
},
"quantity": "1.0000",
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
]
}
],
"address": {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "Nashville",
"state": "TN",
"zip_code": "37201",
"country": "US"
},
"customer_address": {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "Nashville",
"state": "TN",
"zip_code": "37201",
"country": "US"
},
"shipping_address": {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "Nashville",
"state": "TN",
"zip_code": "37201",
"country": "US"
},
"net_amount": {
"amount": "1.01",
"currency": "USD"
},
"amount_due": {
"amount": "1.01",
"currency": "USD"
},
"total": {
"amount": "1.01",
"currency": "USD"
},
"subtotal": {
"amount": "1.01",
"currency": "USD"
},
"total_discount": {
"amount": "1.01",
"currency": "USD"
},
"purchase_order_number": "1",
"exchange_rate": {
"base": "USD",
"target": "USD"
},
"taxed_amount": {
"amount": "1.01",
"currency": "USD"
},
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
]
}Changes
- breaking
added to the
//////request propertyallOflist - breaking
the
//////request property type changed fromobjectto no type - breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
/became optional for the status - breaking
the
response's property type changed fromobjectto no type for status - breaking
the
//response's property type changed fromnumbertostring, and format from no format tonumberfor status - breaking
the
response's property type changed fromobjectto no type for status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - warning
removed the request property
/////// - warning
removed the request property
/////// - warning
removed the request property
/////// - warning
removed the request property
/////// - warning
removed the request property
/////// - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
added the new
PROGRESSenum value to the///response property for the response status - info
added the new optional request property
//// - info
added the new optional request property
//// - info
added the new optional request property
/////// - info
added the new optional request property
//// - info
added the new optional request property
//// - info
added the new optional request property
//// - info
added the new optional request property
//// - info
added the new
PROGRESSenum value to the request property/////// - info
added the new
PROGRESSenum value to the 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 to the
response propertyallOflist for the response status - info
added to the
response propertyallOflist for the response status - info
added the required property
to the response with the status - info
added the success response with the status
- breaking