Device Location - PUT Update Location
Updates information of an existing location, such as name, description, or coordinates
Puthttps://api.iotstadium.com/auth/ext/locations/:id
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
Parameter
Field | Type | Description |
---|---|---|
location_name | Text |
The name of your location (Required) |
coord_lat | Integer |
The latitude coordinate of your new location (Max 128 characters) |
coord_long | Integer |
The longitude coordinate of your new location (Max 128 characters) |
description | String |
The description of your location |
address | String |
The address of your location |
custom_field | String |
The additional detail of your location |
id | Integer |
The ID of your location |
request PUT 'api.iotstadium.com/ext/locations/173' \
data-raw '{
"location_name": "univ kartini",
"coord_lat": "-7.3007803028559",
"coord_long": "112.76244342327",
"description": "test device location update",
"address": "nginden raya, sukolilo, surabaya",
"id": 173,
"created_by": {
"first_name": "Test",
"last_name": "QA",
"id": 78,
"email": "owner@gmail.com"
},
"marker_image": "",
"custom_field": [
{
"id": 275,
"key": "Univ",
"parent_id": null,
"child": [
{
"id": 276,
"key": "lab kom",
"parent_id": 275,
"child": [
{
"id": 277,
"key": "ruang server",
"parent_id": 276,
"child": []
}
]
}
]
}
],
"delete_custom_field": []
}'
{
"message": "location updated",
"data": {
"id": 173
},
"code": 200
}
{
"message": "data not found",
"errors": [
{
"message": "data not found",
"field": "location"
}
],
"code": 404
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "location_name",
"message": "The location name field is required.."
}
]
}
{
"message": "Not Allowed",
"error": {
"message": "Not Allowed",
"field": "user"
},
"code": 403
}