Skip to main content

Validation rules for brand country codes including presence, validity, uniqueness, and update restrictions

Country Codes​

CountryCodesMustBePresent​

DefinitionSeverityAPISampleMode
Validate that countryCodes is present
VIOLATION
POST_AND_PUT
Link
S

CountryCodesMustBeValid​

DefinitionSeverityAPISampleMode
Validate that countryCodes value is valid
VIOLATION
POST_AND_PUT
Link
S

CountryCodesMustListExactlyOneCountry​

DefinitionSeverityAPISampleMode
Validate that the count of items in a countryCodes list is exactly one (1)
VIOLATION
POST_AND_PUT
S

CountryCodesMustNotBeEmpty​

DefinitionSeverityAPISampleMode
Validate that countryCodes does not include an empty string
VIOLATION
POST_AND_PUT
S
Example Validation Report
{
"code": "VALIDATION__CountryCodesMustNotBeEmpty",
"severity": "VIOLATION",
"message": "'countryCodes' must not be empty string",
"details": {
"createdDate": "2026-10-10T11:36:02.00Z",
"submitted": [
{
"field": "$.brandDetails.countryCodes[0]",
"value": ""
}
],
"compared": [],
"expected": []
}
}

CountryCodesMustNotBeUpdated​

DefinitionSeverityAPISampleMode
Validate that countryCodes matches the previous submittal
VIOLATION
PUT
S
Example Validation Report
{
"code": "VALIDATION__CountryCodesMustNotBeUpdated",
"severity": "VIOLATION",
"message": "Listed items in '{{countryCodes}}' must not be updated",
"context": {
"countryCodes": "US"
},
"details": {
"createdDate": "2026-10-10T11:36:02.00Z",
"submitted": [
{
"field": "$.brandDetails.countryCodes[0]",
"value": "US"
}
],
"compared": [],
"expected": []
}
}