Get started with Amalia API
This guide helps you set up data connection to Amalia through our public API. You will be able to export Amalia calculations such as statement results, KPIs, payments, etc. to any software via a JSON API.
API Use Cases
Let's look at some specific use cases in which Amalia API could be helpful. By using a no-code tool such as Zapier or writing custom code, you can automatically:
- Keep Google Sheets or your internal data warehouse up-to-date
- Send payment reports to your payroll software
- Set up custom Slack, Teams or email notifications
- when you reach a certain level of commissions
- congratulate your salesperson when they reach 100% of their target
- get a weekly report on closed deals
Possibilities are endless!
Generate API key for authentication
- To get started, generate an API key in your company settings. You'll need it later to authenticate yourself for the API. Click on "Go to API settings" in the top right corner.
- Write a description for your new API key and click on the plus icon button.
Set up a report
Amalia API lets you access data from Report. You can start by creating a report with data you want to export.
- Find Reports in the navigation menu then click on "+ New" and choose "Report" in the menu.
- Give your new report a name, select its primary data source then click on "Create and configure."
- When you are happy with your report, click on the gear icon on the top right corner to access its settings.
- Click on the toggle button to enable your report for API. For security reasons, reports are available for API on an opt-in basis.
Call the API
We can now call Amalia API via a HTTP tool, such as Wget, Curl, Postman, Insomnia, etc.
- You need to provide the url for the report you want to access. The url is available in the report's settings.
- You need to provide your API key in the HTTP header
X-API-KEY
.
Here's an example:
The endpoint is paginated and can return up to 100 records. To access the next pages, you have to pass the page
parameter (pagination starts at 0).
The response is divided into 3 parts:
- The pagination data, giving you the total number of items and the current page number
- The
columns
which contains the definition of your columns, including their label and format - And the
items
which contains the actual data