Skip to content
robert-valueguard edited this page Jul 31, 2025 · 26 revisions

The code below gives an example of how to use the client to get area data

import valueguard

vgClient = valueguard.Client()
vgClient.authenticate("<username>", "<password>")

print(vgClient.area(search_criteria={
'ids': '1,2,3',
'names': '0760B2010',
'min_wgs84lat': '56.6674',
'max_wgs84lat': '58.5521',
'min_wgs84lon': '15.0121',
'max_wgs84lon': '15.9284',
'category_ids': '1, 2, 3'
}))

Field list

Field name Description Example
id ID of area 6
key Key of area 0126
category_id Category ID of area 1
boundary_wgs84_lat_min Min lat of area 60.0869
boundary_wgs84_lat_max Max lat area 60.8862
boundary_wgs84_lon_min Min long area 15.1421
boundary_wgs84_lon_max Max long of area 15.8382
created_at Creation datetime 2022-06-07
updated_at Update datetime 2022-06-07
valid_from Valid from datetime 2022-06-07
valid_to Valid to datetime 2022-06-07
display_name Display name Huddinge
size Size of area 0.010

Search criteria fields

Field name Description Example
ids IDs of areas {511129, 511130}
names Names of areas {64799_5399, 61683_3883}
category_ids IDs of categories {1,2,3}
min_wgs84lat lowest allowed latitude 56.6674
max_wgs84lat highest allowed latitue 58.5521
min_wgs84lon lowest allowed longitude 15.0121
max_wgs84lon highest allowed longitude 15.9284
limit Max number of objects returned 10000

Raw request

Get

curl https://api.valueguard.se/v1/area?access_token={access_token}&ids={id}

Clone this wiki locally