X-Idempotency-Key makes the retry safe: send the same key with the same body and Bindbee returns the saved result instead of writing again.
Four HRIS write endpoints accept the header:
POST /api/hris/v1/employeesPOST /api/hris/v1/employee-payroll-runsPOST /api/hris/v1/time-offPOST /api/hris/v1/timesheet-entry
Sending an idempotent request
Choosing a key
Generate one opaque key per logical creation, and reuse it only when retrying that same creation.
A UUID works, and so does a value derived from your own record identity:
How Bindbee responds
The two conflicts are distinguishable by their
detail:
A replayed response can carry a different status code from the original, so treat any
2xx as confirmation that the write succeeded rather than matching on 201 or 200.The five-minute window
Bindbee saves a successful response for five minutes. Within that window the same key and body returns the saved result. After it, the key may be treated as new. Failed attempts are not saved, so the same key can be retried after a failure.Retrying safely
- Generate the key before the first request, and store it with the operation you are attempting.
- Send the write with that key.
- On a network error or a
5xx, retry the same body with the same key. - On an in-progress
409, wait briefly and retry with the same key. - On a different-payload
409, check the body before deciding whether this is a new record. - Stop once you have a
2xx.
Related
- Writing data - how a write reaches the source system
- Meta APIs - the request shape a connector expects
- Duplicate records - finding duplicates a retry already created
- Authentication - the two headers every write also carries