Edit Invoice
Prod Env
{{subdomain}}/api2
Prod Env
{{subdomain}}/api2
PUT
{{subdomain}}/api2
Last modified:2025-03-23 22:41:10
Maintainer:Not configured
id
: Invoice ID (required)date
(string): Invoice date (YYYY-MM-DD)due_date
(string): Due date (YYYY-MM-DD)notes
(string): Invoice notesdiscount
(number): Invoice-level discount amountdiscount_type
(integer): Discount type (1: percentage, 2: fixed amount)id
along with the fields to updateid
field and include required item fields{
"result": "success",
"code": 200,
"data": {
"Invoice": {
"id": 123,
// Updated invoice fields...
}
},
"message": "Invoice updated successfully"
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request PUT '{{subdomain}}/api2/api2/invoices/{{id}}.json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"Invoice": {
"date": "2023-03-24",
"notes": "Updated invoice notes",
"discount": 5,
"discount_type": 1,
"InvoiceItem": [
{
"id": 456,
"quantity": 2,
"unit_price": 95
},
{
"product_id": 3,
"quantity": 1,
"unit_price": 75,
"description": "New item added during update"
}
]
}
}'
Response Response Example
200 - Success Response
{
"result": "success",
"code": 200,
"data": {
"Invoice": {
"id": 123,
"number": "INV-2023-001",
"client_id": 15,
"date": "2023-03-24",
"due_date": "2023-04-22",
"total": 114,
"discount": 5,
"discount_type": 1,
"notes": "Updated invoice notes",
"modified": "2023-03-23 16:45:22"
}
},
"message": "Invoice updated successfully"
}
Request
Body Params text/plain