🢐  Back

Stops API

Stops API is an API to get stops details from your current team.

Here are the resources you will need to set up your Postman environment :

Below are the list of Locate2u Stop API and it’s functionality :

DetailsURL
Get details of given stopGET https://api.locate2u.com/api/v1/stops/{id}
Create a new stopPOST https://api.locate2u.com/api/v1/stops
Update an existing stopPUT https://api.locate2u.com/api/v1/stops/{id}
Create bulk new stopsPOST https://api.locate2u.com/api/v1/stops/import
Delete a stopDELETE https://api.locate2u.com/api/v1/stops/{id}
Get all Unassigned StopGET https://api.locate2u.com/api/v1/stops/unassigned
Change the status of a stopGET https://api.locate2u.com/api/v1/stops/{id}/change-status

Get Details of Given Stop

We can see the detail of a stop if we call this API by providing the stop id.

Sample result of the call can be seen below :

//Get Stop Details Sample Response
{
    "stopId": 164557,
    "status": "Pending",
    "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": "2021-12-01",
    "appointmentTime": "12:00",
    "timeWindowStart": null,
    "timeWindowEnd": null,
    "durationMinutes": 10,
    "notes": "Please call before you deliver",
    "lastModifiedDate": "2021-07-16T06:26:04.937Z",
    "customFields": {},
    "type": null,
    "shipmentId": null,
    "load": {},
    "source": null,
    "sourceReference": null,
    "customerId": null,
    "arrivalDate": null
}

Creates a New Stop

We can add a stop by calling this API and send the stop detail.

Sample request can be seen below :

//Create a New Stop Sample Request
{
    "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": "2021-12-01",
    "appointmentTime": "12:00",
    "timeWindowStart": null,
    "timeWindowEnd": null,
    "durationMinutes": 10,
    "notes": "Please call before you deliver",
    "customFields": {},
	"assignedTeamMemberId": "",
    "load": {},
    "source": null,
    "sourceReference": null,
    "customerId": null,
    "runNumber": null,
    "teamRegionId" : ""
}

Below are the correlation between JSON field and Locate2u field :

JSONLocate2u
statusStatus of a stop
contact.nameCustomer name
contact.phoneCustomer phone number
contact.emailCustomer email
nameAddress name/landmark
addressAddress details
location.latitudeLatitude in map (Not shown)
location.longitudeLongitude in map (Not shown)
tripDateTrip date
appointmentTimeAppointment time
timeWindowStartAppointment time (Start)
timeWindowEndAppointment time (End)
durationMinutesDuration
notesNotes
customFieldsCustom field
assignedTeamMemberIdTeam member id
loadLoad of your delivery
customerIdCustomer id
runNumberStop order (For import)
teamRegionIdRegion id

Updates Existing Stop

We can update an existing stop by calling this API and providing the stop id.

Sample request can be seen below :

//Update Existing Stop Sample Request
{
    "contact": {
        "name": "Matthew Robinson 2",
        "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": "2021-12-01",
    "appointmentTime": "12:00",
    "timeWindowStart": null,
    "timeWindowEnd": null,
    "durationMinutes": 10,
    "notes": "Please call before you deliver",
    "customFields": {},
    "load": {},
    "source": null,
    "sourceReference": null,
    "customerId": null,
    "runNumber" : null,
    "teamRegionId" : null
}

Below are the correlation between JSON field and Locate2u field :

JSONLocate2u
contact.nameCustomer name
contact.phoneCustomer phone number
contact.emailCustomer email
nameAddress name/landmark
addressAddress details
location.latitudeLatitude in map (Not shown)
location.longitudeLongitude in map (Not shown)
tripDateTrip date
appointmentTimeAppointment time
timeWindowStartAppointment time (Start)
timeWindowEndAppointment time (End)
durationMinutesDuration
notesNotes
customFieldsCustom field
assignedTeamMemberIdTeam member id
loadLoad of your delivery
customerIdCustomer id
runNumberStop order (For import)
teamRegionIdRegion id

Create Bulk New Stops

We can add stops in bulk by calling this API and send the stops detail.

Sample request can be seen below :

//Create Bulk New Stops Sample Request
[
   {
      "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":"2021-12-01",
      "appointmentTime":"12:00",
      "timeWindowStart":null,
      "timeWindowEnd":null,
      "durationMinutes":10,
      "notes":"Please call before you deliver",
      "customFields":{
         
      },
      "type":null,
      "shipmentId":null,
      "load":{
         
      },
      "source":null,
      "sourceReference":null,
      "customerId":null,
      "arrivalDate":null
   },
   {
      "contact":{
         "name":"Nate Robinson",
         "phone":"0123456789",
         "email":"nate.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":"2021-12-01",
      "appointmentTime":"12:00",
      "timeWindowStart":null,
      "timeWindowEnd":null,
      "durationMinutes":10,
      "notes":"Please call before you deliver",
      "customFields":{
         
      },
      "type":null,
      "shipmentId":null,
      "load":{
         
      },
      "source":null,
      "sourceReference":null,
      "customerId":null,
      "arrivalDate":null
   }
]

Delete a Stop

We can delete an existing stop by calling this API and providing the stop id.

Change Status of a Stop

We can change the status of a stop if we call this API by providing the stop id.

Sample request can be seen below :

{
   "newStatus":"Cancelled"
}

Get Note of a Stop

We can see the note of a stop if we call this API by providing the stop id.

Update Note of a Stop

We can update the note of a stop if we call this API by providing the stop id.

Sample request can be seen below :

//Update Note of a Stop Request
{
   "note":"Please make a call first before delivery."
}

Get All Unassigned Stops

We can see all our unassigned stops with this API.

Sample response can be seen below :

//Get All Unassigned Stops Response
[
   {
      "stopId":165507,
      "stopRef":"L202119072E73PE",
      "status":"Pending",
      "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":"2021-12-01",
      "appointmentTime":"12:00",
      "timeWindowStart":null,
      "timeWindowEnd":null,
      "durationMinutes":10,
      "notes":"Please call before you deliver",
      "lastModifiedDate":"2021-07-19T04:04:55.648Z",
      "eta":null,
      "startLocation":null,
      "customFields":{
         
      },
      "type":null,
      "shipmentId":null,
      "arrivalDate":null,
      "load":{
         
      },
      "teamRegionId":null
   },
   {
      "stopId":176371,
      "stopRef":"L20210508489YU3",
      "status":"Pending",
      "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":"2021-12-01",
      "appointmentTime":"12:00",
      "timeWindowStart":null,
      "timeWindowEnd":null,
      "durationMinutes":10,
      "notes":"Please call before you deliver",
      "lastModifiedDate":"2021-08-05T02:59:45.470Z",
      "eta":null,
      "startLocation":null,
      "customFields":{
         
      },
      "type":null,
      "shipmentId":null,
      "arrivalDate":null,
      "load":{
         
      },
      "teamRegionId":null
   }
]