Browse the docs ▾

Schedule API

Read the published schedule and change who is working. GET /api/v1/assignments, POST /api/v1/assignments, GET /api/v1/assignments/{id}, POST /api/v1/assignments/{id}/cancel.

Generated from the app's endpoint listView as Markdown

4 operations. Each needs an API key with the permission shown; see API keys and permissions.

OperationPermission
GET /api/v1/assignmentsschedule:read
POST /api/v1/assignmentsschedule:publish
GET /api/v1/assignments/{id}schedule:read
POST /api/v1/assignments/{id}/cancelschedule:publish

#GET /api/v1/assignments

Who is working where and when. Draft schedules are never included.

  • Permission: schedule:read
  • Returns: a page of records: { data, hasMore, nextCursor }, status 200

Query parameters (all optional)

NameDescription
fromEarliest start time: YYYY-MM-DD or an ISO-8601 time.
toLatest start time (not included): YYYY-MM-DD or an ISO-8601 time.
providerIdOnly this person.
facilityIdOnly this site.
categoryshift or call.
statuspublished, modified, worked, released or cancelled. Default: published, modified, worked.
limitRows per page, 1 to 200. Default 50.
cursorThe nextCursor value from the previous page.

Fields in each record: id, providerId, facilityId, start, end, operationalDate, category, status, callRole, callKind, externalId

curl "https://app.staffedly.com/api/v1/assignments?limit=50" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"

#POST /api/v1/assignments

Put someone on the live schedule. Every scheduling check runs; a shift that breaks a rule is refused with the reason. The person is told, as when your team adds a shift.

  • Permission: schedule:publish
  • Returns: one record: { data }, status 201
  • Safe retry: send an Idempotency-Key header (8 to 128 characters); the same key with the same request returns the first answer again

Body fields (JSON; a field the API does not know is refused)

FieldDescription
providerIdRequired.
facilityIdRequired.
startRequired. ISO-8601 time with a zone, in the future.
endRequired. At most 36 hours after start.
reasonRequired. Sent to the person.
categoryshift (default) or call.
callKindFor call: in_house (default), home or backup.

Fields in each record: id, providerId, facilityId, start, end, operationalDate, category, status, callRole, callKind, externalId

curl -X POST "https://app.staffedly.com/api/v1/assignments" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"providerId":"<providerId>","facilityId":"<facilityId>","start":"2027-01-12T07:00:00-05:00","end":"2027-01-12T15:00:00-05:00","reason":"Extra room opened"}'

#GET /api/v1/assignments/{id}

One assignment.

  • Permission: schedule:read
  • Returns: one record: { data }, status 200

Path

NameDescription
idThe record's id.

Fields in each record: id, providerId, facilityId, start, end, operationalDate, category, status, callRole, callKind, externalId

curl "https://app.staffedly.com/api/v1/assignments/<id>" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"

#POST /api/v1/assignments/{id}/cancel

Cancel a shift on the live schedule. The person is told, as when your team cancels one.

  • Permission: schedule:publish
  • Returns: one record: { data }, status 201
  • Safe retry: send an Idempotency-Key header (8 to 128 characters); the same key with the same request returns the first answer again

Path

NameDescription
idThe record's id.

Body fields (JSON; a field the API does not know is refused)

FieldDescription
reasonRequired. Sent to the person.
cancelReasonother (default) or facility_cancelled, which applies your late-cancel rule.

Fields in each record: id, providerId, facilityId, start, end, operationalDate, category, status, callRole, callKind, externalId

curl -X POST "https://app.staffedly.com/api/v1/assignments/<id>/cancel" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Extra room opened"}'

Something missing or wrong on this page? Email [email protected] or book a free call; our team sets up every new customer at no charge.