Stops API

Filbert Nicholas Updated by Filbert Nicholas

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 :

Details
Url

Get details of given stop

GET https://api.locate2u.com/api/v1/stops/{id}

Create a new stop

POST https://api.locate2u.com/api/v1/stops

Update an existing stop

PUT https://api.locate2u.com/api/v1/stops/{id}

Create bulk new stops

POST https://api.locate2u.com/api/v1/stops/import

Delete a stop

DELETE https://api.locate2u.com/api/v1/stops/{id}

Get all Unassigned Stop

GET https://api.locate2u.com/api/v1/stops/unassigned

Change the status of a stop

GET 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
{
"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",
"customFields": {},
"assignedTeamMemberId": "",
"load": {},
"source": null,
"sourceReference": null,
"customerId": null,
"runNumber": null,
"teamRegionId" : ""
}

Below are the correlation between JSON field and Locate2u field :

JSON

Locate2u

status

Status of a stop

contact.name

Customer name

contact.phone

Customer phone number

contact.email

Customer email

name

Address name/landmark

address

Address details

location.latitude

Latitude in map (Not shown)

location.longitude

Longitude in map (Not shown)

tripDate

Trip date

appointmentTime

Appointment time

timeWindowStart

Appointment time (Start)

timeWindowEnd

Appointment time (End)

durationMinutes

Duration

notes

Notes

customFields

Custom field

assignedTeamMemberId

Team member id

load

Load of your delivery

customerId

Customer id

runNumber

Stop order (For import)

teamRegionId

Region 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 :

JSON

Locate2u

contact.name

Customer name

contact.phone

Customer phone number

contact.email

Customer email

name

Address name/landmark

address

Address details

location.latitude

Latitude in map (Not shown)

location.longitude

Longitude in map (Not shown)

tripDate

Trip date

appointmentTime

Appointment time

timeWindowStart

Appointment time (Start)

timeWindowEnd

Appointment time (End)

durationMinutes

Duration

notes

Notes

customFields

Custom field

assignedTeamMemberId

Team member id

load

Load of your delivery

customerId

Customer id

runNumber

Stop order (For import)

teamRegionId

Region 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 :

{
"oldStatus":"PENDING",
"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
}
]

_________________________________________________________________________________________________________________

How did we do?

Customers API

Working with Locate2u API

Contact