Skip to main content

Events

Your agency sends events to Stafflion at POST {base}/api/v1/webhooks/partners, where {base} is the base URL of the environment (see Before you start). Authenticate with the Bearer token from the token endpoint.

Common request fields​

FieldTypeRequiredDescription
event_namestringyesOne of shift_request, shift_claimed, shift_update, shift_call_out.
event_dataobjectyesPayload for the event. See each event below.
occurred_atstringyesDate and time when the event occurred, in UTC (RFC3339). Example: 2026-07-24T00:00:00.000Z.

Send Authorization: Bearer <access_token> and Content-Type: application/json.

shift_request​

Your agency requests to work a shift Stafflion published. The request carries the full shift and clinician details.

FieldTypeRequiredDescription
partner_facility_idstringyesPartner facility ID.
partner_shift_idstringyesPartner shift ID of a shift Stafflion published.
shift_start_timestringyesShift start time in UTC (RFC3339).
shift_end_timestringyesShift end time in UTC (RFC3339).
partner_clinicianobjectyesClinician details. See Clinician.
shift_request request
{
"event_name": "shift_request",
"event_data": {
"partner_facility_id": "efa61cc1-caf8-4544-9f3a-a8946d51026b",
"partner_shift_id": "deb1b3c4-72a8-493a-ba34-46eebb81ef94",
"shift_start_time": "2026-07-24T07:00:00.000Z",
"shift_end_time": "2026-07-24T15:00:00.000Z",
"partner_clinician": {
"id": "a98600a7-6c73-4095-ab17-7c5d8c02870c",
"first_name": "Jane",
"last_name": "Doe",
"email": "jdoe@example.com",
"phone": "000-000-0000",
"position": "CNA",
"clinician_tier": "Tier 1",
"compensation": {
"base_hourly_rate": 35.0,
"overtime_hourly_rate": 52.5,
"bonus": {"type": "fixed", "value": 100.0}
}
}
},
"occurred_at": "2026-07-24T00:00:00.000Z"
}

shift_claimed​

Your agency confirms that a clinician claimed the shift. For a shift Stafflion did not publish, include shift_start_time and shift_end_time, and Stafflion creates the shift.

FieldTypeRequiredDescription
partner_facility_idstringyesPartner facility ID.
partner_shift_idstringyesPartner shift ID.
partner_clinicianobjectyesClinician details. See Clinician.
shift_idstringnoStafflion shift ID, only if your agency maps it.
partner_secondary_shift_idstringnoSecondary partner shift ID.
shift_start_timestringwhen Stafflion did not publish the shiftShift start time in UTC (RFC3339).
shift_end_timestringwhen Stafflion did not publish the shiftShift end time in UTC (RFC3339).
shift_claimed request
{
"event_name": "shift_claimed",
"event_data": {
"partner_facility_id": "efa61cc1-caf8-4544-9f3a-a8946d51026b",
"partner_shift_id": "deb1b3c4-72a8-493a-ba34-46eebb81ef94",
"shift_start_time": "2026-07-24T07:00:00.000Z",
"shift_end_time": "2026-07-24T15:00:00.000Z",
"partner_clinician": {
"id": "a98600a7-6c73-4095-ab17-7c5d8c02870c",
"first_name": "Jane",
"last_name": "Doe",
"email": "jdoe@example.com",
"phone": "000-000-0000",
"position": "CNA",
"compensation": {
"base_hourly_rate": 35.0,
"overtime_hourly_rate": 52.5,
"bonus": {"type": "percentage", "value": 10.0}
}
}
},
"occurred_at": "2026-07-24T00:00:00.000Z"
}

shift_update​

Send this event only after a shift_claimed has been sent for the shift, that is, once the shift is taken by a clinician.

FieldTypeRequiredDescription
partner_facility_idstringyesPartner facility ID.
partner_shift_idstringyesPartner shift ID.
shift_start_timestringyesNew shift start time in UTC (RFC3339).
shift_end_timestringyesNew shift end time in UTC (RFC3339).
shift_idstringnoStafflion shift ID, only if your agency maps it.
shift_update request
{
"event_name": "shift_update",
"event_data": {
"partner_facility_id": "efa61cc1-caf8-4544-9f3a-a8946d51026b",
"partner_shift_id": "deb1b3c4-72a8-493a-ba34-46eebb81ef94",
"shift_start_time": "2026-07-24T08:00:00.000Z",
"shift_end_time": "2026-07-24T16:00:00.000Z"
},
"occurred_at": "2026-07-24T00:00:00.000Z"
}

shift_call_out​

FieldTypeRequiredDescription
partner_facility_idstringyesPartner facility ID.
partner_shift_idstringyesPartner shift ID.
partner_clinician_idstringyesPartner clinician ID.
shift_call_out request
{
"event_name": "shift_call_out",
"event_data": {
"partner_facility_id": "efa61cc1-caf8-4544-9f3a-a8946d51026b",
"partner_shift_id": "deb1b3c4-72a8-493a-ba34-46eebb81ef94",
"partner_clinician_id": "a98600a7-6c73-4095-ab17-7c5d8c02870c"
},
"occurred_at": "2026-07-24T00:00:00.000Z"
}

Clinician​

FieldTypeRequiredDescription
idstringyesPartner clinician ID.
first_namestringyesFirst name.
last_namestringyesLast name.
emailstringyesEmail.
phonestringyesPhone.
positionstringyesExact position name, for example LPN.
compensationobjectyesPay details. See below.
clinician_tierstringnoClinician tier as free text, for example Tier 1.

Compensation

FieldTypeRequiredDescription
base_hourly_ratenumberyesBase hourly rate without bonuses.
overtime_hourly_ratenumberyesOvertime hourly rate.
bonusobjectyestype is fixed or percentage. value is the amount, or the percentage.

The latest event for a clinician replaces the previous pay details. A percentage bonus is applied to base_hourly_rate over the shift length.

Responses​

A successful event returns 200 with message and shift. clinician is returned when the event identifies a clinician.

shift_claimed, 200 OK
{
"message": "success",
"shift": {
"id": 1048012,
"partner_shift_id": "deb1b3c4-72a8-493a-ba34-46eebb81ef94",
"partner_secondary_shift_id": null
},
"clinician": {
"id": 139898,
"partner_clinician_id": "a98600a7-6c73-4095-ab17-7c5d8c02870c"
}
}

Error responses carry only message:

404 Not Found
{
"message": "Shift not found"
}

Error messages​

StatusMessageWhen
404Shift not foundThe shift is unknown, deleted, or not shared with your agency. A shift_claimed for a shift Stafflion did not publish also returns this when it has no shift_start_time and shift_end_time.
404Facility not found with the ID '<partner_facility_id>'The partner facility is not linked to a Stafflion facility.
400Shift has already endedThe shift end time has passed.
400Shift is already takenAnother clinician already holds the shift.
400Clinician doesn't have the required position to claim this shiftThe clinician's position does not match the shift.
400More than one shift/slot found. Please provide a clinician identifier to disambiguateSeveral shifts match and no clinician identifier was sent.
400No shift found for the given clinicianNo shift matches the given clinician.
400Shift is not taken by any clinicianThe shift has no clinician to call out.
400Missing param 'partner_facility_id', Missing 'partner_shift_id' param, Missing param 'partner_clinician_id'A required identifier is missing from shift_request.
400Missing 'shift_id' or 'partner_shift_id' paramshift_update has no shift identifier.
422Validation failedThe body is invalid. errors lists each invalid field.