Yuki Web service - Sales invoices
For customers that create their sales invoices with an automated system other than Yuki, for example online shops (like Magento) and ERP applications (for example AutoTask) there is a need for a electronic link with Yuki for the import of these sales invoices. This web service is specially developed for this purpose and offers an alternative for the manual input of sales invoices within the Yuki wen application.
In order to simplify the development process you will find two links to example applications with which you can call this web services method at the bottom of this article.
First define, if needed, the invoice settings
If you make use of the direct debit payment method in your invoices or if you want to email your sales invoices you first have to define the invoice settings. You will find these settings by clicking on the 'Settings' icon in the navigation bar and then click on 'Sales settings'. For a detailed description see article 'Sales settings'.
Compile the XML with the sales invoices
Gather the invoice data in a XML document and offer this file to our web service. The web service validates the XML document with the XML scheme (XSD). If the XML document doesn't pass through the validation the process will be cancelled and the web service will respond with a detailed validation notification.
Call the web service method with the relevant XML message
After the validation process has been completed successfully the invoices will be retrieved from the XML document and will be processed one by one. During the processing of an invoice new contact persons (customers) and products will be created automatically. Existing contact persons will be matched based on a reference or name and address details. Existing products will be matched based on the description. If product data like price, VAT rate or GL account number deviate from the data that is already saved then the new date will be included in the current invoice.
During the processing of an incomplete or an incorrectly drawn up invoice, the invoice will be cancelled whereby all processing already carried out will be undone. The possible creation of new contact persons and/or products will be reversed immediately. An invoice can be incomplete when for example new products are offered without prices or VAT rates or when new contact persons are offered without address details. An invoice that is entered correctly can. if desired, be emailed automatically to a customer as a document. If you have included the name of an existing layout in the XML document, this invoice layout will be used.
The status and the processing of invoices are determined based on a number of parameters that have to be specified per invoice.
For a functional description of the fields in the sales invoices XML see article Sales - Functional description of fields sales invoices XML.
ProcessSalesInvoices(sessionID, administrationId, xmlDoc)
Creates sales invoices based on the provided XML.
The session ID that is returned by the Authenticate(accessKey) method.
The identifier of the administration. For a description where to find the administrationID see article Administration ID.
The XML fragment with the sales invoices.