🢐  Back

Customers API

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 :

DetailsURL
Get all customers detail GEThttps://api.locate2u.com/api/v1/customers
Create a customer POSThttps://api.locate2u.com/api/v1/customers
Get a customer by id GEThttps://api.locate2u.com/api/v1/customers/{id}
Edit a customer by id PUThttps://api.locate2u.com/api/v1/customers/{id}
Delete a customer by id DELETEhttps://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 :

JSONLocate2u
nameCustomer name
firstNameFirst Name
lastNameLast Name
companyCompany
addressDefault Stop Address
location.latitudeLatitude (Not shown)
location.longitudeLongitude (Not shown)
emailEmail
phonePhone
notesNotes
customFieldsCustom 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.