Add New Custom Location API
Require Authentication
This API is used to add new custom location for the company based on combination of deviceID and token.
URL
api/manageassets/addcustomlocation
Required parameter (POST)
- deviceID
- token
- locationName «contains location name»
- locationLat «contains location latitude»
- locationLong «contains location longitude»
- locationRadius «contains location radius in meters. Value must be greater than 0.»
Optional parameter
- locationAddress1
- locationAddress2
- locationCity
- locationState
- locationCountry
- locationPostCode
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
"locationName": "test location API",
"locationLat": -6.202101230621,
"locationLong": 106.779190063477,
"locationRadius": 500
}
Possible return HTTP status code
- 201
- 400
- 401
- 405
Return message, contains newly created asset category
{
"status": "success",
"message": {
"customlocationID": 1,
"locationName": "test location API",
"locationAddress1": "",
"locationAddress2": "",
"locationCity": "",
"locationState": "",
"locationCountry": "",
"locationPostCode": "",
"locationLat": -6.202101230621,
"locationLong": 106.77919006348,
"locationRadius": 500,
"createdDate": 1453481345,
"createdByUserID": 3,
"total_projectpins": 3
}
}