Before you start
Stafflion and your agency set up the integration together before events flow. Follow this order.
Onboarding
- Stafflion enables the integration with your agency and creates and removes the shifts Stafflion publishes to you.
- Stafflion gives you staging credentials: a client ID and a client secret for the staging environment.
- Your agency tests in staging. Send events for the shifts you work on, and call the synchronized shifts API to confirm what is synchronized.
- Stafflion validates the integration in staging and issues production credentials.
Staging is the primary environment. Credentials are different for each environment: a staging client ID does not work in production.
Environments
| Environment | Audience | API base URL |
|---|---|---|
| Staging (primary) | https://staging.stafflion.com/api/v1 | https://staging.stafflion.com |
| Production | https://app.stafflion.com/api/v1 | https://app.stafflion.com |
The token endpoint is the same for both environments: https://auth.stafflion.com/oauth/token. The audience in the request selects the environment.
Where shifts come from
- Shifts Stafflion publishes to your agency. Your events reference them with the identifiers Stafflion sent.
shift_requestis accepted only for these shifts. - Shifts your agency creates. Send
shift_claimedwithshift_start_timeandshift_end_time. Stafflion creates the shift when it does not know it. Other events for a shift Stafflion does not know return404 Shift not found. After the claim is accepted, the shift appears in the synchronized shifts API.
Synchronized shifts before the integration is enabled
Until Stafflion enables the integration for your agency, the synchronized shifts API returns an empty list: data is [] and total_items is 0.