Send statistics from another system with a push key
An administrator creates a push key on the Push keys tab of Statistics setup, and your HR, sales or operations system uses it to send figures to Finconsol. Finconsol does not fetch them. Each request is JSON, and a dry run checks a request without saving anything.
Create a key
- In Statistics setup, open the Push keys tab.
- Enter the name of the system that will use the key, such as HR system, and choose Create a key.
- Copy the key straight away. It is shown once and never again.
A group can have up to 3 active keys. Revoke removes a key at once, and anything still sending with it is refused from then on.
Send the figures
Send a POST request to the address shown on the Push keys tab, with the key in the X-Consol-Key header and a JSON body. A key sent as a Bearer token is refused.
{
"dry_run": true,
"values": [
{ "line": "HEADCOUNT", "company": "UK01", "value": 182 }
]
} - line is the statistic line's code.
- company is the company's code or name, or GROUP for a line entered for the whole group.
- value is the figure, as a number.
- as_of is optional. It is the date the figure was counted, and it decides the month. Without it, Finconsol uses today.
- from is the month, as yyyy-mm, that a new figure takes effect. A line that is fixed until changed needs it, and other lines must leave it out.
With "dry_run": true nothing is saved, and the reply says what would happen. Remove it to save. One request can carry up to 5,000 figures.
The reply
The reply lists each figure as changed, unchanged, older, kept or refused, with the reason for a refusal. Kept means a person has entered that figure on the Statistics screen. Clear it there if you want sent figures to replace it.
A figure sent again for the same month replaces the earlier one. It is never added to it, so sending the same headcount twice does not double it.
The daily allowance
Each key has an allowance of saves over the last 24 hours, worked out from the number of companies that report, with a minimum of 12. Dry runs have their own allowance. The Push keys tab shows how many saves are used and when the next one is allowed.
Scripts and no-code tools
The Push keys tab has ready-made scripts in curl, Python, Google Apps Script and Zoho Deluge, each starting as a dry run, and guides for Zoho Flow, Power Automate, Zapier and Make filled in with your own codes. Test it now sends a dry run of sample figures from your own lines, so you can see the key work without saving anything.
After switching a system on, open Data Health to check that the key has been heard from. Data Health also says when a key has stopped sending.