403 - Invalid format

A validation error is an error due to invalid client requests.
All validation errors correspond with a 403 HTTP status code.

A validation error occurs when:

  • Request body is ill-formed
    e.g. invalid JSON
  • Required parameters are missing (either in body or in query string)
    e.g. endpoint required a field which is (empty or) not specified in the request
  • Endpoint validation rules are not matched
    e.g. minimum/maximum length constraint doesn't match


propertystringRequest property which originated the error
messagestringMessage to the user explaining what happened
verbosestringMessage to the developer futher explaining what happened
codestring enum
- InvalidFormat
- RequiredField
- InvalidLength
- InvalidMinLength
- InvalidMaxLength
- InvalidEmailAddress
- OutOfRange
- PatternMismatch
- PrefixMismatch
- InvalidCharacter
- MustBeLowerCase
- MustBeUpperCase
Machine readable code to handle the error
Example validation error: missing required field
// HTTP status 403
	"code": "RequiredField",
  "message": "Cannot be empty",
  "property": "slashtag"
Example of validation error: invalid min length
// HTTP status 403
  "property": "slashtag",
  "message": "Value cannot be less than 2 characters long",
	"code": "InvalidMinLength",
  "input": "a",
  "minLength": 2
Example of validation error: OutOfRange
// HTTP status 403
	"property": "regType",
  "message": "Value is not allowed",
  "code": "OutOfRange",
  "input": "cat",
  "range": ["individual", "business"]

Following additional properties may appear in validation errors:

inputobjectOriginal input value for property
Minimum length allowed
Strictly positive
Maximum length allowed
Strictly positive
Length to match
rangearray of objectsSet of allowed values
patternstring regexRegex to test the input with
prefixstringPrefix that input has to match
characterstringCharacter given in input

Validation error codes

CodeAdditional propertiesMessageDescription
InvalidFormatnoneInvalid formatGeneric invalid format error with respect to the property value
RequiredFieldnoneCannot be emptyField indicated in property was empty or not specified in the request
InvalidLengthinput, lengthValue cannot be different than length characters longNumber of characters of property value not matching length
InvalidMinLengthinput, minLengthValue cannot be less than minLength characters longValue for field indicated in property was too short with respect to minLength
InvalidMaxLengthinput, maxLengthValue cannot be more than maxLength characters longValue for field indicated in property was too long with respect to maxLength
InvalidEmailAddressinputValue is not a valid email addressValue for field indicated in property was not a valid email address
OutOfRangeinput, rangeValue is not allowedValue for field indicated in property was not included in range
PatternMismatchinput, patternInvalid formatValue for field indicated in property does not match regex in pattern
PrefixMismatchinput, prefixPrefix mismatchPrefix of value for field indicated in property does not match prefix
InvalidCharacterinput, characterInvalid character: 'character'Value for field indicated in property contains invalid character
MustBeLowerCaseinputValue must be lowercaseValue for field indicated in property is not lowercased
MustBeUpperCaseinputValue must be uppercaseValue for field indicated in property is not uppercased