AnalysisPlace Document Generation API (for Developers)
-
AnalysisPlace APIs are for developers and system integrators to automate document generation from templates
-
Any Word or PowerPoint document "Linked" using our add-in can be used as a template
-
Our add-in provides sample request and response JSON specifically for your template and it makes it easy to test your templates
-
API access is included in our business subscriptions. The Free Business Trial allows you to try/use the APIs.
Template-Based Document Generation Service
|
Calculation Service
|
Combined API Service
|
- Your app submits data (text, tables, & images) in JSON format to the service
- Your app receives your updated document
|
- Flexible and powerful calculation service based on logic, formulas, and lookups in your Excel templates
- Your app submits inputs based on your workbook: our service calculates and returns results
|
- Submit data, have the Calculation API calculate outputs and graphs
- Use the results to update your documents
|
Try Demo
AnalysisPlace Document Generation Service (Template-Based)
Submit JSON-formatted data, receive customized Word or PowerPoint documents.
This is a very easy-to-use, yet powerful API that enables your app to submit data (in standard JSON format) and receive a personalized template-based document. The service is very easy to set up because it uses our popular Office add-in to link the data to your template. It also provides the exact JSON data structure for your app to use.
Potential Use Cases
The API can be used to improve a wide variety of business processes. Below are a few:
- Rapidly produce great-looking monthly customer financial results reports based on data stored in your database, for a few customers or thousands of customers. Then have the reports printed and/or emailed.
- Empower your sales staff to instantly create highly-customized proposals and presentations based on customer data stored in your CRM (e.g. Salesforce).
- Enable your clients to download customized documents based on data that is entered into a form or calculator on your website, e.g., an assessment report or a product configuration.
Key Features
Very powerful and flexible, yet easy to set up.
- Supports one-at-a-time and high-volume document creation
- Use your existing branded Word/PowerPoint templates
- Very easy to set up – it uses the same data structure and document updating logic as our popular Office add-in
- Document templates are easy to link to your data source - the add-in provides the JSON data structure based on your template. You can easily test your document updates from the add-in before doing any programming
- Very powerful and flexible – the document updating features are very similar to the add-in
- Support for “document assembly” – include/exclude document sections/slides based on conditional logic
- Access the API from any programming language (uses standard secure REST-based web services)
- Compared to other solutions, this API is more cost-effective, more powerful, and much easier to set up
Updatable content
As with our add-in, you can update essentially any type of content in your template:
- Text – essentially anywhere in your document
- Tables – flexible table updating, e.g. automatically inserts/deletes rows/columns to match the source
- Charts – updates charts (based on data) or chart images
- Images – update/replace any image, such as product images. Your images are simply submitted as part of the JSON in standard base64-encoded format.
How to configure the solution
Other systems are complicated and very time-consuming to set up. Ours is simple. It leverages our existing add-in to make it substantially easier.
- Link your Word and/or PowerPoint templates using our existing add-in. You link it to an Excel document, although Excel is not part of the production system. The Excel document is important for making it easy to visualize sample data and to test the template.
- Test your templates with the add-in.
- Sign in to the add-in (in Excel) with an authorized account; the “API” tab will appear. Select or paste your API key.
- Click “Display JSON Data Structure”. This analyzes linked data in your Excel document, then displays the exact structure of the JSON data that your system needs to provide in the web service request. It also provides the API URL.
- Click “Upload Template” to upload your template to our server.
- Configure your system/app to submit data in the provided structure. Include the desired template ID and your API key for authentication. AnalysisPlace will provide your API key at sign up.
- Our API will return the URL of the updated document. Your system can download the document or provide the URL to your user (e.g. to place in a “Download Report” button).
How to get API permission and API keys
A business account is required to administer and use the API (API access is included in the free business trial). An AnalysisPlace account administer can grant API admin access and create API keys in the Admin Portal. See the "API Administration" section. The user must first have permission to access/use the core features of the add-in (see "User Access Control" section).
To grant "API Administrator" access to a user (which exposes the API tab in the add-in): under "API Administrators" add the email of the user, then "Submit and Apply Changes".
To create an API key: under "API Keys", click "Create New API Key", then edit the description.
When the user signs into the add-in, the "API" tab should appear and at the top of that tab, it will indicate the API keys that the organization can use.
AnalysisPlace Calculation API
A very flexible and powerful calculation service based on logic, formulas, and lookups in your Excel templates. Your application submits inputs; our service calculates and returns results (values and graphs) based on your workbook.
Potential Use Cases
There are a wide variety of use cases, below are a few:
- Return results based on user entry of data into a form, then display results on the web page
- Return results of complex logic and calculations for use in your applications
- Financial analysis, engineering/technical calculations, creation of Excel-based charts/graphics, product/solution configurations, complex data lookups, etc.
Note: our API services should typically be called from a server, not from a client because the web service request contains your API key. For example, you may not want to call the API directly from JavaScript in a browser (a malicious user could find and use your API key).
Key Features
Very powerful and flexible, yet easy to set up.
- Supports highly complex business models, including any Excel formula and extensive look-ups
- Supports a large number of output items (text, range values, chart images)
- Very easy to configure: our add-in analyzes your workbook and displays the exact web service request and response JSON data structure.
Potential Inputs
- You can submit individual values (populates a single cell) or tables of data (populates a range of cells)
- Values can be text or numerical
Potential Outputs (calculated results)
- Individual values (from a single cell)
- Tables of values (based on named ranges or data tables)
- Chart images (essentially any type of chart). Images are standard base64-encoded and are returned as part of the JSON response.
How to Configure the Solution
Set-up is simple because it uses our add-in to define and test inputs/outputs and it provides the JSON format (request and response) that your app can use.
- Sign in to the add-in (in Excel) with an authorized account; an “API” tab will appear.
- Name items (inputs and outputs) in your workbook. Use the same naming conventions as the add-in (prefixes). This configuration is associated with your workbook, so it is easy to modify over time.
- Click “Display JSON Data Structure”. This analyzes the named (linked) content in your Excel document, then displays the exact structure of the JSON data that your system needs to provide in the web service request (the inputs). It also displays the structure of the response JSON data (the results) and it provides the service URL.
- Upload your workbook(s) to our secure calculation service via the add-in.
- Test the calculation service from the add-in and view the response JSON.
- Configure your system/app to submit and receive data in the provided JSON data structure. Include your API key for authentication.
- Our API will return the calculated results.
Response times may be 2-6 seconds, so it may not be appropriate for high-volume scenarios.
Combine the 2 APIs:
Submit raw data, let our Calculation API calculate results and create great-looking charts; and then leverage the Document API to create documents based on your templates:
API Documentation
APIs require extensive documentation, right?
Not ours: the “API” tab of the add-in makes it easy to: create and upload calculator and document templates, test your templates, and view request and response JSON.
1. Create Templates
Create your Word and/or PowerPoint templates using the standard features of the AnalysisPlace add-in: link your workbook to your Word or PowerPoint documents. Test your templates using "Submit Content" in the Excel add-in and "Update Document" in the Word or PowerPoint add-in.
The resulting document update of the API should be the same as the add-in “Update Document”.
2. Upload Templates
Upload/manage your Word and/or PowerPoint templates in this section. Uploaded documents will be available to your app via the API.
Each template is assigned a unique "Template ID". Use this ID in your JSON ("templateId" element) to reference the template. You can update your templates at any time by uploading a new version.
3. Test Templates
Test your workbook and/or templates using data in the open workbook.
“Test API” submits JSON to the API (using your API key) based on content in the workbook the same way your app would submit data to the API. When your app submits data in the specified structure, the result should be the same.
The add-in shows the request and response JSON. For document updates, it allows you to download the generated document.
4. Display Request JSON
Display the JSON data structure based on data in the open workbook. Your app should submit data in the general format displayed (but with your custom data).
The Request JSON is also updated when you test the API.
You can also test your JSON here: API Test
5. Develop Your App
Create/modify your app so it submits data in the JSON structure shown. Use the following endpoint: https://api.analysisplace.com/API/v1.0 . Submit a standard REST-based POST service request using any programming language.
If you are accessing the API from a web client, contact AnalysisPlace so we can allow CORS access to our API from your domain(s).