Location status validation rules for closure dates, reopen dates, and operational status values
Location Status
LocationStatusMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that locationStatus is present |
NewLocationIsClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that locationStatus is not CLOSED | Link |
Example Validation Report
{
"code": "VALIDATION__NewLocationIsClosed",
"severity": "WARNING",
"message": "New Location's locationStatus is CLOSED",
"details": {
"createdDate": "2026-02-10T11:36:02.00Z",
"submitted": [
{
"field": "$.locationDetails.locationStatus.status",
"value": "CLOSED"
}
],
"compared": [],
"expected": []
}
}
UpdatedLocationIsStillClosed
| Preconditions |
|---|
Current stored record's locationStatus is "CLOSED" |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that locationStatus is not "CLOSED" |
Example Validation Report
{
"code": "VALIDATION__UpdatedLocationIsStillClosed",
"severity": "VIOLATION",
"message": "A `CLOSED` location should not be updated if still `CLOSED`"
}
Closed Date
ClosedDateMustBeBeforeReopenDate
| Preconditions |
|---|
status is "TEMPORARILY_CLOSED" |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the closedDate is before reopenDate |
Example Validation Report
{
"code": "VALIDATION__ClosedDateMustBeBeforeReopenDate",
"severity": "VIOLATION",
"message": "`closedDate` value is `{{value}}` which is after `reopenDate`",
"context": {
"value": "2026-06-23"
}
}
ClosedDateMustNotBePresentWhenStatusIsOpeningSoon
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that closedDate is not present when status is OPENING_SOON |
Example Validation Report
{
"code": "VALIDATION__ClosedDateMustNotBePresentWhenStatusIsOpeningSoon",
"severity": "VIOLATION",
"message": "'{{field}}' must not be present when `status` is `OPENING_SOON`",
"context": {
"field": "$.locationDetails.locationStatus.closedDate"
}
}
ClosedDateMustNotBeFutureTimestamp
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that closedDate is not a future timestamp | Link |
ClosedDateMustBePresentWhenStatusIsClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that closedDate is present when status is "CLOSED" | Link |
ClosedDateMustBePresentWhenStatusIsTemporarilyClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that closedDate is present when status is "TEMPORARILY_CLOSED" | Link |
OnlyClosedDateMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that reopenDate is not present when status is "CLOSED" | Link |
Example Validation Report
{
"code": "VALIDATION__OnlyClosedDateMustBePresent",
"severity": "VIOLATION",
"message": "Field '{{field}}' must not be present when `CLOSED`",
"context": {
"field": "reopenDate"
}
}
LocationStatusClosedDateMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that formatting of closedDate is valid |
Example Validation Report
{
"code": "VALIDATION__LocationStatusClosedDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'closedDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.locationStatus.closedDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}
Opening Date
LocationStatusOpeningDateMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that formatting of openingDate is valid |
Example Validation Report
{
"code": "VALIDATION__LocationStatusOpeningDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'openingDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.locationStatus.openingDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}
OpeningDateMustBeFutureTimestamp
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingDate is a future timestamp |
Example Validation Report
{
"code": "VALIDATION__OpeningDateMustBeFutureTimestamp",
"severity": "WARNING",
"message": "Value '{{value}}' in field 'openingDate' is not a future opening date",
"context": {
"value": "2026-11-05"
},
"details": {
"createdDate": "2026-07-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.locationStatus.openingDate",
"value": "2026-11-05"
}
],
"compared": [],
"expected": []
}
}
OpeningDateTooFarIntoFuture
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingDate is not more than one hundred and eighty (180) days in advance of the current (system) timestamp |
Example Validation Report
{
"code": "VALIDATION__OpeningDateTooFarIntoFuture",
"severity": "VIOLATION",
"message": "'openingDate' '{{value}}' is more than 180 days into future",
"context": {
"value": "2030-11-05"
},
"details": {
"createdDate": "2026-10-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.locationStatus.openingDate",
"value": "2030-11-05"
}
],
"compared": [],
"expected": []
}
}
OpeningDateMustBePresentWhenStatusIsOpeningSoon
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingDate is present when status is OPENING_SOON |
Example Validation Report
{
"code": "VALIDATION__OpeningDateMustBePresentWhenStatusIsOpeningSoon",
"severity": "VIOLATION",
"message": "'{{field}}' must be present when `status` is `OPENING_SOON`",
"context": {
"field": "$.locationDetails.locationStatus.openingDate"
}
}
OpeningDateMustNotBePresentWhenStatusIsClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingDate is not present when status is CLOSED |
Example Validation Report
{
"code": "VALIDATION__OpeningDateMustNotBePresentWhenStatusIsClosed",
"severity": "VIOLATION",
"message": "'{{field}}' must not be present when `status` is `CLOSED`",
"context": {
"field": "$.locationDetails.locationStatus.openingDate"
}
}
OpeningDateMustNotBePresentWhenStatusIsTemporarilyClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that openingDate is not present when status is TEMPORARILY_CLOSED |
Example Validation Report
{
"code": "VALIDATION__OpeningDateMustNotBePresentWhenStatusIsTemporarilyClosed",
"severity": "VIOLATION",
"message": "'{{field}}' must not be present when `status` is `TEMPORARILY_CLOSED`",
"context": {
"field": "$.locationDetails.locationStatus.openingDate"
}
}
Reopen Date
LocationStatusReopenDateMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that formatting of reopenDate is valid |
Example Validation Report
{
"code": "VALIDATION__LocationStatusReopenDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'reopenDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.locationStatus.reopenDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}
ReopenDateMustBePresentWhenStatusIsTempClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that reopenDate is present when status is "TEMPORARILY_CLOSED" | Link |
ReopenDateMustNotBePresentWhenStatusIsOpeningSoon
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that reopenDate is not present when status is OPENING_SOON |
Example Validation Report
{
"code": "VALIDATION__ReopenDateMustNotBePresentWhenStatusIsOpeningSoon",
"severity": "VIOLATION",
"message": "'{{field}}' must not be present when `status` is `OPENING_SOON`",
"context": {
"field": "$.locationDetails.locationStatus.reopenDate"
}
}
Status
LocationStatusStatusMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that status value is valid | Link |
NewLocationIsTemporarilyClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that locationStatus is not TEMPORARILY_CLOSED | Link |
LocationStatusStatusMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that status is present |
LocationStatusStatusMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that status is not an empty string |