Location opening hours validation rules for days, times, formats, and operational constraints
Change Detection
SuspiciousRemovalOfOpeningHoursByDay
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingHoursByDay is present when previously submitted |
Opening Hours by Day
OpeningHoursByDayListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null | Link |
OpeningHoursByDayMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingHoursByDay is not an empty array |
Example Validation Report
{
"code": "VALIDATION__OpeningHoursByDayMustNotBeEmptyArray",
"message": "'{{field}}' must be omitted or contain at least one element; empty arrays are not allowed.",
"severity": "VIOLATION",
"context": {
"field": "openingHoursByDay"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.openingHoursByDay",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
OpeningHoursByDayUpdatedWhenLocationStatusIsTempClosed
| Preconditions |
|---|
locationStatus.status is TEMPORARY_CLOSED |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingHoursByDay match openingHoursByDay in the previous location (etag) version |
Example Validation Report
{
"code": "VALIDATION__OpeningHoursByDayUpdatedWhenLocationStatusIsTempClosed",
"severity": "WARNING",
"message": "Opening hours updated for location that is `TEMPORARY_CLOSED`"
}
OpeningHoursNotPresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingHoursByDay (recommended features) are present | Link |
Day
OpeningHoursDayMustBePresent
| Preconditions |
|---|
openingHoursByDay is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day is present | Link |
OpeningHoursDayMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day is not an empty string |
OpeningHoursDayMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day value is valid | Link |
OpeningHoursDayMustBeDistinct
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that each day value is distinct |
Times
HoursAreWithin06:00To11:00Range
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that all hours are not within the range of 06:00 and 11:00 |
InsufficientOpeningHoursByDayForCategory
| Preconditions |
|---|
categories is any of: restaurants, food, shopping |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that at least four (4) days are present |
MajorityOfHoursNotWithin08:00To20:00Range
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the majority of hours fall within the range of 08:00 and 20:00 |
OpeningHoursByDayNestedTimesMustNotBeEmptyArray
note
This validation replaces OpeningHoursByDayTimesListMustNotIncludeNulls. OpeningHoursByDayTimesListMustNotIncludeNulls is deprecated and will be removed in a future release.
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingHoursByDay[].times is not an empty array |
Example Validation Report
{
"code": "VALIDATION__OpeningHoursByDayNestedTimesMustNotBeEmptyArray",
"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.openingHoursByDay[0].times",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
OpeningHoursByDayTimesListMustNotIncludeNulls
note
Deprecated. Replaced by OpeningHoursByDayNestedTimesMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null | Link |
OpeningHoursTimesMustBePresent
| Preconditions |
|---|
openingHoursByDay is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that times is present | Link |
OpeningHoursStartTimeMustBePresent
| Preconditions |
|---|
times is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime is present |
OpeningHoursStartTimeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime is not an empty string |
OpeningHoursEndTimeMustBePresent
| Preconditions |
|---|
times is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime is present |
OpeningHoursEndTimeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime is not an empty string |
OpeningHoursStartTimeMustNotMatchEndTime
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime does not match endTime | Link |
OpeningHoursDaysTimesMustNotMatch
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that listed times do not match | Link |
OpeningHoursDaysTimesMustNotOverlap
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that listed times do not overlap | Link |
OpeningHoursStartTimeMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime formatting is valid | Link |
OpeningHoursEndTimeMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime formatting is valid | Link |
ShouldBeOpenMoreThanTwoHours
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed times during a day total at least two (2) hours |
ShouldBeOpenMoreThanOneHour
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed times during a day total at least one (1) hour |
SuspiciousWeekendRestriction
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that days are not restricted to only SATURDAY or SUNDAY, or just those days | Link |
SuspiciouslyShortClosureBetweenTimesInDay
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that minutes interval between times in a day is greater than threshold (15 minutes) | Link |
SuspiciousWeekdayTimeVariance
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a comparison of times between days Monday through Friday, inclusive, does not render a difference of four (4) hours | Link |