Location service hours validation rules for categories, days, times, and scheduling requirements
Change Detection
SuspiciousRemovalOfServiceHours
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that serviceHours is present when previously submitted |
TopLevelServiceHourCategoryChanged
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that the top level category in the latest submittal matches the top level category in the previous submittal | Link |
TopLevelServiceHourCategoryUnmatched
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a top level category in the previous submittal is matched in the latest submittal |
Day
ServiceHoursHoursByDayDayMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day is not an empty string |
ServiceHoursHoursByDayDayMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day value is valid | Link |
ServiceHoursHoursByDayDayMustBeDistinct
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that each day is distinct | Link |
ServiceHoursHoursByDayDayMustBePresent
| Preconditions |
|---|
serviceHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day is present | Link |
Hours by Day
ServiceHoursHourByDayListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
ServiceHoursHoursByDayMustBePresent
| Preconditions |
|---|
serviceHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that hoursByDay is present | Link |
Service Hours
ServiceHoursListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
ServiceHoursMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that serviceHours is not an empty array |
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 |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that serviceHours match serviceHours in the previous location (etag) version |
Example Validation Report
{
"code": "VALIDATION__ServiceHoursUpdatedWhenLocationStatusIsTempClosed",
"severity": "WARNING",
"message": "Service hours updated for location that is `TEMPORARY_CLOSED`"
}
Category
ServiceHoursCategoryShouldBePrecise
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that category value is not a top-level category |
ServiceHoursCategoryMustBePresent
| Preconditions |
|---|
serviceHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that category is present | Link |
ServiceHoursCategoryMustNotBeDeprecated
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that category value is not deprecated |
ServiceHoursCategoryMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that category is not an empty string |
ServiceHoursCategoryMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that category value is valid | Link |
ServiceHoursCategoryMustBeDistinct
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that each listed category is distinct |
Times
ServiceHoursHourByDayTimesListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
ServiceHoursDaysTimesMustNotMatch
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed times do not match | Link |
ServiceHoursDaysTimesMustNotOverlap
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed times during a day do not overlap | Link |
ServiceHoursHoursByDayEndTimeMustBePresent
| Preconditions |
|---|
times is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime is present | Link |
ServiceHoursHoursByDayEndTimeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime is not an empty string |
ServiceHoursHoursByDayEndTimeMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime formatting is valid | Link |
ServiceHoursHoursByDayStartTimeMustBePresent
| Preconditions |
|---|
times is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime is present | Link |
ServiceHoursHoursByDayStartTimeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime is not an empty string |
ServiceHoursHoursByDayStartTimeMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime formatting is valid | Link |
ServiceHoursNestedTimesMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that serviceHours[].hoursByDay[].times is not an empty array |
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
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime does not match endTime | Link |
ServiceHoursTimesMustBePresent
| Preconditions |
|---|
serviceHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that times is present |