Invoice
Called whenever an invoice is created
Schema
_id
stringstatus
stringliveMode
booleanamountPaid
numberaltId
stringaltType
stringname
stringbusinessDetails
objectname
stringaddress
stringphoneNo
stringwebsite
stringlogoUrl
stringcustomValues
array[string]invoiceNumber
stringcurrency
stringcontactDetails
objectid
stringphoneNo
stringemail
stringcustomFields
array[string]name
stringaddress
objectadditionalEmails
array[object]companyName
stringissueDate
stringdueDate
stringdiscount
objecttype
stringvalue
numberinvoiceItems
array[object]taxes
array_id
stringproductId
stringpriceId
stringcurrency
stringname
stringqty
numberamount
numbertotal
numbertitle
stringamountDue
numbercreatedAt
stringupdatedAt
stringtotalSummary
objectsubTotal
numberdiscount
numberExample
{"_id": "6578278e879ad2646715ba9c","status": "draft","liveMode": false,"amountPaid": 0,"altId": "6578278e879ad2646715ba9c","altType": "location","name": "New Invoice","businessDetails": {"name": "ABC Corp.","address": "9931 Beechwood, TX","phoneNo": "+1-214-559-6993","website": "wwww.example.com","logoUrl": "https://example.com/logo.png","customValues": ["string"]},"invoiceNumber": "19","currency": "USD","contactDetails": {"id": "6578278e879ad2646715ba9c","phoneNo": "+1-214-559-6993","email": "alex@example.com","customFields": ["string"],"name": "Alex","address": {"countryCode": "US","addressLine1": "9931 Beechwood","addressLine2": "Beechwood","city": "St. Houston","state": "TX","postalCode": "559-6993"},"additionalEmails": [{"email": "alex@example.com"}],"companyName": "ABC Corp."},"issueDate": "2023-01-01","dueDate": "2023-01-01","discount": {"type": "percentage","value": 10},"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","totalSummary": {"subTotal": 999,"discount": 0}}