System Five Add-Ons & Integrations help simplify the way you do things.
Our catalog of services has topic-based, role-based, or technical plans that can help you maximize your software investment.
Copyright © 1984-present
Windward Software Systems Inc.
All Rights Reserved.
Privacy Policy
Use this as an example of how to use the Invoice/addInvoice end point to create an invoice in System Five. Take note of the sample JSON and the fields being passed. Review how customers work.
The example below shows required JSON to insert an Invoice when you know the Customer ID using the AddInvoice
Assumptions:
Common InvoiceType's in a System Five installation
JSON Invoice sample with CustomerUnique from how customers work. Note that InvoiceBilling is not completed.
{ "Invoice": [ { "InvoiceHeader": { "InvoiceSubTotal": 131, "InvoiceTaxTotal": 0, "InvoiceOrdered": "2020-01-09T22:10:46.416Z", "InvoiceDate": "2020-01-09T22:10:46.416Z", "InvoiceType": "W", "InvoiceSubType": "H", "InvoiceDepartment": 1, "InvoiceBookMonth": "2020-01-09T22:10:46.416Z", "InvoiceCustomer": 31649, "InvoiceShipTo": 31649, "InvoiceSalesman": 1, "ReferenceNo": "000000006" }, "InvoiceTenders": [ { "Type": "W", "Amount": 131 } ], "InvoiceLines": [ { "PartUnique": 18220, "Ordered": 2, "Price": 39 }, { "PartUnique": 19569, "Ordered": 1, "Price": 28 }, { "PartUnique": 5941, "Ordered": 1, "Description": " Date: 5/24/2019 5:50:11 PM", "Price": 22 } ] } ], "ConnectionInfo": { "TerminalNumber": 1 } }
JSON Invoice sample with customer information entered into InvoiceBilling which will create a new customer. No need to use /Inser_Retail_customer or /Update_retail_Customer. Note that the InvoiceCustomer field is missing as we are not providing an existing customer.
{ "Invoice": [ { "InvoiceHeader": { "InvoiceSubTotal": "35.99", "InvoiceTaxTotal": "6", "InvoiceOrdered": "2019-11-21", "InvoiceDate": "2019-11-21", "InvoiceType": "W", "InvoiceSubType": "H", "InvoiceDepartment": "1", "InvoiceBookMonth": "2019-11-21", "ReferenceNo": "000000038" }, "InvoiceLines": [ { "PartUnique": "14252", "Ordered": "1", "Price": "35.99" }, { "PartUnique": "5941", "Ordered": "1", "Description": " Date: 11/21/2019 4:47:11 PM", "Price": "14" } ], "InvoiceTenders": [ { "Type": "W", "Amount": "55.99" } ], "InvoiceBilling": { "AName": "Michelle MaBelle", "FirstName": "Michelle", "LastName": "MaBelle", "Address": "123 some St.", "City": "Nowhereville", "StateProvince": "BC", "Country": "CA", "ZipPostal": "V2A 1Z0" } } ], "ConnectionInfo": { "TerminalNumber": 0 } }
Another JSON Invoice sample without customer information entered into InvoiceBilling and using the InvoiceCustomer 125999.
{ "Invoice": [ { "InvoiceHeader": { "InvoiceSubTotal": "35.99", "InvoiceTaxTotal": "6", "InvoiceOrdered": "2019-11-21", "InvoiceDate": "2019-11-21", "InvoiceType": "W", "InvoiceSubType": "H", "InvoiceDepartment": "1", "InvoiceBookMonth": "2019-11-21", "InvoiceCustomer": "125999", "ReferenceNo": "000000038" }, "InvoiceLines": [ { "PartUnique": "14252", "Ordered": "1", "Price": "35.99" }, { "PartUnique": "5941", "Ordered": "1", "Description": " Date: 11/21/2019 4:47:11 PM", "Price": "14" } ], "InvoiceTenders": [ { "Type": "W", "Amount": "55.99" } ] } ], "ConnectionInfo": { "TerminalNumber": 0 } }
Back to WebAPI Samples