/locations
This endpoint allows you to update several Locations base parameters (no relationship changes allowed). Have in mind that there is a max limit of 50 locations per request
updateMultipleLocations
Content-Type: application/json
locations
array<object>
An array of locations to update
name
string | null
Example: Room 101
code
string | null
Location code. Must be unique across its level.
Example: R101
observation
string | null
Additional information
latitude
number | null
Element Location latitude
longitude
number | null
Element Location longitude
area
number | null
Location area
glass_area
number | null
Location glass area
volume
number | null
Location volume
orientation
string | null
Solar orientation (North, South, West, East)
data
array<union>
id
string
required
read-only
ID of the Location
type
string
required
read-only
Model type
location
attributes
object
required
entity_id
integer
name
string
required
Location name
full_name
string
required
read-only
Names of the location's parents concatenated by hyphen with location name.
code
string
required
Location code.
full_code
string
required
read-only
Codes of the location's parents concatenated by dot with location code.
original_full_code
string | null
read-only
Location original full code.
observation
string | null
required
Additional information
date_updated
string | null
required
read-only
Example: 2021-07-21 18:38:00
parent_id
integer
ID of the location parent.
root_parent_id
integer
read-only
ID of the location root parent (of `type` equals to `building`).
area
number | null
Location area
glass_area
number | null
Location glass area
volume
number | null
Location volume
orientation
string | null
Solar orientation (North, South, West, East)
is_from_network
boolean
read-only
If Location is from network
local_uuid
string (uuid)
read-only
Location UUID
assets_count
integer | null
read-only
Cumulative count of assets (equipment) in this location and all its descendants. Only present when `with_assets_count=true` query parameter is provided.
associations
array<string>
List of ways the operator is associated with this building. Possible values are `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator belongs to), and `CLIENT` (via a client the operator is assigned to).
relationships
object
building
object
data
object
type
string
read-only
building
id
string
read-only
files
object
data
array<object>
type
string
read-only
file
id
string
read-only
operators
object
data
array<object>
type
string
read-only
operator
id
string
read-only
localOrientation
object
data
array<object>
type
string
read-only
localOrientation
id
string
read-only
id
string
required
read-only
ID of the Location
type
string
required
read-only
Model type
location-folder
attributes
object
required
entity_id
integer
name
string
required
Folder name
full_name
string
required
read-only
Names of the location's parents concatenated by hyphen with location name.
code
string
required
Folder code.
full_code
string
required
read-only
Codes of the Folder's parents concatenated by dot with Folder code.
original_full_code
string | null
read-only
Location original full code.
observation
string | null
required
Additional information
date_updated
string (date-time) | null
required
read-only
Example: 2020-12-03T12:45:00.000Z
parent_id
integer
ID of the Folder parent.
root_parent_id
integer
read-only
ID of the Folder root parent (of `type` equals to `building`).
is_from_network
boolean
read-only
If Folder is from network
assets_count
integer | null
read-only
Cumulative count of assets in this folder (including all nested locations). Only returned when `with_assets_count=true` query parameter is provided.
Example: 5
relationships
object
building
object
data
object
type
string
read-only
building
id
string
read-only
included
array<union>
List of relationships to be included
id
string
required
read-only
ID of the Location
type
string
required
read-only
Model type
location
attributes
object
required
entity_id
integer
name
string
required
Location name
full_name
string
required
read-only
Names of the location's parents concatenated by hyphen with location name.
code
string
required
Location code.
full_code
string
required
read-only
Codes of the location's parents concatenated by dot with location code.
original_full_code
string | null
read-only
Location original full code.
observation
string | null
required
Additional information
date_updated
string | null
required
read-only
Example: 2021-07-21 18:38:00
parent_id
integer
ID of the location parent.
root_parent_id
integer
read-only
ID of the location root parent (of `type` equals to `building`).
area
number | null
Location area
glass_area
number | null
Location glass area
volume
number | null
Location volume
orientation
string | null
Solar orientation (North, South, West, East)
is_from_network
boolean
read-only
If Location is from network
local_uuid
string (uuid)
read-only
Location UUID
assets_count
integer | null
read-only
Cumulative count of assets (equipment) in this location and all its descendants. Only present when `with_assets_count=true` query parameter is provided.
associations
array<string>
List of ways the operator is associated with this building. Possible values are `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator belongs to), and `CLIENT` (via a client the operator is assigned to).
relationships
object
building
object
data
object
type
string
read-only
building
id
string
read-only
files
object
data
array<object>
type
string
read-only
file
id
string
read-only
operators
object
data
array<object>
type
string
read-only
operator
id
string
read-only
localOrientation
object
data
array<object>
type
string
read-only
localOrientation
id
string
read-only
meta
object
Meta model structure details
pagination
object
total
integer
required
Total items.
Example: 1
count
integer
required
Total items returned for the current page.
Example: 1
per_page
integer
required
Maximum number of records per page.
Example: 1
current_page
integer
required
Number of the current page.
total_pages
integer
required
Number of the total pages.
links
object
Requests that return multiple items include a `links` attribute, with links related to request's context.
self
string
required
read-only
Current response link.
Example: /path?page=1
first
string
required
read-only
Link to the first page result.
Example: /path?page=1
last
string
required
read-only
Link to the previous page result.
Example: /path?page=1
next
string
read-only
Link to the next page result.
Example: /path?page=1
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X PATCH \
'https://api.sandbox.infraspeak.com/v3/locations' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"locations": []
}'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/locations', {
method: 'PATCH',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
body: JSON.stringify({
"locations": []
}),
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->patch('https://api.sandbox.infraspeak.com/v3/locations',
array (
'locations' =>
array (
),
)
);
import requests
response = requests.patch(
'https://api.sandbox.infraspeak.com/v3/locations',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
json={
{
"locations": []
}
},
)
data = response.json()