updated_since to be certain nothing was missed.
1. Mint a key for the system
Ask an andteam administrator for a key for this one system, holding:- only the companies it serves;
- the field groups it needs. A directory sync needs Directory and Organisation (the default). Add Positions for reporting lines, and Personal contact only if the system has a lawful reason to hold home details;
- an IP range if it calls from a fixed address, and an expiry.
2. Read everything once
Note the time, then read every page of the lists you need. Uselimit=500.
/companies, /org-units, /locations, /lookups/departments,
/lookups/cost-centres, /lookups/grades, /lookups/job-titles) and re-read them when an
employee.changed names a field that depends on them.
3. Listen, then re-read the person
Add a webhook endpoint. A delivery is thin: it names the person and the fields that changed, so when one arrives, read the record:4. Catch up with updated_since
Webhooks are at least once, but a receiver can be down for longer than the 27 and a half hours of retries. So on a schedule, and always on start-up, read what changed:What each event means for the target
Rules that keep it correct
- Absent is not null. A field missing from a response is outside the key’s groups. Do not blank the value you hold. See Field groups.
- Match on
id. It is stable for the life of the record. - Ignore what you do not know. New fields and event types arrive without notice. See Versioning.
- Back off on a 429. Wait for
Retry-After. See Rate limits. - Read-only. The API cannot write back. A value changed in your system does not reach andteam.