Showcase resource detail validation rules for location requirements, brand association, resource identification, and scheduling constraints
Cross-feature
ShowcaseAndReferencedResourceMustBelongToSameBrand
| Preconditions |
|---|
Resource referenced via resourceId in resourceDetails belongs to a brand |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that Showcase and referenced resource in resourceDetails belong to the same brand |
Location
BrandMustHaveAtLeastOnePublishedLocation
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that a Showcase's associated brand has a corresponding association with at least one (1) Location whose resource state is PUBLISHED |
Example Validation Report
{
"code": "VALIDATION__BrandMustHaveAtLeastOnePublishedLocation",
"severity": "VIOLATION",
"message": "Brand '{{brandId}}' has no published location",
"context": {
"brandId": "9467895078742654921"
}
}
CountOfLocationsShowcasesMustNotExceedMaximum
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validates that the referenced Location's count of associated Showcases does not exceed maximum | Link |
LocationMustExist
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that Location referenced via resourceId exists and belongs to a brand |
PartnerNotAuthorizedForShowcaseCountry
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that the Showcase's referenced Location is within a showcase country that is permitted for the partner |
note
An authorized partner may be limited to a set of countries that is narrower than what is currently supported
Example Validation Report
{
"code": "VALIDATION__PartnerNotAuthorizedForShowcaseCountry",
"severity": "VIOLATION",
"message": "Partner not authorized to create showcase in the country where location '{{id}}' is physically located",
"context": {
"value": "FR"
}
}
ShowcaseIsNotAllowedInCountry
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that the Showcase's referenced Location is within a permitted country | Link |
Resource Details
ResourceDetailsMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that resourceDetails is present | Link |
ResourceIdMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that Resource Details' resourceId is present | Link |
ResourceIdMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that Resource Details' resourceId is not an empty string |
ResourceTypeMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that Resource Details' resourceType is present | Link |
ResourceTypeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that Resource Details' resourceType is not an empty string |
ResourceTypeMustBeValidForReferencedResourceId
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the resourceType value is a valid description of the resource referenced using an resourceId | Link |
Scheduling
PartlyScheduledWhenReferencedLocationIsOpeningSoon
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the Location Status of the referenced Location is not OPENING_SOON during part of the scheduled Start and End Dates |
PartlyScheduledWhenReferencedLocationIsTempClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the Location Status of the referenced Location is not TEMPORARILY_CLOSED during part of the scheduled Start and End Dates | Link |
ScheduledWhenReferencedLocationIsClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the Location Status of the referenced Location is not CLOSED | Link |
ScheduledWhenReferencedLocationIsOpeningSoon
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the Location Status of the referenced Location is not OPENING_SOON |
ScheduledWhenReferencedLocationIsTempClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the Location Status of the referenced Location is not TEMPORARILY_CLOSED during specified Start and End Dates | Link |