RoadOpsDeveloper

Days

Ask

List days

GET/v1/teams/{teamId}/days

Lists day records for a team.

Required scopes: day:read

Parameters

path.teamIdrequiredstring:uuid

Team identifier.

query.startDatestring:date

Optional inclusive start date filter in YYYY-MM-DD format.

query.endDatestring:date

Optional inclusive end date filter in YYYY-MM-DD format.

query.includeHistoricalboolean

Set to true to include historical days when no startDate or endDate is provided. Defaults to false.

query.limitinteger

Maximum number of records to return. Defaults to 50 and is capped at 200.

query.cursorstring

Cursor returned by page.nextCursor from the previous list response.

Response 200

dataobject[]
data[].idstring:uuid

Day identifier.

data[].orgIdstring:uuid

Team identifier.

data[].namestring

Day display name.

data[].datestring

Calendar date for the day in YYYY-MM-DD format.

data[].timezoneobject

IANA timezone for the day.

data[].locationstring

Optional city, venue, or location label.

data[].colorstring

Hex color reference for the day label, formatted as #RRGGBB.

data[].visibilityobject

Optional visibility rules for the day.

data[].visibility.groupIdsstring:uuid[]
data[].visibility.userIdsstring:uuid[]
data[].latitudenumber

Latitude in decimal degrees.

data[].longitudenumber

Longitude in decimal degrees.

data[].isDeletedboolean

Soft-delete flag.

data[].versioninteger

Current day aggregate version.

data[].cursorinteger

Latest event-ledger cursor projected into this day record.

pageobject
page.limitinteger

Maximum number of records returned in this page.

page.nextCursorstring | null

Cursor to pass as the next request's cursor query parameter, or null when there are no more results.

metaobject
meta.cursornumber | null

Highest record cursor represented by this response.

Create a day

POST/v1/teams/{teamId}/days

Accepts a command to create a day.

Required scopes: day:write

Parameters

path.teamIdrequiredstring:uuid

Team identifier.

header.Idempotency-Keystring:uuid

Optional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request.

Request body (application/json)

namerequiredstring

Day display name.

daterequiredstring

Calendar date for the day in YYYY-MM-DD format.

timezonerequiredobject

IANA timezone for the day.

locationstring

Optional city, venue, or location label.

colorstring

Hex color reference for the day label, formatted as #RRGGBB.

visibilityobject

Optional visibility rules for the day.

visibility.groupIdsstring:uuid[]
visibility.userIdsstring:uuid[]
latitudenumber

Latitude in decimal degrees.

longitudenumber

Longitude in decimal degrees.

idstring:uuid

Optional caller-supplied day ID. RoadOps generates one when omitted.

Response 202

commandIdstring:uuid

Command identifier accepted into the RoadOps command ledger.

resourceIdstring:uuid

Identifier of the resource targeted by the command.

resourceTypestring

Resource type targeted by the command.

status"applied"

Command dispatch status.

aggregateVersioninteger

Aggregate version produced by the accepted command.

cursorinteger

Event-ledger cursor for the accepted update. Refetch until returned records reach this cursor.

linksobject
links.refetchstring

Relative URL to refetch the affected resource.

Retrieve a day

GET/v1/teams/{teamId}/days/{dayId}

Returns a single day record by ID.

Required scopes: day:read

Parameters

path.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

Response 200

dataobject
data.idstring:uuid

Day identifier.

data.orgIdstring:uuid

Team identifier.

data.namestring

Day display name.

data.datestring

Calendar date for the day in YYYY-MM-DD format.

data.timezoneobject

IANA timezone for the day.

data.locationstring

Optional city, venue, or location label.

data.colorstring

Hex color reference for the day label, formatted as #RRGGBB.

data.visibilityobject

Optional visibility rules for the day.

data.visibility.groupIdsstring:uuid[]
data.visibility.userIdsstring:uuid[]
data.latitudenumber

Latitude in decimal degrees.

data.longitudenumber

Longitude in decimal degrees.

data.isDeletedboolean

Soft-delete flag.

data.versioninteger

Current day aggregate version.

data.cursorinteger

Latest event-ledger cursor projected into this day record.

metaobject
meta.cursorinteger

Highest record cursor represented by this response.

Update a day

PATCH/v1/teams/{teamId}/days/{dayId}

Accepts a command to update a day.

Required scopes: day:write

Parameters

path.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

header.Idempotency-Keystring:uuid

Optional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request.

Request body (application/json)

expectedVersioninteger

Optional aggregate version guard.

updatesrequiredobject
updates.namestring

Updated day display name.

updates.timezoneobject

Updated IANA timezone identifier.

updates.locationstring | null

Updated city, venue, or location label, or null to clear it.

updates.colorstring | null

Updated hex color reference for the day label, or null to clear it.

updates.visibilityobject | null

Updated visibility rules or null to clear them.

updates.visibility.groupIdsstring:uuid[]
updates.visibility.userIdsstring:uuid[]
updates.latitudenumber | null

Updated latitude in decimal degrees, or null to clear it.

updates.longitudenumber | null

Updated longitude in decimal degrees, or null to clear it.

Response 202

commandIdstring:uuid

Command identifier accepted into the RoadOps command ledger.

resourceIdstring:uuid

Identifier of the resource targeted by the command.

resourceTypestring

Resource type targeted by the command.

status"applied"

Command dispatch status.

aggregateVersioninteger

Aggregate version produced by the accepted command.

cursorinteger

Event-ledger cursor for the accepted update. Refetch until returned records reach this cursor.

linksobject
links.refetchstring

Relative URL to refetch the affected resource.

Delete a day

DELETE/v1/teams/{teamId}/days/{dayId}

Accepts a command to delete a day.

Required scopes: day:write

Parameters

path.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

header.Idempotency-Keystring:uuid

Optional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request.

Response 202

commandIdstring:uuid

Command identifier accepted into the RoadOps command ledger.

resourceIdstring:uuid

Identifier of the resource targeted by the command.

resourceTypestring

Resource type targeted by the command.

status"applied"

Command dispatch status.

aggregateVersioninteger

Aggregate version produced by the accepted command.

cursorinteger

Event-ledger cursor for the accepted update. Refetch until returned records reach this cursor.

linksobject
links.refetchstring

Relative URL to refetch the affected resource.