Validate Problems
POST
https://routecloud.telogis.com/v1/validate.- Authentication required.
- Request body: problem.
- Response body: validate_response.
The validate call checks that the supplied problem is valid. The call also returns a list of warnings, indicating potential issues about the request. If the response contains errors, any optimization endpoint (such as build) will fail with a 400 status code.
Status Codes
200
- Success.400
- The input problem was invalid. The response is an error_response.401
- Authentication required.
For example, sending POST https://routecloud.telogis.com/v1/validate
with the body:
{
"name": "validate_test",
"routes": [{
"id": "route0",
"location": "40.659491, -111.967176",
"jobs": [{
"id": "job0",
"location": "40.652311, -111.878820",
"priority": "an invalid priority"
}]
}]
}
Returns the following response:
{
"errors": [
{
"property": "request.jobs['job0'].priority",
"code": "job_priority_invalid_error",
"message": "'job.priority' must be one of: 'highest', 'high', 'normal', 'low' or 'lowest'.",
"attempted_value": "an invalid priority",
"parameters": {
"property_name": "priority"
}
}
],
"warnings": []
}
See Also
- The problem type.
- The validate_response type.