DELETE /api/v1/routing

This will delete the existing routing model.

routeModelId

RouteModelId – (url) the route model returned from the POST endpoint

Sample code

C#
Java
NodeJS
PHP
Python
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        // Define the endpoint URL
        string endpoint = "https://api.locate2u.com/api/v1/routing/{routeModelId}";

        // Define the bearer token
        string bearerToken = "YOUR_BEARER_TOKEN_HERE";

        // Define the route model ID
        string routeModelId = "YOUR_ROUTE_MODEL_ID_HERE";

        // Concatenate route model ID with the endpoint
        string requestUrl = endpoint.Replace("{routeModelId}", routeModelId);

        // Create HttpClient instance
        using (HttpClient client = new HttpClient())
        {
            // Add bearer token to the request headers
            client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", bearerToken);

            // Send the DELETE request
            HttpResponseMessage response = await client.DeleteAsync(requestUrl);

            // Check if request was successful
            if (response.IsSuccessStatusCode)
            {
                Console.WriteLine("Request successful");
            }
            else
            {
                Console.WriteLine($"Request failed with status code {response.StatusCode}");
            }
        }
    }
}

Response

Reponse:

Http 200
Http 422

Array of ErrorResponse Object