Skip to main content

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
DefinitionSeverityAPISampleMode
Validate that Showcase and referenced resource in resourceDetails belong to the same brand
VIOLATION
POST_AND_PUT
S

Location

BrandMustHaveAtLeastOnePublishedLocation

DefinitionSeverityAPISampleMode
Validate that a Showcase's associated brand has a corresponding association with at least one (1) Location whose resource state is PUBLISHED
VIOLATION
POST_AND_PUT
A
Example Validation Report
{
"code": "VALIDATION__BrandMustHaveAtLeastOnePublishedLocation",
"severity": "VIOLATION",
"message": "Brand '{{brandId}}' has no published location",
"context": {
"brandId": "9467895078742654921"
}
}

CountOfLocationsShowcasesMustNotExceedMaximum

DefinitionSeverityAPISampleMode
Validates that the referenced Location's count of associated Showcases does not exceed maximum
VIOLATION
POST_AND_PUT
Link
A

LocationMustExist

DefinitionSeverityAPISampleMode
Validate that Location referenced via resourceId exists and belongs to a brand
VIOLATION
POST_AND_PUT
S

PartnerNotAuthorizedForShowcaseCountry

DefinitionSeverityAPISampleMode
Validate that the Showcase's referenced Location is within a showcase country that is permitted for the partner
VIOLATION
POST_AND_PUT
S
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

DefinitionSeverityAPISampleMode
Validate that the Showcase's referenced Location is within a permitted country
VIOLATION
POST_AND_PUT
Link
S

Resource Details

ResourceDetailsMustBePresent

DefinitionSeverityAPISampleMode
Validate that resourceDetails is present
VIOLATION
POST_AND_PUT
Link
S

ResourceIdMustBePresent

DefinitionSeverityAPISampleMode
Validate that Resource Details' resourceId is present
VIOLATION
POST_AND_PUT
Link
S

ResourceIdMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that Resource Details' resourceId is not an empty string
VIOLATION
POST_AND_PUT
S

ResourceTypeMustBePresent

DefinitionSeverityAPISampleMode
Validate that Resource Details' resourceType is present
VIOLATION
POST_AND_PUT
Link
S

ResourceTypeMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that Resource Details' resourceType is not an empty string
VIOLATION
POST_AND_PUT
S

ResourceTypeMustBeValidForReferencedResourceId

DefinitionSeverityAPISampleMode
Validate that the resourceType value is a valid description of the resource referenced using an resourceId
VIOLATION
POST_AND_PUT
Link
S

Scheduling

PartlyScheduledWhenReferencedLocationIsOpeningSoon

DefinitionSeverityAPISampleMode
Validate that the Location Status of the referenced Location is not OPENING_SOON during part of the scheduled Start and End Dates
WARNING
POST_AND_PUT
S

PartlyScheduledWhenReferencedLocationIsTempClosed

DefinitionSeverityAPISampleMode
Validate that the Location Status of the referenced Location is not TEMPORARILY_CLOSED during part of the scheduled Start and End Dates
WARNING
POST_AND_PUT
Link
S

ScheduledWhenReferencedLocationIsClosed

DefinitionSeverityAPISampleMode
Validate that the Location Status of the referenced Location is not CLOSED
VIOLATION
POST_AND_PUT
Link
S

ScheduledWhenReferencedLocationIsOpeningSoon

DefinitionSeverityAPISampleMode
Validate that the Location Status of the referenced Location is not OPENING_SOON
VIOLATION
POST_AND_PUT
S

ScheduledWhenReferencedLocationIsTempClosed

DefinitionSeverityAPISampleMode
Validate that the Location Status of the referenced Location is not TEMPORARILY_CLOSED during specified Start and End Dates
VIOLATION
POST_AND_PUT
Link
S