6.1 Dispatch Endpoint
The dispatch endpoint is used to submit dispatch optimisation jobs to the optimiser.
6.1.1 dispatch Requests
A dispatch request takes the from of an HTTP POST request to a URL for the following form:
https://server-name/mwo/v2/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.1.2 dispatch Request Parameters
The dispatch endpoint accepts no parameters.
6.1.3 dispatch Request Example
Here is an example dispatch request URL:
https://demo.opturion.com/mwo/v2/dispatch
On success (see below) a dispatch request will return with HTTP status code 200 (OK) and the response body will contain a JSON encoded dispatch response object.
6.1.4 dispatch Responses
The following table lists of all of the HTTP status codes that dispatch specifically returns and their meaning. Any other HTTP status code returned by dispatch that is not covered by this table has its usual meaning.
| Status Code | Description | Response Body |
| 200 (OK) | The job was accepted and successfully run. | A JSON dispatch response containing a set of assignment recommendations. |
| 401 (Unauthorized) | Indicates that authentication (if enabled) failed and the user is not authorized to access the MWO. | Empty. |
| 429 (Too Many Requests) | May be returned if rate limiting has been applied by the server. | Empty. |
| 500 (Internal Server Error) | Indicates that an error occurred on the server. | The body may contain a JSON object further describing the error. |

