Prices

To get prices, you need to use the access_token that you previously obtained.

Take a look at our Swagger documentation for the API here.

Send a POST request to https://beta-api.ambita.com/kode/v1/prices/map

Example request

curl -s \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ej577asf-a5k6-42yq-a3a2-fh03hb8cb58c" \ https://beta-api.ambita.com/kode/v1/prices/map -d " { \"orderData\": { \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[ [679906.435383017,7741056.419552005], [679906.4572162632,7742527.458934937], [681832.6049002217,7742527.507026337], [681832.6139410603,7741056.365899973], [679906.435383017,7741056.419552005] ]] }, \"spatialReference\": \"25833\" }, \"products\": [ { \"code\": \"WI54016101\", \"data\": { \"format\": \"UTM\" } } ] }"

JSON body structure

Property

Description

Property

Description

orderData

Order data required to calculate the price of products with variable price depending on input order data which will differ based on the product being ordered

products

Array of objects, see section below

orderData object

Property

Description

Property

Description

For getting prices on map products, see example below

 

geometry

A closed GeoJSON polygon specified in ETRS89 / UTM zone 33N or ETRS89 / UTM zone 32N

spatialReference

Spatial reference the geometry is specified in either 25833 or 25832

Example map products orderData

"orderData": { "geometry": { "type": "Polygon", "coordinates": [[ [679906.435383017,7741056.419552005], [679906.4572162632,7742527.458934937], [681832.6049002217,7742527.507026337], [681832.6139410603,7741056.365899973], [679906.435383017,7741056.419552005] ]] }, "spatialReference": "25833" }

products array of objects

Property

Description

Property

Description

code

Use products API to find correct product codes in given municipality

data*

Additional data required to get the variable price for a specific product that varies based on a product, see example below

* indicates optional fields

Example map products array with additional data

"products": [ { "code": "WI54016101", "data": { "system": "UTM" } } ]

Example response