Delete /api/v1/stops
Delete a stop’s record by passing in a stop id to the delete endpoint.
Request parameters:
id
id * required integer field. Pass the ID of the stop to delete.
This endpoint sends an HTTP DELETE request to remove a specific stop with the passed ID from the server. Upon successful execution, the server returns a response with status code 204 and content type text/xml.
Example code:
Sample code
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://api.locate2u.com/api/v1/stops/4275435");
request.Headers.Add("Authorization", "Bearer YourBearerTokenHere");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.locate2u.com/api/v1/stops/4275435")
.method("DELETE", body)
.addHeader("Authorization", "Bearer YourBearerTokenHere")
.build();
Response response = client.newCall(request).execute();
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'DELETE',
'hostname': 'api.locate2u.com',
'path': '/api/v1/stops/4275435',
'headers': {
'Authorization': 'Bearer YourBearerTokenHere'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
'https://api.locate2u.com/api/v1/stops/4275435',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YourBearerTokenHere'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.locate2u.com/api/v1/stops/4275435"
payload = {}
headers = {
'Authorization': 'Bearer YourBearerTokenHere'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
Response
200 Success
401 Unauthorized
403 Forbidden