Skip to main content

Location service hours validation rules for categories, days, times, and scheduling requirements

Change Detection

SuspiciousRemovalOfServiceHours

DefinitionSeverityAPISampleMode
Validate that serviceHours is present when previously submitted
WARNING
PUT
S

TopLevelServiceHourCategoryChanged

DefinitionSeverityAPISampleMode
Validate that the top level category in the latest submittal matches the top level category in the previous submittal
WARNING
PUT
Link
S

TopLevelServiceHourCategoryUnmatched

DefinitionSeverityAPISampleMode
Validate that a top level category in the previous submittal is matched in the latest submittal
WARNING
PUT
S

Day

ServiceHoursHoursByDayDayMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that day is not an empty string
VIOLATION
POST_AND_PUT
S

ServiceHoursHoursByDayDayMustBeValid

DefinitionSeverityAPISampleMode
Validate that day value is valid
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursHoursByDayDayMustBeDistinct

DefinitionSeverityAPISampleMode
Validate that each day is distinct
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursHoursByDayDayMustBePresent

Preconditions
serviceHours is present
DefinitionSeverityAPISampleMode
Validate that day is present
VIOLATION
POST_AND_PUT
Link
S

Hours by Day

ServiceHoursHourByDayListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST_AND_PUT
S

ServiceHoursHoursByDayMustBePresent

Preconditions
serviceHours is present
DefinitionSeverityAPISampleMode
Validate that hoursByDay is present
VIOLATION
POST_AND_PUT
Link
S

Service Hours

ServiceHoursListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST_AND_PUT
S

ServiceHoursMustNotBeEmptyArray

DefinitionSeverityAPISampleMode
Validate that serviceHours is not an empty array
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__ServiceHoursMustNotBeEmptyArray",
"message": "'{{field}}' must be omitted or contain at least one element; empty arrays are not allowed.",
"severity": "VIOLATION",
"context": {
"field": "serviceHours"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.serviceHours",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}

ServiceHoursUpdatedWhenLocationStatusIsTempClosed

Preconditions
locationStatus.status is TEMPORARY_CLOSED
DefinitionSeverityAPISampleMode
Validate that serviceHours match serviceHours in the previous location (etag) version
WARNING
PUT
S
Example Validation Report
{
"code": "VALIDATION__ServiceHoursUpdatedWhenLocationStatusIsTempClosed",
"severity": "WARNING",
"message": "Service hours updated for location that is `TEMPORARY_CLOSED`"
}

Category

ServiceHoursCategoryShouldBePrecise

DefinitionSeverityAPISampleMode
Validate that category value is not a top-level category
WARNING
POST_AND_PUT
S

ServiceHoursCategoryMustBePresent

Preconditions
serviceHours is present
DefinitionSeverityAPISampleMode
Validate that category is present
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursCategoryMustNotBeDeprecated

DefinitionSeverityAPISampleMode
Validate that category value is not deprecated
VIOLATION
POST_AND_PUT
S

ServiceHoursCategoryMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that category is not an empty string
VIOLATION
POST_AND_PUT
S

ServiceHoursCategoryMustBeValid

DefinitionSeverityAPISampleMode
Validate that category value is valid
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursCategoryMustBeDistinct

DefinitionSeverityAPISampleMode
Validate that each listed category is distinct
VIOLATION
POST_AND_PUT
S

Times

ServiceHoursHourByDayTimesListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST_AND_PUT
S

ServiceHoursDaysTimesMustNotMatch

DefinitionSeverityAPISampleMode
Validate that listed times do not match
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursDaysTimesMustNotOverlap

DefinitionSeverityAPISampleMode
Validate that listed times during a day do not overlap
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursHoursByDayEndTimeMustBePresent

Preconditions
times is present
DefinitionSeverityAPISampleMode
Validate that endTime is present
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursHoursByDayEndTimeMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that endTime is not an empty string
VIOLATION
POST_AND_PUT
S

ServiceHoursHoursByDayEndTimeMustHaveValidFormat

DefinitionSeverityAPISampleMode
Validate that endTime formatting is valid
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursHoursByDayStartTimeMustBePresent

Preconditions
times is present
DefinitionSeverityAPISampleMode
Validate that startTime is present
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursHoursByDayStartTimeMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that startTime is not an empty string
VIOLATION
POST_AND_PUT
S

ServiceHoursHoursByDayStartTimeMustHaveValidFormat

DefinitionSeverityAPISampleMode
Validate that startTime formatting is valid
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursNestedTimesMustNotBeEmptyArray

DefinitionSeverityAPISampleMode
Validate that serviceHours[].hoursByDay[].times is not an empty array
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__ServiceHoursNestedTimesMustNotBeEmptyArray",
"message": "'{{field}}' must be omitted or contain at least one element; empty arrays are not allowed.",
"severity": "VIOLATION",
"context": {
"field": "times"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.serviceHours[0].hoursByDay[0].times",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}

ServiceHoursStartTimeMustNotMatchEndTime

DefinitionSeverityAPISampleMode
Validate that startTime does not match endTime
VIOLATION
POST_AND_PUT
Link
S

ServiceHoursTimesMustBePresent

Preconditions
serviceHours is present
DefinitionSeverityAPISampleMode
Validate that times is present
VIOLATION
POST_AND_PUT
S