Device Location
Stores the current location of the device.
URL
sales/device_location
Method
POST
Request Media type
application/json
Response Media type
application/json
Request Parameters
Parameter | Data Type | Min | Max | M/O | Sample Value | Comments |
---|---|---|---|---|---|---|
key | String | 32 | 32 | M | 41nrp9H0aeW6jMQWC1pmzIhcodghYrRm | Key obtained from authentiaction. |
latitude | Decimal | -90 | 90 | M | 8.50472669182539 | Latitude of the place in Decimal degrees (DD) format. Reference: Google Maps Help. |
longitude | Decimal | -180 | 180 | M | 76.97219809387414 | Longitude of the place in Decimal degrees (DD) format. Reference: Google Maps Help. |
datetime | String | M | 2021-01-03 07:06:08 | Date time in Y-m-d H:i:s (PHP) format. |
Response Values
Name | Data Type | Min Length | Max Length | M/O | Sample Value | Comments |
---|---|---|---|---|---|---|
status | String | M | OK | Just sends 'OK' confirmation on save. |
Sample Request
{
"key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
"latitude": "8.50472669182539",
"longitude": "76.97219809387414",
"datetime": "2021-01-03 07:06:08"
}
Sample Success Response
{
"status": "OK",
"e": 200,
"msg": "Success"
}
Sample Failure Responses
{
"e": 400,
"msg": "Bad Request."
}
{
"e": 401,
"msg": "Invalid authentication credentials."
}