Customers API

Filbert Nicholas Updated by Filbert Nicholas

Customers API is an API to get customer details from your current team.

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

Below are the list of Locate2u Customer API and it's functionality :

Details
Url

Get all customers detail

GET https://api.locate2u.com/api/v1/customers

Create a customer

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

Get a customer by id

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

Edit a customer by id

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

Delete a customer by id

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

_________________________________________________________________________________________________________________

Get All Customers Details

We can see the details of all customer if we call this API.

Sample result of the call can be seen below

//Get Customers Details Sample Response
[
{
"customerId":1931,
"teamId":34879,
"name":"Mango Ltd (Stephan Job)",
"firstName":"Stephan",
"lastName":"Job",
"company":"Mango Ltd",
"address":"1 William St, Darlinghurst NSW 2010, Australia",
"location":{
"latitude":-33.8743446,
"longitude":151.2131667
},
"email":"steph.job@email.com",
"phone":"+0234234",
"notes":null,
"status":null,
"customFields":null
},
{
"customerId":2186,
"teamId":34879,
"name":"Perico Ltd (Kevin Perico)",
"firstName":"Kevin",
"lastName":"Perico",
"company":"Perico Ltd",
"address":"Pericoe Rd, Towamba NSW 2550, Australia",
"location":{
"latitude":-37.0888984,
"longitude":149.6522997
},
"email":"kevin.perico@email.com",
"phone":"012301230123",
"notes":null,
"status":null,
"customFields":null
}
]

Create a Customer

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

Sample request can be seen below :

//Create a Customer Sample Request
{
"name":"Perico Ltd (Kevin Perico)",
"firstName":"Kevin",
"lastName":"Perico",
"company":"Perico Ltd",
"address":"Pericoe Rd, Towamba NSW 2550, Australia",
"location":{
"latitude":-37.0888984,
"longitude":149.6522997
},
"email":"kevin.perico@email.com",
"phone":"012301230123",
"notes":null,
"customFields":null
}

Below are the correlation between JSON field and Locate2u field :

JSON

Locate2u

name

Customer name

firstName

First Name

lastName

Last Name

company

Company

address

Default Stop Address

location.latitude

Latitude (Not shown)

location.longitude

Longitude (Not shown)

email

Email

phone

Phone

notes

Notes

customFields

Custom Fields (Not shown by default)

Update Customers Details

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

Sample request can be seen below :

{
"name":"Perico Ltd (Kevin Perico)",
"firstName":"Kevin",
"lastName":"Perico",
"company":"Perico Ltd",
"address":"Pericoe Rd, Towamba NSW 2550, Australia",
"location":{
"latitude":-37.0888984,
"longitude":149.6522997
},
"email":"kevin.perico@email.com",
"phone":"012301230123",
"notes":null,
"status":null,
"customFields":null
}

Get a Customer Detail by Customer Id

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

Sample result of the call can be seen below :

{
"customerId":1930,
"teamId":34879,
"name":"Perico Ltd (Kevin Perico)",
"firstName":"Kevin",
"lastName":"Perico",
"company":"Perico Ltd",
"address":"Pericoe Rd, Towamba NSW 2550, Australia",
"location":{
"latitude":-37.0888984,
"longitude":149.6522997
},
"email":"kevin.perico@email.com",
"phone":"012301230123",
"notes":null,
"status":null,
"customFields":null
}

Update a Customer Detail by Customer Id

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

Sample request can be seen below :

{
"name":"Perico Ltd (Kevin Perico)",
"firstName":"Kevin",
"lastName":"Perico",
"company":"Perico Ltd",
"address":"Pericoe Rd, Towamba NSW 2550, Australia",
"location":{
"latitude":-37.0888984,
"longitude":149.6522997
},
"email":"kevin.perico@email.com",
"phone":"012301230123",
"notes":null,
"status":null,
"customFields":null
}

Delete a Customer Detail by Customer Id

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

How did we do?

How to Import Postman Collection using URL

Stops API

Contact