API and webhooks
Updated
In short: The Staffmio API lets another system read venues, people, published shifts, time records and time off, add draft shifts and send daily sales, with tokens an admin creates and scopes. Webhooks tell your system when the rota is published, a shift changes, time is approved, time off is decided or sales are imported, signed so you can trust them.
What moves, and which way
- Plan
- Pro plan and above
| What | Direction |
|---|---|
| Venues, departments and roles; people; published shifts; time records; time off | Out of Staffmio |
| Draft shifts, which a manager publishes in Staffmio | Into Staffmio |
| Net sales for whole days | Into Staffmio |
| Webhook events for people, the rota, shifts, time records, time off and sales | Out of Staffmio |
How to set it up
- An admin creates a token in Settings, Developer, with a name and the scopes it needs, and copies it once.
- Send it as a bearer token on every request.
- Read the OpenAPI description for the endpoints and fields.
- Add a webhook endpoint, choose its events and check the signature on each delivery.
Good to know
- 120 requests a minute per token
- Never returns pay, birthdays, addresses, emergency contacts, permissions or the kind of time off
- Shifts added through the API are drafts until a manager publishes them
Safe by design
A token acts as the admin who made it, narrowed by its scopes, so every rule in the app applies to the API as well, and every write has a named person in the audit log. A token stops working when its admin stops being one.
Webhooks are signed with a secret only you and Staffmio know, and lost deliveries are retried.
Webhook events
- Person added, changed or deactivated
- Rota published
- Published shift added, changed or removed
- Time record approved
- Time off decided
- Sales imported
How Staffmio helps
Questions
Does Staffmio have an API?
Yes, a REST API with an OpenAPI description, tokens with scopes, and signed webhooks.
Can the API read pay rates?
No. Pay, birthdays, addresses, emergency contacts, permissions and the kind of time off are never returned.
Which plan includes the API?
The API and webhooks are part of the Pro plan.