POST



Send Request

The Send Request button submits the request to optimize the plan. If the optimization was started, a response with status code 202 (accepted) is given back.

Response
Waiting for request to be completed...

You can alternatively choose one of the following samples in your preferred language:

Request Sample
var client = new RestClient("https://api.myptv.com/routeoptimization/v1/plans/Plan ID/operation/optimization");
var request = new RestRequest(Method.POST);
request.AddHeader("apiKey", "YOUR_API_KEY");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
fetch("https://api.myptv.com/routeoptimization/v1/plans/Plan ID/operation/optimization", {
        method: "POST",
        headers: [object Object],
    })
    .then(response => response.json())
    .then(result => console.log(result));
import requests
url = "https://api.myptv.com/routeoptimization/v1/plans/Plan ID/operation/optimization"
headers = {
    'apiKey': "YOUR_API_KEY"
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
Request request = new Request.Builder()
    .url("https://api.myptv.com/routeoptimization/v1/plans/Plan ID/operation/optimization")
    .method("POST", null)
    .addHeader("apiKey", "YOUR_API_KEY")
    .build();
Response response = client.newCall(request).execute();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("apiKey", "YOUR_API_KEY")
$response = Invoke-RestMethod 'https://api.myptv.com/routeoptimization/v1/plans/Plan ID/operation/optimization' -Method 'POST' -Headers $headers
$response | ConvertTo-Json