Update invoice
PUT/invoices/:invoiceId
API to update invoice by invoice id
Request
API Version
v3Invoice Id
- application/json
- Body
- Example (auto)
Bodyrequired
location Id / company Id based on altType
Alt Type
locationName to be updated
Title for the invoice
Currency
Description
Business details which need to be updated
Invoice Number
Id of the contact which you need to send the invoice
Terms notes, Also supports HTML markups
Automatic taxes enabled for the Invoice
Payment mode
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
split invoice into payment schedule summing up to full invoice amount
tips configuration for the invoice
prefix for invoice number
Payment Methods for Invoices
attachments for the invoice
miscellaneous charges for the invoice
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"title": "INVOICE",
"currency": "USD",
"description": "ABC Corp payments",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "USA",
"postalCode": "559-6993"
},
"phoneNo": "+1-214-559-6993",
"website": "www.example.com"
},
"invoiceNumber": "1001",
"contactId": "6578278e879ad2646715ba9c",
"contactDetails": {
"id": "6578278e879ad2646715ba9c",
"name": "Alex",
"phoneNo": "+1234567890",
"additionalEmails": [
{
}
],
"companyName": "ABC Corp.",
"address": {
"addressLine1": "9931 Beechwood",
"addressLine2": "Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "US",
"postalCode": "559-6993"
},
"customFields": [
"string"
]
},
"termsNotes": "<p>This is a default terms.</p>",
"discount": {
"value": 10,
"type": "percentage",
"validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
},
"invoiceItems": [
{
"name": "ABC Product",
"description": "ABC Corp.",
"productId": "6578278e879ad2646715ba9c",
"priceId": "6578278e879ad2646715ba9c",
"currency": "USD",
"amount": 999,
"qty": 1,
"taxes": [
{
"_id": "string",
"name": "string",
"rate": 0,
"calculation": "exclusive",
"description": "string",
"taxId": "string"
}
],
"automaticTaxCategoryId": "6578278e879ad2646715ba9c",
"isSetupFeeItem": true,
"type": "one_time",
"taxInclusive": true
}
],
"automaticTaxesEnabled": true,
"liveMode": true,
"issueDate": "2023-01-01",
"dueDate": "2023-01-14",
"paymentSchedule": {
"type": "percentage",
"schedules": [
"string"
]
},
"tipsConfiguration": {
"tipsPercentage": [
5,
10,
15
],
"tipsEnabled": true
},
"xeroDetails": {},
"invoiceNumberPrefix": "INV-",
"paymentMethods": {
"stripe": {
"enableBankDebitOnly": false
}
},
"attachments": [
{
"id": "6241712be68f7a98102ba272",
"name": "Electronics.pdf",
"url": "https://example.com/digital-delivery",
"type": "string",
"size": 10000
}
],
"miscellaneousCharges": {
"charges": [
null
],
"collectedMiscellaneousCharges": 10,
"paidCharges": [
{
"name": "Processing Fee",
"charge": 10,
"amount": 10,
"_id": "673d01d7d547648a8dab6211"
}
]
}
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
Invoice Id
Invoice Status
draftsentpayment_processingpaidvoidpartially_paidLive Mode
Amount Paid
Location Id or Agency Id
locationName of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "USA",
"postalCode": "559-6993"
},
"phoneNo": "+1-214-559-6993",
"website": "www.example.com"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"total": 999,
"title": "INVOICE",
"amountDue": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z",
"automaticTaxesEnabled": true,
"automaticTaxesCalculated": true,
"paymentSchedule": {}
}