Skip to content

Preview availability impact

POST
/v1/teams/{teamId}/availability/impact-preview
curl --request POST \
--url https://api.roundrobinbot.eu/v1/teams/example/availability/impact-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/*+json' \
--data '{ "afterRotationId": "example", "expectedPreviewRevision": "example", "previewFrom": "2026-04-15T12:00:00Z", "previewTo": "2026-04-15T12:00:00Z", "proposal": { "endTime": "2026-04-15T12:00:00Z", "isActive": true, "reason": "example", "recurrenceRule": { "dayOfMonth": 1, "daysOfWeek": [ "sunday" ], "endDateUtc": "2026-04-15T12:00:00Z", "endType": 1, "interval": 1, "maxOccurrences": 1, "nthWeekdayDayOfWeek": "sunday", "type": 1, "weekOfMonth": 1 }, "rotationIds": [ "example" ], "rotationScope": 1, "startTime": "2026-04-15T12:00:00Z", "timeZone": "example" }, "replacedSettingId": "example", "rotationLimit": 1 }'

Requires a Slack member access token for this workspace. API keys cannot perform this preview. Compares current duty with the proposed availability without saving it or changing duty. Supply UTC preview dates spanning at most 31 days, ending after the current time and within six months. Set rotationLimit from 1 through 5. Continue with nextAfterRotationId as afterRotationId. The response complete describes paging. Check each rotation’s complete, source states and limitationCodes separately. Pass expectedPreviewRevision to compare with a reviewed preview; false matchesExpectedRevision means it changed. Invalid ranges return 422 with invalidImpactRange; invalid proposals return 422 with invalidAvailabilityTerms.

teamId
required
string
object
afterRotationId
null | string
expectedPreviewRevision
null | string
previewFrom
string format: date-time
previewTo
string format: date-time
proposal
object
endTime
string format: date-time
isActive
boolean
reason
null | string
recurrenceRule
One of:
null
rotationIds
Array<string>
rotationScope
integer format: int32
startTime
string format: date-time
timeZone
string
replacedSettingId
null | string
rotationLimit
integer format: int32

OK

Media typeapplication/json
object
asOfUtc
required
string format: date-time
complete
required
boolean
effectiveFrom
required
string format: date-time
matchesExpectedRevision
required
null | boolean
nextAfterRotationId
required
null | string
previewRevision
required
string
rotations
required
Array<object>

The effect of an availability change on one rotation.

object
complete
required

False when the effect may be incomplete.

boolean
intervals
required

The intervals whose holders change.

Array<object>
object
afterUserIds
required
Array<string>
arrangementIds
required
Array<string>
arrangementKinds
required
Array<string>
beforeUserIds
required
Array<string>
cellId
required
string
from
required
string format: date-time
kind
required
string
laneName
null | string
to
required
string format: date-time
windowName
null | string
limitationCodes
required

The reasons the effect may be incomplete, each as a code with the availability source it concerns when it concerns one. Empty when complete is true.

Array<object>

One reason a read is not exhaustive, with the availability source it concerns when it concerns one.

object
code
required

The reason, one of recurrenceExpansionIncomplete, manualAvailabilityUnavailable, googleCalendarUnavailable, proposalRecurrenceIncomplete, externalRotation, rotationDisabled, calendarFreshnessUnknown, projectionUnavailable, candidateHorizon, randomFutureUnknown or manualFutureContingent.

string
source

The availability source the reason is about, manualAvailability or googleCalendar. Absent when it is about no source.

null | string
rotationId
required

The rotation identifier.

string
rotationName
required

The name of the rotation.

string
rotationVersion
required

The version of the rotation the effect was read at.

integer format: int64
sourceStatuses
required

How each availability source answered.

Array<object>
object
source
required
string
state
required
string
to
required
string format: date-time
Examplegenerated
{
"asOfUtc": "2026-04-15T12:00:00Z",
"complete": true,
"effectiveFrom": "2026-04-15T12:00:00Z",
"matchesExpectedRevision": true,
"nextAfterRotationId": "example",
"previewRevision": "example",
"rotations": [
{
"complete": true,
"intervals": [
{
"afterUserIds": [
"example"
],
"arrangementIds": [
"example"
],
"arrangementKinds": [
"example"
],
"beforeUserIds": [
"example"
],
"cellId": "example",
"from": "2026-04-15T12:00:00Z",
"kind": "example",
"laneName": "example",
"to": "2026-04-15T12:00:00Z",
"windowName": "example"
}
],
"limitationCodes": [
{
"code": "example",
"source": "example"
}
],
"rotationId": "example",
"rotationName": "example",
"rotationVersion": 1,
"sourceStatuses": [
{
"source": "example",
"state": "example"
}
]
}
],
"to": "2026-04-15T12:00:00Z"
}