Running the team
Team planning
Read the gaps of your planning and who can take them, then plan shifts, absences and work profiles, by hand or with an AI agent.
The planning says who works on which creator, and when. It is the planning of Team › Shifts in the app: shifts, absences with their replacement, the work profile of each employee, and the named shifts of the agency (« Matin, 08:00 to 14:00 »).
Everything is available here, and as tools for an AI agent: ask it « is my planning complete next week? », it lists the gaps, tells you who is absent and who is free, and plans the shifts you agree to.
Scopes
| Scope | Grants |
|---|---|
read:planning | Read the coverage, the available employees, the team, shifts, absences |
write:planning | Create, change and remove shifts and absences, replace a work profile |
Like every scope, they come with read:*, write:* and full access. A key limited to some creators only sees and plans their shifts. Absences belong to the agency, like employees: a key limited to some creators reads them all, but only a key for all creators writes them, since a replacement takes the shifts of every creator (absence_needs_all_creators).
Time
Every date and time is a wall-clock time of the agency time zone, given back in timezone in each answer. A shift from 20:00 to 02:00 ends the next day (end_date). The instants are in starts_at and ends_at.
The planning changes from today on: a past day is never written, changed or removed (planning_day_in_past), so the planning keeps who was planned when.
Find the gaps
GET /v1/planning/coverage reads up to 14 days on one platform. A slot is a creator, a day and a named shift (the whole day when the agency has no named shift). Each gap, a slot nobody holds, comes with:
planned: who was planned there and why it does not hold:absent,no_access(no access to the creator) orno_platform(their role does not open the platform);available: up to 3 employees free at that time who could hold it, those who already work on the creator first, then the least busy.
The answer also lists the absences of the period, with their replacement and uncovered when their shifts stay without anyone.
GET /v1/planning/candidates/{creator_id} answers « who can take this shift? » for any shift: every employee, available or not, with the reasons (absent, busy with another shift at that time, no_access, no_platform, not_on_platform) and their hours that week.
Plan shifts
GET /v1/shifts lists the shifts over 31 days at most, one item per shift on a day. A shift belongs to a series (shift_id): once, daily, weekly or every other week.
POST /v1/shiftscreates one series per employee, with a named shift (named_shift_id) or hours (start_time,end_time).POST /v1/shifts/{shift_id}/overridechanges one day only: another employee or other hours. Pass theoccurrence_dateread on the shift.PATCH /v1/shifts/{shift_id}changes the whole series. A series that started before today only changes its end (shift_series_started): its past is never rewritten.DELETE /v1/shifts/{shift_id}removes one day (day), that day and the next ones (following), or a whole series that has not started (series).
To change a series from a day on, end it from that day with following, then create the new shift from that day.
The planning never gives access to a creator. An employee planned on a creator they cannot open shows as no_access in the coverage: give the access in the app.
Absences
POST /v1/absences declares an absence for one day, with or without a replacement_id. The replacement takes all the shifts of the absent employee that day. PATCH /v1/absences/{absence_id} sets or removes the replacement, DELETE removes the absence. One absence per employee and day (absence_already_declared).
The reason of an absence can be written, but is never read back: it may be health data, and planning does not need it.
Work profiles
The work profile of an employee is their week: hours (a named shift, or a start and an end) on some days, and their creators. It makes their recurring shifts. PUT /v1/planning/team/{employee_id}/work-profile replaces it whole: from today, their profile shifts follow, the shifts set by hand do not move. Read it with GET /v1/planning/team.
For a team that works the same hours every week, a work profile per employee is the planning: a few calls instead of one shift per creator and per day.
Retrying
A create that gets no response or a 503 may still have gone through: list the shifts or the absences before trying again, or the retry creates a duplicate.