Skip to main content

Review type validation rules for review classification and category requirements

Type

AggregateRatingDoesNotExist

Preconditions
Review type is USER
DefinitionSeverityAPISampleMode
Validate that an aggregate rating is associated with the same location
WARNING
POST_AND_PUT
S

OnlyOneOfThisReviewTypeCanExist

Preconditions
type is CRITIC_SUMMARY
DefinitionSeverityAPISampleMode
Validate that a CRITIC_SUMMARY review type does not already exist in any resource state except DELETED
VIOLATION
POST
Link
S
Example Validation Report
{
"code": "VALIDATION__OnlyOneOfThisReviewTypeCanExist",
"severity": "VIOLATION",
"message": "Only one '{{value}}' review of this type can exist",
"context": {
"value": "CRITIC_SUMMARY"
},
"details": {
"createdDate": "2026-09-01T21:00:59.865Z",
"submitted": [
{
"field": "$.reviewDetails.type",
"value": "CRITIC_SUMMARY"
}
],
"compared": [],
"expected": []
}
}

ReviewTypeMustNotBeUpdated

DefinitionSeverityAPISampleMode
Validate that type matches the previous submittal
VIOLATION
PUT
S
Example Validation Report
{
"code": "VALIDATION__ReviewTypeMustNotBeUpdated",
"severity": "VIOLATION",
"message": "'{{field}}' value must not be updated",
"context": {
"field": "type"
},
"details": {
"createdDate": "2026-12-01T21:00:59.865Z",
"compared": [],
"submitted": [
{
"field": "$.reviewDetails.type",
"value": "USER"
}
],
"expected": [
{
"field": "$.reviewDetails.type",
"value": "CRITIC_SUMMARY"
}
]
}
}

ReviewTypeNotExpectedFromYourOrg

DefinitionSeverityAPISampleMode
Validate that the type of review submitted is a type that is expected from the organization
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__ReviewTypeNotExpectedFromYourOrg",
"severity": "VIOLATION",
"message": "'{{value}}' review type is not expected from your organization",
"context": {
"value": "CRITIC_SUMMARY"
},
"details": {
"createdDate": "2026-09-01T21:00:59.865Z",
"submitted": [
{
"field": "$.reviewDetails.type",
"value": "CRITIC_SUMMARY"
}
],
"expected": [
{
"field": "$.reviewDetails.type",
"value": [
"USER"
]
}
],
"compared": []
}
}

TypeMustBePresent

DefinitionSeverityAPISampleMode
Validate that type is present
VIOLATION
POST_AND_PUT
S

TypeMustBeValid

DefinitionSeverityAPISampleMode
Validate that type value is USER or CRITIC_SUMMARY
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__TypeMustBeValid",
"severity": "VIOLATION",
"message": "'type' value '{{value}}' is not valid",
"context": {
"value": "EXPERT"
},
"details": {
"createdDate": "2026-09-01T21:00:59.865Z",
"submitted": [
{
"field": "$.reviewDetails.type",
"value": "EXPERT"
}
],
"compared": [],
"expected": []
}
}

TypeMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that type is not an empty string
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__TypeMustNotBeEmpty",
"severity": "VIOLATION",
"message": "'type' must not be empty string"
}