DELETE /api/v1/routing/{routeModelId}/users/{sourceReference}

Request Parameters:

routeModelId

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

sourceReference

sourceReference – (url)  the unique id  of the user.

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 with routeModelId and sourceReference directly in the path
        string endpoint = "https://api.locate2u.com/api/v1/routing/{routeModelId}/users/{sourceReference}";

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

        // 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(endpoint);

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

Response

Response:

Http 200
Http 422
Array of ErrorResponse Object