Skip to navigation

Send events

Send real-time updates about shifts and clinicians to Stafflion. Each request carries one event in event_name.

EventWhen to send it
shift_requestA clinician asks to work a shift Stafflion published to your agency. Stafflion approves the request by calling your partner API. The response says whether it was approved automatically (auto_approved) or is waiting for approval (pending_approval). Sending it again is safe.
shift_claimedA clinician claims the shift. Stafflion adds it to its schedule.
shift_updateThe time of a taken shift changes. Send it only after the shift_claimed for that shift.
shift_call_outA clinician calls out or will no longer work the shift.

Every error returns a message that states the reason and a code you can match in your code. Retry 5xx responses and timeouts with backoff. Do not retry 4xx responses, except an event that arrives before the event it depends on: resend it after that event is accepted.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
ShiftRequestEventobjectRequired

Event shift_request. Your agency requests to work a shift Stafflion published.

OR
ShiftClaimedEventobjectRequired

Event shift_claimed. Your agency confirms that a clinician claimed a shift.

OR
ShiftUpdateEventobjectRequired

Event shift_update. Send only after a shift_claimed has been sent for this shift.

OR
ShiftCallOutEventobjectRequired

Event shift_call_out. A clinician calls out or will no longer work the shift.

Response

OK
ShiftRequestResponse_200object

Response to shift_request. status says whether Stafflion approved the request automatically or it waits for approval. The response carries Stafflion’s own IDs; it does not repeat the IDs you sent.

OR
Shifts_Webhook_Response_200object

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error