Errors
Errors returned by Scan Documents API
Overview
Scan Documents API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the
2XX
range indicate success. - Codes in the
4XX
range indicate problems with the request, like missing parameters. - Codes in the
5XX
range indicate problems with Scan Documents servers.
Errors messages conform to RFC 7807 and use a Content-Type
of application/problem+json
.
General Errors
This payload is for 4XX client errors, except validation errors, and 5XX errors.
A URL that identifies the problem type. Visit the URL to learn more about this problem.
A short, human-readable summary of the problem type.
The HTTP status code generated by the server for this occurrence of the problem.
A human-readable explanation specific to this occurrence of the problem.
Example
Here is an example of a 404 error response when a file is not found:
{
"type": "https://scan-documents.com/docs/api/errors/not-found",
"title": "Not Found",
"status": 404,
"message": "File with id file_123 not found."
}
Validation Errors
This payload is for 4XX client errors that are caused by validation errors.
A URL that identifies the problem type. Visit the URL to learn more about this problem.
A short, human-readable summary of the problem type.
The HTTP status code generated by the server for this occurrence of the problem.
A human-readable explanation specific to this occurrence of the problem.
Example
Here is an example of a 422 error response when there is a validation error:
{
"type": "https://scan-documents.com/docs/api/errors/validation-error",
"title": "Validation Error",
"status": 422,
"errors": {
"input": ["input does not contains a valid input id."]
}
}