Get api/v1/stops/unassigned

This API endpoint sends an HTTP GET request to retrieve unassigned stops. The request can include the trip date in the format ‘YYYY-MM-DD’ and a query parameter ‘includeShipments’ set to true.

Query parameters:
tripDate

string($date-time)
(query)
Pass the trip date to get list of all unassigned stops and/or shipments scheduled for a particular trip date.

includeShipments

boolean(query)
Setting this to true will include all unassigned shipments for the supplied query.

teamRegionId

integer($int32)(query)
Passing Team region ID will only return unassigned records belonging to specific team regions.

Sample code

C#
Java
NodeJS
PHP
Python
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.locate2u.com/api/v1/stops/unassigned?tripDate=2024-02-09&includeShipments=true");
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/unassigned?tripDate=2024-02-09&includeShipments=true")
  .method("GET", 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': 'GET',
  'hostname': 'api.locate2u.com',
  'path': '/api/v1/stops/unassigned?tripDate=2024-02-09&includeShipments=true',
  '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/unassigned?tripDate=2024-02-09&includeShipments=true',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  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/unassigned?tripDate=2024-02-09&includeShipments=true"


payload = {}
headers = {
  'Authorization': 'Bearer yourBearerTokenHere'
}


response = requests.request("GET", url, headers=headers, data=payload)


print(response.text)

Response

The response will have a status code of 200 and a content type of application/json. The response body will be an array unassigned stop objects.

200 Success

401 Unauthorized

403 Forbidden