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

ReviewTypeMustNotBeUpdated​

DefinitionSeverityAPISampleMode
Validate that type matches the previous submittal
VIOLATION
PUT
S
Example Validation Report
{
"code": "VALIDATION__ReviewTypeMustNotBeUpdated",
"severity": "VIOLATION",
"message": "'{{type}}' must not be updated",
"context": {
"type": "USER"
},
"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 is invalid",
"context": {
"type": "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",
"context": {
"type": "type"
},
"details": {
"createdDate": "2026-09-01T21:00:59.865Z",
"submitted": [],
"compared": [],
"expected": []
}
}