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.


Procedure


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 the 'Settings' icon on the navigation bar and then click '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


Validation

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. 


Processing

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  Indien je de naam van een bestaande lay-out hebt meegegeven in het XML-document, wordt deze factuurlay-out tevens gehanteerd.


Status response

At the end of the processing the web service generates a response XML document that contains the processing status and the possible validation messages. This XML document is specified in a XML scheme (XSD) and can be processed by your application. You wil find an example in article Sales ProcessSalesInvoices Response XML.


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.


Parameters


sessionID

The session ID that is returned by the Authenticate(accessKey) method.


administrationID

The identifier of the administration. For a description where to find the administrationID see article Administration ID.


xmlDoc

The XML fragment with the sales invoices.


Web address of the XML scheme of the sales invoices


http://www.yukiworks.nl/schemas/SalesInvoices.xsd


Web adsress of the XML scheme of the web service response


http://www.yukiworks.nl/schemas/SalesInvoicesResponse.xsd


Examples