Skip to main content

Location special hours validation rules for dates, descriptions, closure status, and time constraints

Cross-feature​

SpecialHoursDescriptions_ExpectedLangTagForCountryNotPresent​

Preconditions
structuredAddress is present
DefinitionSeverityAPISampleMode
Validate that at least one (1) primary language tag is present corresponding to a language expected to be spoken in the Country identified by countryCode in structuredAddress
WARNING
POST_AND_PUT
S

SpecialHoursDescriptions_ExpectedLangTagForDerivedCountryNotPresent​

Preconditions
displayPoint is present
structuredAddress is not present
DefinitionSeverityAPISampleMode
Validate that at least one (1) primary language tag is present corresponding to a language expected to be spoken in the Country derived from reverse geocoding Display Point coordinates
WARNING
POST_AND_PUT
A

SpecialHours_ExpectedRegionSubtagForDerivedCountryNotPresent​

Preconditions
displayPoint is present
mainAddress is not present
DefinitionSeverityAPISampleMode
Validate that at least one (1) Region Subtag is present that corresponds with a country derived from displayPoint
INFO
POST_AND_PUT
A

SpecialHours_ExpectedRegionSubtagForCountryNotPresent​

Preconditions
structuredAddress is present
DefinitionSeverityAPISampleMode
Validate that at least one (1) Region Subtag is present that corresponds with countryCode in structuredAddress
INFO
POST_AND_PUT
S

Dates​

DateInRangeHasNoCorrespondingDaySpecified​

Preconditions
closed is false
Date range is 7 days or less
DefinitionSeverityAPISampleMode
Validate that each date in a range has a corresponding day specified
VIOLATION
POST_AND_PUT
Link
Example Validation Report
{
"code": "VALIDATION__DateInRangeHasNoCorrespondingDaySpecified",
"severity": "VIOLATION",
"message": "Special Hours date range includes date with no corresponding '{{value}}' day specified",
"context": {
"value": "TUESDAY"
},
"details": {
"createdDate": "2026-06-02T11:36:02.00Z",
"expected": [
{
"field": "$.locationDetails.specialHours[0].hoursByDay.day",
"value": "TUESDAY"
}
],
"compared": [],
"submitted": []
}
}

EndDateNotWithinRange​

DefinitionSeverityAPISampleMode
Validate that the year in endDate is not more than ten (10) years (plus/minus) from the current (system) date/time
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__EndDateNotWithinRange",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'endDate' is not within an acceptable range",
"context": {
"value": "0201-12-24"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours[0].endDate",
"value": "0201-12-24"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}

StartDateNotWithinRange​

DefinitionSeverityAPISampleMode
Validate that the year in startDate is not more than ten (10) years (plus/minus) from the current (system) date/time
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__StartDateNotWithinRange",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'startDate' is not within an acceptable range",
"context": {
"value": "0201-12-27"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours[0].startDate",
"value": "0201-12-27"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}

SpecialHoursStartDateOccursBeforeLocationOpeningDate​

Preconditions
locationStatus.status is OPENING_SOON
Special hours closed is false or not present
DefinitionSeverityAPISampleMode
Validate that added special hours do not possess a startDate that occurs before the openingDate
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__SpecialHoursStartDateOccursBeforeLocationOpeningDate",
"severity": "VIOLATION",
"message": "Special hours `startDate` occurs when `locationStatus` is `OPENING_SOON`",
"details": {
"createdDate": "2026-08-10T11:36:02.000Z",
"submitted": [
{
"field": "$.specialHours[0]",
"value": {
"hoursByDay": [
{
"day": "THURSDAY",
"times": [
{
"startTime": "09:00",
"endTime": "12:00"
}
]
}
],
"startDate": "2026-11-27",
"endDate": "2026-11-27",
"closed": "false",
"descriptions": [
{
"text": "Early Closing Thanksgiving Holiday (USA branches)",
"locale": "en-US"
}
]
}
}
],
"compared": [
{
"field": "$.locationDetails.locationStatus",
"value": {
"status": "OPENING_SOON",
"openingDate": "2026-11-30"
}
}
],
"expected": []
}
}

SpecialHoursStartDateOccursWhenLocationStatusIsTempClosed​

Preconditions
locationStatus.status is TEMPORARILY_CLOSED
Special hours closed is false or not present
DefinitionSeverityAPISampleMode
Validate that special hours do not possess a startDate that occurs during the timeframe when location status is TEMPORARILY_CLOSED
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__SpecialHoursStartDateOccursWhenLocationStatusIsTempClosed",
"severity": "VIOLATION",
"message": "Special hours `startDate` occurs when `locationStatus` is `TEMPORARILY_CLOSED`",
"details": {
"createdDate": "2026-08-10T11:36:02.000Z",
"submitted": [
{
"field": "$.specialHours[0]",
"value": {
"hoursByDay": [
{
"day": "THURSDAY",
"times": [
{
"startTime": "09:00",
"endTime": "12:00"
}
]
}
],
"startDate": "2026-11-27",
"endDate": "2026-11-27",
"closed": "false",
"descriptions": [
{
"text": "Early Closing Thanksgiving Holiday (USA branches)",
"locale": "en-US"
}
]
}
}
],
"compared": [
{
"field": "$.locationDetails.locationStatus",
"value": {
"status": "TEMPORARILY_CLOSED",
"closedDate": "2026-09-01",
"reopenDate": "2026-11-30"
}
}
],
"expected": []
}
}

SpecialHoursEndDateMustNotBeBeforeStartDate​

DefinitionSeverityAPISampleMode
Validate that endDate is not before startDate
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__SpecialHoursEndDateMustNotBeBeforeStartDate",
"severity": "VIOLATION",
"message": "Special Hours `startDate` must be before `endDate`",
"details": {
"createdDate": "2026-02-10T11:36:02.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours[0].endDate",
"value": "2014-12-31"
}
],
"compared": [],
"expected": []
}
}

SpecialHoursDateRangeExceedsNinetyDays​

DefinitionSeverityAPISampleMode
Validate that the quantity of days derived from startDate and endDate, for one (1) Special Hours listing, is not greater than 90 days
WARNING
POST_AND_PUT
Link
Example Validation Report
{
"code": "VALIDATION__SpecialHoursDateRangeExceedsNinetyDays",
"severity": "WARNING",
"message": "Listed date range is more than ninety (90) days",
"details": {
"createdDate": "2026-03-03T13:58:43.946Z",
"submitted": [],
"compared": [],
"expected": []
}
}

SpecialHoursDatesMustNotOverlap​

DefinitionSeverityAPISampleMode
Validate that listed dates do not overlap
VIOLATION
POST_AND_PUT
Link
Example Validation Report
{
"code": "VALIDATION__SpecialHoursDatesMustNotOverlap",
"severity": "VIOLATION",
"message": "Date ranges overlap among listings",
"details": {
"createdDate": "2026-03-03T13:58:43.946Z",
"submitted": [],
"compared": [],
"expected": []
}
}

SpecialHoursEndDateMustBePresent​

Preconditions
specialHours is present
DefinitionSeverityAPISampleMode
Validate that endDate is present
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursEndDateMustHaveValidFormat​

DefinitionSeverityAPISampleMode
Validate that formatting of endDate is valid
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__SpecialHoursEndDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'endDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours.endDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}

SpecialHoursStartDateMustBePresent​

Preconditions
specialHours is present
DefinitionSeverityAPISampleMode
Validate that startDate is present
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursStartDateMustHaveValidFormat​

DefinitionSeverityAPISampleMode
Validate that formatting of startDate is valid
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__SpecialHoursStartDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'startDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours.startDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}

Day​

DayAndTimesMustBePresentWhenNotClosed​

DefinitionSeverityAPISampleMode
Validate that day and times are present when closed is false
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursDayMustBeValid​

DefinitionSeverityAPISampleMode
Validate that day value is valid
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursDayMustBeDistinct​

DefinitionSeverityAPISampleMode
Validate that each day is distinct
VIOLATION
POST_AND_PUT
S

SpecifiedDayMustCoincideWithDateInRange​

DefinitionSeverityAPISampleMode
Validate that a day value coincides with at least one date on or between startDate and endDate
VIOLATION
POST_AND_PUT
Link
Example Validation Report
{
"code": "VALIDATION__SpecifiedDayMustCoincideWithDateInRange",
"severity": "VIOLATION",
"message": "'{{value}}' in field 'day' is not coincident with any date in range",
"context": {
"value": "FRIDAY"
},
"details": {
"createdDate": "2026-02-10T11:36:02.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours[0].hoursByDay[0].day",
"value": "FRIDAY"
}
],
"compared": [],
"expected": []
}
}

Descriptions​

SpecialHoursDescriptionsTextShouldNotMatch​

DefinitionSeverityAPISampleMode
Validate that text does not match among different locale values
WARNING
POST_AND_PUT
S

SpecialHoursDescriptionsTextMustNotExceedMaximum​

DefinitionSeverityAPISampleMode
Validate that text length does not exceed a maximum value (255)
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsTextLengthMustExceedMinimum​

DefinitionSeverityAPISampleMode
Validate that text length exceeds a minimum value (5)
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsTextMustNotIncludeVulgarWord​

DefinitionSeverityAPISampleMode
Validate that text does not include a vulgar word
VIOLATION
POST_AND_PUT
A

SpecialHoursLocaleMustNotBeEmpty​

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

SpecialHoursLocaleMustBeDistinct​

DefinitionSeverityAPISampleMode
Validate that each locale is distinct
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsRequiresAtLeastOneSupportedLocale​

DefinitionSeverityAPISampleMode
Validate that at least one (1) supported locale is present
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsLocaleMustBeValid​

DefinitionSeverityAPISampleMode
Validate that locale is valid
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursDescriptionsTextMustNotBeDummyCharacters​

DefinitionSeverityAPISampleMode
Validate that text is not exclusively dummy characters
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursDescriptionsTextHasSuspectedUnintentionalSequentialWordRepetition​

DefinitionSeverityAPISampleMode
Validate that text does not include an unintentional repetitive sequence of words
WARNING
POST_AND_PUT
S

SpecialHoursIncludesUnsupportedLocale​

DefinitionSeverityAPISampleMode
Validate that an unsupported locale value is not present
WARNING
POST_AND_PUT
S

SpecialHoursDescriptionsTextMustNotBeEmpty​

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

SpecialHoursDescriptionsTextMustNotIncludeURL​

DefinitionSeverityAPISampleMode
Validate that text does not include a URL
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursDescriptionsTextMustNotBeEntirelyNumeric​

DefinitionSeverityAPISampleMode
Validate that the text value is not entirely numeric
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsListMustNotIncludeNulls​

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

SpecialHoursDescriptionsTextMustBePresent​

Preconditions
descriptions is present
DefinitionSeverityAPISampleMode
Validate that text is present
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsLocaleMustBePresent​

Preconditions
descriptions is present
DefinitionSeverityAPISampleMode
Validate that SpecialHoursDescriptionsRequiresAtLeastOneSupportedLocale is present
VIOLATION
POST_AND_PUT
S

SpecialHoursDescriptionsTextHasUnsupportedCharacter​

DefinitionSeverityAPISampleMode
Validate that text does not include an unsupported character
VIOLATION
POST_AND_PUT
Link
S

Hours by Day​

HoursByDayMustNotBePresentWhenClosed​

DefinitionSeverityAPISampleMode
Validate that hoursByDay are not present when closed is true
VIOLATION
POST_AND_PUT
Link

HoursByDayMustBePresentWhenNotClosed​

DefinitionSeverityAPISampleMode
Validate that hoursByDay are present when closed is false or not present
VIOLATION
POST_AND_PUT
S

SpecialHoursDayMustNotBeEmpty​

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

SpecialHoursHoursByDayListMustNotIncludeNulls​

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

Special Hours​

CountOfValuesInSpecialHoursListExceedsThreshold​

DefinitionSeverityAPISampleMode
Validate that the count of items in specialHours does not exceed fifty (50)
VIOLATION
POST_AND_PUT
S

SpecialHoursListMustNotIncludeNulls​

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

SpecialHoursMustNotBeEmptyArray​

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

Times​

SpecialHoursDaysTimesMustNotMatch​

DefinitionSeverityAPISampleMode
Validate that listed times do not match
VIOLATION
POST_AND_PUT
S

SpecialHoursDaysTimesMustNotOverlap​

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

SpecialHoursTimesStartTimeMustNotBeEmpty​

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

SpecialHoursTimesEndTimeMustNotBeEmpty​

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

SpecialHoursStartTimeMustNotMatchEndTime​

DefinitionSeverityAPISampleMode
Validate that startTime does not match endTime
VIOLATION
POST_AND_PUT
Link

SpecialHoursStartTimeMustHaveValidFormat​

DefinitionSeverityAPISampleMode
Validate that startTime formatting is valid
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursEndTimeMustHaveValidFormat​

DefinitionSeverityAPISampleMode
Validate that endTime formatting is valid
VIOLATION
POST_AND_PUT
Link
S

SpecialHoursHourByDayTimesListMustNotIncludeNulls​

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

SpecialHoursTimesMustBePresent​

Preconditions
specialHours[].hoursByDay[] is present
DefinitionSeverityAPISampleMode
Validate that times is present
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code" : "VALIDATION__SpecialHoursTimesMustBePresent",
"severity": "VIOLATION",
"message" : "'{{field}}' must be present",
"context": {
"field": "times"
},
"details": {
"createdDate": "2026-03-03T13:58:43.946Z",
"submitted": [],
"compared": [],
"expected": []
}
}