Skip to main content

Before you start

Stafflion and your agency set up the integration together before events flow. Follow this order.

Onboarding​

  1. Stafflion enables the integration with your agency and creates and removes the shifts Stafflion publishes to you.
  2. Stafflion gives you staging credentials: a client ID and a client secret for the staging environment.
  3. Your agency tests in staging. Send events for the shifts you work on, and call the synchronized shifts API to confirm what is synchronized.
  4. 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​

EnvironmentAudienceAPI base URL
Staging (primary)https://staging.stafflion.com/api/v1https://staging.stafflion.com
Productionhttps://app.stafflion.com/api/v1https://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_request is accepted only for these shifts.
  • Shifts your agency creates. Send shift_claimed with shift_start_time and shift_end_time. Stafflion creates the shift when it does not know it. Other events for a shift Stafflion does not know return 404 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.