Skip to content

List swap candidates

GET
/v1/rotations/{rotationId}/swap-requests/candidates
curl --request GET \
--url 'https://api.roundrobinbot.eu/v1/rotations/example/swap-requests/candidates?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z' \
--header 'Authorization: Bearer <token>'

Requires read:oncall and a key whose workspace and rotation selector permit this rotation. Supply UTC dates with from before to, a range of at most 31 days, and an end after the current time but no more than six months ahead. Invalid ranges return 422 with invalidSwapRange. External schedules return 409 with externalRotation. Returns eligible full future shifts overlapping the range, with their full start and end. Started shifts are excluded. selectableFrom equals from. New proposals must use both full shift boundaries. A started shift returns 409 with swapShiftStarted; a partial shift returns 409 with swapFullShiftRequired. Check complete and limitations before treating the result as exhaustive. candidateHorizon means a turn ending beyond six months was omitted. Selecting a candidate does not create a swap request.

rotationId
required
string
from
required
string format: date-time
to
required
string format: date-time

OK

Media typeapplication/json

Available duty choices at asOfUtc. Check complete and limitations before treating the list as exhaustive.

object
items
required
Array<object>

A full future shift offered for selection, with its local time zone. selectableFrom equals from; started shifts are excluded.

object
key
required
string
rotationId
required
string
cellId
required
string
laneId
required
string
laneName
required
null | string
windowName
required
null | string
timeZone
required
string
userId
required
string
from
required
string format: date-time
to
required
string format: date-time
selectableFrom
required
string format: date-time
asOfUtc
required
string format: date-time
complete
required
boolean
limitations
required
Array<string>
Examplegenerated
{
"items": [
{
"key": "example",
"rotationId": "example",
"cellId": "example",
"laneId": "example",
"laneName": "example",
"windowName": "example",
"timeZone": "example",
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"selectableFrom": "2026-04-15T12:00:00Z"
}
],
"asOfUtc": "2026-04-15T12:00:00Z",
"complete": true,
"limitations": [
"example"
]
}