6.2 Check-Dispatch Endpoint
The check-dispatch endpoint is used to validate the inputs given to the optimiser for dispatch optimisation jobs.
6.2.1 Check-Dispatch Requests
A check-dispatch request is an HTTP POST to a URL of the following form:
https://server-name/mwo/v2/check-dispatch
where server-name will be provided by Opturion.
The body of the POST request is a JSON document containing a dispatch request object.
6.2.2 Check-Dispatch Request Example
Here is an example URL for a check-dispatch request:
https://demo.opturion.com/mwo/v2/check-dispatch
On success (see below) a check-plan request will return with HTTP status code 200 (OK) and the response body will contain a JSON encoded check response object describing any errors in the input request.
Here is an example of a check response object:
{
"status": "OK"
}
6.2.3 Check-Dispatch Responses
The following table lists of all of the HTTP status codes that check-dispatch specifically returns and their meanings. Any other HTTP status code returned by check-dispatch that is not covered by this table has its usual meaning.
| Status Code | Description | Response Body |
| 200 (Ok) | The input request has been checked for errors. | A JSON check response object describing if the input was valid or not. |
| 401 (Unauthorized) | Authentication (if enabled) failed; the user is not authorized to access the optimiser. | Empty. |
| 429 (Too Many Requests) | Rate limiting has been applied by the server. | Empty. |
| 500 (Internal Server Error) | An error occurred on the server. | The body may contain a JSON object further describing the problem. |
Note that in the case where rate limiting has been applied, clients should wait and then re-submit the job at a later time.

