...
Code Block |
---|
curl -s \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ej577asf-a5k6-42yq-a3a2-fh03hb8cb58c" \ https://beta-api.ambita.com/kode/v1/orders/cadastre -d " { \"orderDatadeliveryInformation\": { \"address\": \"Infoveien 1, 9999 Infoland\",// delivery information object }, \"cadastre\": \"9999-1-1-0-0\" \"orderData\": { }, \"productsaddress\": [\"Infoveien 1, 9999 Infoland\", { \"cadastre\": \"9999-1-1-0-0\" \"code\": \"WI99990033\"}, \"products\": [ } { ], \"referencecode\": \"some-referenceWI99990033\", \"technicalReference } ], \"reference\": \"some-technical-reference\", }\"technicalReference\" : \"some-technical-reference\" }" |
JSON body structure
Property | Description |
---|---|
| Object that includes information related to delivery of the products |
| Order data required to order the products specified which will differ based on the type of product being ordered between cadastre, share, map products |
| This reference is used to connect multiple orders to one reference, usually an assignment key and commonly used for billing reference |
| This reference is used to reference an order in our system, to a unique id in your system, good for debugging and lookups |
| Array of objects |
...
Property | Description |
---|---|
For ordering cadastre products | |
| Important to use this format: {street-address}, {postal-code} {postal-office} |
| Cadastre should always include all parts {Kommunenummer}-{Gårdsnummer}-{Bruksnummer}-{Festenummer}-{Seksjonsnummer}, example: |
For ordering share products | |
| Organization number |
| Share number |
For ordering map product | |
| A closed GeoJSON polygon specified in ETRS89 / UTM zone 33N or ETRS89 / UTM zone 32N |
| Spatial reference the |
products
array of objects
...
Property
...
Description
...
code
...
Use product API to find correct product codes in given municipality
...
data
*
...
Additional data required to order a specific products that varies based on a product
*
indicates optional fields
Example responseExample cadastre products orderData
Code Block |
---|
"orderData": {
"address": "Infoveien 1, 9999 Infoland",
"cadastre": "9999-1-1-0-0"
} |
Example share products orderData
Code Block |
---|
"orderData": {
"organizationNumber": 988424587,
"shareNumber": 136
} |
Example map products orderData
Code Block |
---|
"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 |
---|---|
| Use product API to find correct product codes in given municipality |
| Additional data required to order a specific products that varies based on a product |
*
indicates optional fields
Example map products array with additional data
Code Block |
---|
"products": [
{
"code": "WI54016101",
"data": {
"format": "UTM"
}
}
] |
Example response
Code Block |
---|
{
"id": 1664984,
"status": "NEW",
"priceNet": 0,
"priceVat": 0,
"dateOrdered": "2021-01-28T09:10:15+0100",
"dateStatus": "2021-01-28T09:10:15+0100",
"orders": [
{
"id": 2640649,
"supplierName": "Tromsø kommune",
"user": "Test User",
"technicalReference": null,
"orderLines": [
{
"id": 11603164,
"status": {
"code": "NEW",
"name": "New order. Has not been processed yet."
},
"product": "WI54016101",
"productName": "Basiskart som vektordata",
"productType": {
"code": "0",
"name": "NORMAL"
},
"mediaType": "Datafil",
"delivery": "Elektronisk",
"priceNet": 0,
"priceVat": 0
}
]
}
]
} |
Get products
To get products, you need to use the access_token
that you previously obtained.
...