Check out the Onlyoffice Document Server API.
API for generating documents (contracts, letters, invoices) from templates by populating them with XML, JSON, Excel data. The API integrates documents' creation and delivery features. Developers can work from the back-end or web embed. They can also integrate with their databases such as Oracle/SQL Server/MySQL to automate document creation from database data.
Connect to API