The district’s stock management system must send us the list of stockouts every day, to attach to our health centers.
With an automation triggered by an inbound call.
Setup
- In the project, an inbound call automation holds the script that reads the data received (written by the AI or by hand).
- In the admin, Automations card, that automation’s Call button: the address to call, and Generate a key. The key is only shown once: copy it. Revoke disables it.
The call
POSTto the address, JSON body of 256 KB at most;- the key in the
Authorization: Bearer <key>orX-Collecton-Keyheader; 202response with the id of the run;- an
Idempotency-Keyheader avoids processing the same send twice; - at most 60 calls per minute and per key.
External ids
The script links each Collecton record to its id in the other system (the health center’s code in the stock system, for example). On the next call, it finds the center by this id and updates it instead of creating a second one.
The details of each run are under Runs: How do we connect Collecton to another system (DHIS2, REST API…)?.