Response Models
200 Successful
Successful response models vary per operation and are detailed in the sections that follow.
400 Bad Request
Should a call to an operation result in a Bad Request HTTP response code, the following standard model is returned:
{
"statusCode": int,
"errorCode": "string",
"message": "string",
"validationErrors": [
{
"index": "string",
"errorCode": "string",
"errorMessage": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
statusCode
int
The HTTP status code, e.g. 400
errorCode
string
Identifies the type of error that occurred, e.g. general error, validation error, or an invalid request.
message
string
A friendly message for the reason of the Bad Request response.
validationErrors
validationError
One or more Validation Errors, see ValidationError for more information.
The errorCode
field identifies the type of error that was raised:
0
General error
A general server error occurred and cannot process the request. See message
field for more information.
1
Validation error
One or more validation errors have occurred. See validationErrors
for more information.
2
Invalid request
The payload provided is not valid and cannot be parsed.
ValidationError
The following fields are returned per validation error:
index
string
If applicable: numeric increment for each validation error in the array.
errorCode
string
The type of validation error that occurred. See validation error codes below.
errorMessage
string
A display message for the validation error.
fieldName
string
If applicable: The name of the field that caused the validation error.
fieldValue
string
If applicable: The value of the field that caused the validation error.
If a validation error occurs, a unique code will be supplied which can be used to display a custom message to the user:
100
Required parameter missing
106
Invalid value supplied
A sample Bad Request response with a validationError
:
{
"statusCode": 400,
"errorCode": "1",
"message": "Validation error",
"validationErrors": [
{
"index": "0",
"errorCode": "106",
"errorMessage": "Account ID is invalid (does not exist or not active)",
"fieldName": "AccountId",
"fieldValue": "00000000-0000-0000-0000-000000000000"
}
]
}
401 Unauthorised
A 401 HTTP status code will be returned should an invalid Bearer token be supplied as part of a request’s Header, or if the Bearer token supplied has expired.
500 Server Error
A server errors when an unhandled exception is thrown by the Redemptions API. The exception will be returned within the response body.
Please contact 6DOT50 Support with the error.
Last updated