Create a duty arrangement
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements"), Headers = { { "If-Match", "example" }, { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"operationId\": \"example\", \"cellId\": \"example\", \"userId\": \"example\", \"from\": \"2026-04-15T12:00:00Z\", \"to\": \"2026-04-15T12:00:00Z\", \"expectedRevision\": 1, \"turnSelection\": { \"kind\": \"example\", \"from\": \"2026-04-15T12:00:00Z\", \"to\": \"2026-04-15T12:00:00Z\" }, \"acknowledgedConflictIds\": [ \"example\" ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json-patch+json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements"
payload := strings.NewReader("{ \"operationId\": \"example\", \"cellId\": \"example\", \"userId\": \"example\", \"from\": \"2026-04-15T12:00:00Z\", \"to\": \"2026-04-15T12:00:00Z\", \"expectedRevision\": 1, \"turnSelection\": { \"kind\": \"example\", \"from\": \"2026-04-15T12:00:00Z\", \"to\": \"2026-04-15T12:00:00Z\" }, \"acknowledgedConflictIds\": [ \"example\" ] }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("If-Match", "example") req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json-patch+json");RequestBody body = RequestBody.create(mediaType, "{ \"operationId\": \"example\", \"cellId\": \"example\", \"userId\": \"example\", \"from\": \"2026-04-15T12:00:00Z\", \"to\": \"2026-04-15T12:00:00Z\", \"expectedRevision\": 1, \"turnSelection\": { \"kind\": \"example\", \"from\": \"2026-04-15T12:00:00Z\", \"to\": \"2026-04-15T12:00:00Z\" }, \"acknowledgedConflictIds\": [ \"example\" ] }");Request request = new Request.Builder() .url("https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements") .post(body) .addHeader("If-Match", "example") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json-patch+json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements', headers: { 'If-Match': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json' }, data: '{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ] }'};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements';const options = { method: 'POST', headers: { 'If-Match': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json' }, body: '{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ] }'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json-patch+json' \ --header 'If-Match: example' \ --data '{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ] }'Requires write:duty, rotation edit authority and If-Match. Use the ETag from a rotation or arrangement read. If-Match: * accepts the current rotation version without checking a previously read version. Missing If-Match returns 428. A stale version returns 412: read current state, review the terms and retry with its ETag. A start in the past is moved to the actual transition time; an entirely elapsed interval is refused. A 409 with arrangementConflicts includes current conflicts. Preview again and acknowledge only conflicts that permit it. Use one operation ID per write. A retry by the same actor with the same terms returns the committed result; changed terms or reuse for another rotation returns 409 with operationIdConflict. Success returns 200 and an ETag. Change-event publication status does not confirm Slack delivery.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The rotation identifier.
Header Parameters
Section titled “Header Parameters”The ETag from your last read of this resource, sent back exactly as you received it, quotes included. The write happens only if nothing changed in between: a stale validator is answered 412 and nothing is written. Send * to write against whatever is current on purpose. Omitting the header is 428, never an unconditional write. https://docs.roundrobinbot.eu/api/conventions/#conditional-writes
Request Bodyrequired
Section titled “Request Bodyrequired”Request cancellation.
Terms for a direct assignment or its preview.
object
A nonempty operation identifier of at most 128 characters, required for writes. Reuse it only to retry the same write.
The rotation cell receiving the assignment.
The Slack user identifier of a person in the cell’s lane.
The requested inclusive UTC start. A current assignment begins at the actual transition time.
The exclusive UTC end, later than both the start and the write’s transition time.
The current arrangement revision when changing an existing assignment or previewing that change.
Optional turn selection returned by the assignment preview.
object
fullTurn or remainingTurn, as returned by the preview.
The inclusive UTC start of the original turn, including any part already served.
The exclusive UTC end of the original turn.
Conflict identifiers explicitly acknowledged by the rotation editor.
Examplegenerated
{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ]}Terms for a direct assignment or its preview.
object
A nonempty operation identifier of at most 128 characters, required for writes. Reuse it only to retry the same write.
The rotation cell receiving the assignment.
The Slack user identifier of a person in the cell’s lane.
The requested inclusive UTC start. A current assignment begins at the actual transition time.
The exclusive UTC end, later than both the start and the write’s transition time.
The current arrangement revision when changing an existing assignment or previewing that change.
Optional turn selection returned by the assignment preview.
object
fullTurn or remainingTurn, as returned by the preview.
The inclusive UTC start of the original turn, including any part already served.
The exclusive UTC end of the original turn.
Conflict identifiers explicitly acknowledged by the rotation editor.
Examplegenerated
{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ]}Terms for a direct assignment or its preview.
object
A nonempty operation identifier of at most 128 characters, required for writes. Reuse it only to retry the same write.
The rotation cell receiving the assignment.
The Slack user identifier of a person in the cell’s lane.
The requested inclusive UTC start. A current assignment begins at the actual transition time.
The exclusive UTC end, later than both the start and the write’s transition time.
The current arrangement revision when changing an existing assignment or previewing that change.
Optional turn selection returned by the assignment preview.
object
fullTurn or remainingTurn, as returned by the preview.
The inclusive UTC start of the original turn, including any part already served.
The exclusive UTC end of the original turn.
Conflict identifiers explicitly acknowledged by the rotation editor.
Examplegenerated
{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ]}Terms for a direct assignment or its preview.
object
A nonempty operation identifier of at most 128 characters, required for writes. Reuse it only to retry the same write.
The rotation cell receiving the assignment.
The Slack user identifier of a person in the cell’s lane.
The requested inclusive UTC start. A current assignment begins at the actual transition time.
The exclusive UTC end, later than both the start and the write’s transition time.
The current arrangement revision when changing an existing assignment or previewing that change.
Optional turn selection returned by the assignment preview.
object
fullTurn or remainingTurn, as returned by the preview.
The inclusive UTC start of the original turn, including any part already served.
The exclusive UTC end of the original turn.
Conflict identifiers explicitly acknowledged by the rotation editor.
Examplegenerated
{ "operationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "expectedRevision": 1, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "acknowledgedConflictIds": [ "example" ]}Responses
Section titled “Responses”OK
The committed assignment result for an operation.
object
The submitted operation identifier.
The committed rotation version, also returned as an ETag.
The actual prospective transition start.
The arrangements changed by the operation, including cancelled records and any replacement.
An interval assignment. Its recorded terms remain distinct from actual served history.
object
The arrangement identifier.
The rotation identifier.
The rotation cell identifier.
The assigned person’s Slack user identifier.
The inclusive UTC start.
The exclusive UTC end.
The arrangement revision used when changing or ending it.
active or cancelled. An active record can describe an interval that has already ended.
directAssignment, acceptedCover or swapLeg. Direct-assignment writes change or end only directAssignment.
Original duty holders recorded before the first assignment, with completeness for this interval. Later edits retain that original record.
object
Distinct Slack user identifiers in the recorded portion of the arrangement interval.
Whether original duty is known throughout the interval. False includes assignments without an original record.
Original duty segments on detail reads. Null on list reads or when no original record is available.
object
The UTC time when the original duty was evaluated.
The inclusive UTC start of the returned interval.
The exclusive UTC end of the returned interval.
Whether every returned segment is resolved. An extension beyond the original recorded interval is unresolved.
Original holders by interval, including periods with no assignee and unresolved periods.
Effective duty during part of an assignment interval.
object
The inclusive UTC start.
The exclusive UTC end.
Slack user identifiers of the effective holders. An empty list means no assignee only when resolved is true.
Whether the holders or absence of duty are known for this interval.
The recorded full or remaining turn, or null when no verified selection was saved. Use the arrangement’s From and To for the affected interval.
object
fullTurn or remainingTurn.
The inclusive UTC start of the original turn, including any part already served.
The exclusive UTC end of the original turn.
pending or published for change-event publication. Neither value confirms that a Slack message has arrived.
Examplegenerated
{ "operationId": "example", "rotationVersion": 1, "effectiveFrom": "2026-04-15T12:00:00Z", "arrangements": [ { "id": "example", "rotationId": "example", "cellId": "example", "userId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "revision": 1, "state": "example", "kind": "example", "origin": { "userIds": [ "example" ], "complete": true }, "originalSnapshot": { "asOfUtc": "2026-04-15T12:00:00Z", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "complete": true, "segments": [ { "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "userIds": [ "example" ], "resolved": true } ] }, "turnSelection": { "kind": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" } } ], "deliveryState": "example"}