GET /api/v1/stops

Developers can retrieve stop data through this Endpoint.

Input Parameters:

id * required integer

This id here is the unique stop id for stop in your Locate2u account. This is required in order to get the details of a particular stop in the system.

includeItems boolean 

This boolean flag (Default value : true) allows developers to decide whether or not they want to retrieve Items details attached to a stop while fetching stop details. Items are goods or equipment associated/required with/for the Booking/Work order or delivery stops. They may be subject to billing and invoicing based upon Company’s working policies.

includeLines boolean

This flag (Default value : true) is similar to items but Lines in Locate2u system refers to services which are specifically required by a Stop or Shipment.

Example requests:

Sample code

C#
Java
NodeJS
PHP
Python
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.locate2u.com/api/v1/stops");
request.Headers.Add("Authorization", "yourBearerToken");
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")
  .method("GET", body)
  .addHeader("Authorization", "yourBearerToken")
  .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',
  'headers': {
    'Authorization': 'Bearer “yourBearerToken”'
  },
  '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',
  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 “yourBearerToken”'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.locate2u.com/api/v1/stops"

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

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

print(response.text)

Response

Example response text will look something like this:

200 Success

Media type application/json

Controls Accept header.

Example Value
Schema

{
  "assignedTo": {
    "id": "ee59-b174-4698-ac55-81d9d",
    "name": "John Doe"
  },
  "stopId": 164557,
  "status": "Pending",
  "brandId": null,
  "contact": {
    "name": "Matthew Robinson",
    "phone": "0123456789",
    "email": "matt.robinson@email.com"
  },
  "name": "Locate2u",
  "address": "Level 4, Suite 4.11, 55 Miller St, Pyrmont NSW 2009, Australia",
  "location": {
    "latitude": -33.8706672,
    "longitude": 151.192487
  },
  "tripDate": "2024-01-29",
  "appointmentTime": "09:37",
  "timeWindowStart": null,
  "timeWindowEnd": null,
  "durationMinutes": 10,
  "notes": "Please call before you deliver",
  "lastModifiedDate": "2024-01-29T09:37:07.520Z",
  "customFields": {
    "custom1": "value",
    "custom2": "value",
    "custom3": "value"
  },
  "type": null,
  "shipmentId": 0,
  "load": {
    "quantity": 0,
    "volume": 0,
    "weight": 0,
    "length": 0,
    "width": 0,
    "height": 0
  },
  "source": null,
  "sourceReference": null,
  "customerId": 0,
  "runNumber": 0,
  "teamRegionId": 0,
  "teamMemberInvoiceId": 0,
  "customerInvoiceId": 0,
  "contents": null,
  "arrivalDate": "2024-01-29T09:37:07+00:00",
  "lines": [
    {
      "lineId": 201,
      "itemId": 101,
      "serviceId": null,
      "productVariantId": null,
      "barcode": "1234567890",
      "description": "Item A - Barcode scanning item",
      "quantity": 1,
      "status": "Created",
      "itemStatus": "",
      "unitPriceExTax": 0,
      "priceCurrency": ""
    }
  ],
  "driverInstructions": null,
  "oneTimePin": "0011"
}

401 Unauthorized
403 Forbidden