Days
Ask
List days
GET/v1/teams/{teamId}/daysLists day records for a team.
Required scopes: day:read
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
query.startDate | string:dateOptional inclusive start date filter in YYYY-MM-DD format. |
query.endDate | string:dateOptional inclusive end date filter in YYYY-MM-DD format. |
query.includeHistorical | booleanSet to true to include historical days when no startDate or endDate is provided. Defaults to false. |
query.limit | integerMaximum number of records to return. Defaults to 50 and is capped at 200. |
query.cursor | stringOpaque cursor returned by page.nextCursor. Reuse the same credential, endpoint, and filters within 24 hours; restart pagination after expiration or credential changes. |
Response 200
data | object[] |
|---|---|
data[].id | string:uuidDay identifier. |
data[].orgId | string:uuidTeam identifier. |
data[].name | stringDay display name. |
data[].date | stringCalendar date for the day in YYYY-MM-DD format. |
data[].timezone | stringIANA timezone for the day. |
data[].location | stringOptional city, venue, or location label. |
data[].customLocationSelected | booleanWhether the day location was explicitly entered as a custom location. Omitted for older days whose location source is unknown. |
data[].color | stringHex color reference for the day label, formatted as #RRGGBB. |
data[].visibility | objectOptional visibility rules for the day. |
data[].visibility.groupIds | string:uuid[] |
data[].visibility.userIds | string:uuid[] |
data[].latitude | numberLatitude in decimal degrees. |
data[].longitude | numberLongitude in decimal degrees. |
data[].isDeleted | booleanSoft-delete flag. |
data[].version | integerCurrent day aggregate version. |
data[].cursor | integerLatest cursor projected into this day record. |
page | object |
page.limit | integerMaximum number of records returned in this page. |
page.nextCursor | string | nullOpaque cursor to pass as the next request's cursor query parameter with the same credential, endpoint, and filters within 24 hours, or null when there are no more results. Restart pagination after expiration or credential changes. |
meta | object |
meta.cursor | number | nullHighest record cursor represented by this response. |
Create a day
POST/v1/teams/{teamId}/daysAccepts a command to create a day.
Required scopes: day:write
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
header.Idempotency-Key | string:uuidOptional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request. |
Request body (application/json)
namerequired | stringDay display name. |
|---|---|
daterequired | stringCalendar date for the day in YYYY-MM-DD format. |
timezonerequired | stringIANA timezone for the day. |
location | stringOptional city, venue, or location label. |
customLocationSelected | booleanWhether the day location was explicitly entered as a custom location. Omitted for older days whose location source is unknown. |
color | stringHex color reference for the day label, formatted as #RRGGBB. |
visibility | objectOptional visibility rules for the day. |
visibility.groupIds | string:uuid[] |
visibility.userIds | string:uuid[] |
latitude | numberLatitude in decimal degrees. |
longitude | numberLongitude in decimal degrees. |
id | string:uuidOptional caller-supplied day ID. RoadOps generates one when omitted. |
Response 202
commandId | string:uuidCommand identifier accepted into the RoadOps command ledger. |
|---|---|
resourceId | string:uuidIdentifier of the resource targeted by the command. |
resourceType | stringResource type targeted by the command. |
status | "applied"Command dispatch status. |
aggregateVersion | integerAggregate version produced by the accepted command. |
cursor | integerCursor for the accepted update. Refetch until returned records reach this cursor. |
links | object |
links.refetch | stringRelative 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.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
Response 200
data | object |
|---|---|
data.id | string:uuidDay identifier. |
data.orgId | string:uuidTeam identifier. |
data.name | stringDay display name. |
data.date | stringCalendar date for the day in YYYY-MM-DD format. |
data.timezone | stringIANA timezone for the day. |
data.location | stringOptional city, venue, or location label. |
data.customLocationSelected | booleanWhether the day location was explicitly entered as a custom location. Omitted for older days whose location source is unknown. |
data.color | stringHex color reference for the day label, formatted as #RRGGBB. |
data.visibility | objectOptional visibility rules for the day. |
data.visibility.groupIds | string:uuid[] |
data.visibility.userIds | string:uuid[] |
data.latitude | numberLatitude in decimal degrees. |
data.longitude | numberLongitude in decimal degrees. |
data.isDeleted | booleanSoft-delete flag. |
data.version | integerCurrent day aggregate version. |
data.cursor | integerLatest cursor projected into this day record. |
meta | object |
meta.cursor | integerHighest 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.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
header.Idempotency-Key | string:uuidOptional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request. |
Request body (application/json)
expectedVersion | integerOptional aggregate version guard. |
|---|---|
updatesrequired | object |
updates.customLocationSelected | booleanWhether the day location was explicitly entered as a custom location. Omitted for older days whose location source is unknown. |
updates.name | stringUpdated day display name. |
updates.timezone | stringUpdated IANA timezone identifier. |
updates.location | string | nullUpdated city, venue, or location label, or null to clear it. |
updates.color | string | nullUpdated hex color reference for the day label, or null to clear it. |
updates.visibility | object | nullUpdated visibility rules or null to clear them. |
updates.visibility.groupIds | string:uuid[] |
updates.visibility.userIds | string:uuid[] |
updates.latitude | number | nullUpdated latitude in decimal degrees, or null to clear it. |
updates.longitude | number | nullUpdated longitude in decimal degrees, or null to clear it. |
Response 202
commandId | string:uuidCommand identifier accepted into the RoadOps command ledger. |
|---|---|
resourceId | string:uuidIdentifier of the resource targeted by the command. |
resourceType | stringResource type targeted by the command. |
status | "applied"Command dispatch status. |
aggregateVersion | integerAggregate version produced by the accepted command. |
cursor | integerCursor for the accepted update. Refetch until returned records reach this cursor. |
links | object |
links.refetch | stringRelative 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.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
header.Idempotency-Key | string:uuidOptional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request. |
Response 202
commandId | string:uuidCommand identifier accepted into the RoadOps command ledger. |
|---|---|
resourceId | string:uuidIdentifier of the resource targeted by the command. |
resourceType | stringResource type targeted by the command. |
status | "applied"Command dispatch status. |
aggregateVersion | integerAggregate version produced by the accepted command. |
cursor | integerCursor for the accepted update. Refetch until returned records reach this cursor. |
links | object |
links.refetch | stringRelative URL to refetch the affected resource. |