Skip to main content
This recipe upserts companies: it updates a company Heliyos already has and creates the ones it does not. It uses three endpoints: List records, Create a record and Update a record.
1

Get the companies object id

Call List objects once and keep the id of the object whose objectType is company. It does not change.
2

Look the company up

Match on a stable value, such as the website, rather than on the name. equals on text ignores case:
A match comes back in data[0], with its id in _id.
3

Update or create

If you found it, send only the changed fields:
If not, create it:
4

Handle a duplicate

A company whose website already exists answers 409 CONFLICT. Treat it as “already there”: look it up again and update it instead.

A complete script

sync_companies.py
Each lookup and write counts toward the 60 requests a minute limit. For thousands of companies, run the sync in the background and let the 429 handling pace it.
Last modified on November 5, 2026