Skip to content

Preview swap acceptance

POST
/v1/rotations/{rotationId}/swap-requests/{requestId}/accept/preview
curl --request POST \
--url https://api.roundrobinbot.eu/v1/rotations/example/swap-requests/example/accept/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/*+json' \
--data '{ "acknowledgedConflictIds": [ "example" ], "acknowledgedStartedLegKeys": [ "example" ], "expectedRevision": 1, "operationId": "example" }'

Requires a Slack member access token and the current request revision in expectedRevision. Returns conflicts and the rotation ETag without accepting the request. Review the conflicts before acknowledging them in the acceptance request.

rotationId
required
string
requestId
required
string

The reviewed request revision, conflict acknowledgments and remaining-time consent for a swap response.

object
acknowledgedConflictIds

Current conflict identifiers acknowledged for the interval this caller would receive.

Array<string>
acknowledgedStartedLegKeys

Keys of started intervals whose remaining time the recipient agrees to exchange. Include every preview leg with hasStarted set to true when accepting.

Array<string>
expectedRevision

The request revision reviewed by the caller.

integer format: int64
operationId

A caller-generated identifier of at most 128 characters. Reuse it only for an identical retry.

string
Examplegenerated
{
"acknowledgedConflictIds": [
"example"
],
"acknowledgedStartedLegKeys": [
"example"
],
"expectedRevision": 1,
"operationId": "example"
}

OK

Media typeapplication/json

The proposed assignments and whether conflict acknowledgments and remaining-time consent permit proceeding.

object
canProceed
required

Whether conflict acknowledgments and remaining-time consent permit proceeding.

boolean
legs
required

The proposed assignments.

Array<object>

One proposed assignment and its conflicts. canAcknowledge identifies conflicts this caller may acknowledge. When hasStarted is true, from and to describe the remaining time; accepting requires its key in acknowledgedStartedLegKeys.

object
acknowledged
boolean
assigneeUserId
required
string
canAcknowledge
required
boolean
conflicts
required
Array<object>

A conflict or an uncertainty affecting the proposed assignment.

object
canAcknowledge
required

Whether explicit acknowledgment permits proceeding with this conflict. False means the conflict blocks the write.

boolean
from
required

The inclusive UTC start of the conflict intersection with the requested interval.

string format: date-time
id
required

The acknowledgment identifier for this conflict and the previewed terms.

string
source
required

arrangement, manualAvailability, googleCalendar or slackStatus.

string
to
required

The exclusive UTC end of the conflict intersection with the requested interval.

string format: date-time
type
required

absence, sameCellArrangement or unknownAvailability.

string
userId
required

The affected person’s Slack user identifier.

string
from
required
string format: date-time
hasStarted
boolean
key
required
string
to
required
string format: date-time
oneClick

Set on an acceptance preview and null on a proposal preview.

null | string
Example
{
"legs": [
{
"acknowledged": false,
"hasStarted": false
}
]
}