OnDemand shifts
Your app drafts OnDemand shifts. The venue sets the hourly rate and publishes each one in Shiftly.
Shiftly OnDemand lets a venue offer a shift to independent workers, who apply and are engaged by the venue. With ondemand:write your app creates draft OnDemand shifts at a venue that has set up OnDemand: a location, a position the venue offers through OnDemand, a start, an end and a shift description. A draft isn't offered to workers. The venue sets the hourly rate and publishes each shift in Shiftly; your app can do neither.
Your app can change or delete any draft at the business, including drafts the venue made, until it starts. Moving a priced draft's start or end, or changing its position, clears the rate, so the venue prices it again before publishing. A draft whose start has passed reads as expired: your app can still delete it, but not change it. A published shift is read-only to your app, and a change answers not_a_draft.
If the venue hasn't set up OnDemand, every change answers ondemand_unavailable. Reading still works.
| status | Means |
|---|---|
| draft | Not published yet. The venue sets the rate and publishes it in Shiftly. |
| posted | Published and open to workers. Nobody is booked yet. |
| filled | A worker is booked. |
| in_progress | The booked worker has clocked in. |
| completed | The shift was worked. |
| no_show | The booked worker did not attend. |
| expired | It started with nobody booked, or while it was still a draft. |
A shift says nothing about the worker: no id, no name and no count of applicants. rate_set tells you whether the venue has priced it; the rate itself needs pay:read as well. A deleted shift reads as archived and appears in lists only with include_archived=true, so a sync using updated_since sees it go.
- OnDemand shifts need ondemand:read; creating, changing and deleting drafts needs ondemand:write.
