Create order
To create an order, 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/orders/[cadastre|share|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/orders/cadastre -d " { \"deliveryInformation\": { // delivery information object }, \"orderData\": { \"address\": \"Infoveien 1, 9999 Infoland\", \"cadastre\": \"9999-1-1-0-0\" }, \"products\": [ { \"code\": \"WI99990033\" } ], \"reference\": \"some-reference\", \"technicalReference\": \"some-technical-reference\" }"
JSON body structure
Property | Description |
---|---|
| Object that includes information related to delivery of the products, see section below |
| Order data required to order the products specified which will differ based on the type of product being ordered between cadastre, share, map products, see section below |
| 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, see section below |
*
indicates optional fields
deliveryInformation
object
Property | Description |
---|---|
| Address line |
| Address line 2 |
| Address line 3 |
| Alias |
| Company name |
| |
| Name |
| Phone |
| Postal code |
*
indicates optional fields
orderData
object
Property | Description |
---|---|
For ordering cadastre products, see example below |
|
| Important to use this format |
| Cadastre should always include all required parts |
For ordering share products, see example below |
|
| Organization number |
| The id of the owner's right of occupation in the cooperative |
For ordering map products, see example below |
|
| A closed GeoJSON polygon specified in ETRS89 / UTM zone 33N or ETRS89 / UTM zone 32N |
| Spatial reference the |
Example cadastre products orderData
"orderData": { "address": "Infoveien 1, 9999 Infoland", "cadastre": "9999-1-1-0-0" }
Example share products orderData
"orderData": { "organizationNumber": 988424587, "shareNumber": 136 }
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 |
---|---|
| Use products API to find correct product codes in given municipality |
| Additional data required to order 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
{ "id": 1234567, "status": "NEW", "priceNet": 1650.4, "priceVat": 2063, "dateOrdered": "2020-03-11T10:01:15+0100", "dateStatus": "2020-03-11T10:01:15+0100", "orders": [ { "id": 1234567, "supplierName": "Infoland Kommune - demo", "user": "(BETA) Ola Nordmann", "technicalReference": "some-technical-reference", "orderLines": [ { "id": 12345672, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990033", "productName": "Meglerpakke", "productType": { "code": "1", "name": "PACKAGE" }, "mediaType": "Ukjent", "delivery": "Elektronisk", "priceNet": 1650.4, "priceVat": 2063 }, { "id": 12345673, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990900", "productName": "Godkjente bygningstegninger", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "Datafil", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345674, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99991001", "productName": "Tilknytning til offentlig vann og kloakk - skjemaløsning", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "Ukjent", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345675, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990400", "productName": "Grunnkart", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "Tekstfil", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345676, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99992350", "productName": "Planutsnitt med bestemmelser", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "PDF-dok", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345677, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99991600", "productName": "Kommunale avgifter og eiendomsskatt", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "PDF-dok", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345678, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990901", "productName": "Midlertidig brukstillatelse og ferdigattest", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "PDF-dok", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 } ] } ] }
Get order
To get an order, you need to use the access_token
that you previously obtained.
Take a look at our Swagger documentation for the API here.
Send a GET
request to https://beta-api.ambita.com/kode/v1/orders/1234567
Example request
curl -s \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ej577asf-a5k6-42yq-a3a2-fh03hb8cb58c" \ https://beta-api.ambita.com/kode/v1/orders/1234567
Example response
{ "id": 1234567, "status": "NEW", "priceNet": 1650.4, "priceVat": 2063, "dateOrdered": "2020-03-11T10:01:15+0100", "dateStatus": "2020-03-11T10:01:15+0100", "orders": [ { "id": 1234567, "supplierName": "Infoland Kommune - demo", "user": "(BETA) Ola Nordmann", "technicalReference": "some-technical-reference", "orderLines": [ { "id": 12345672, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990033", "productName": "Meglerpakke", "productType": { "code": "1", "name": "PACKAGE" }, "mediaType": "Ukjent", "delivery": "Elektronisk", "priceNet": 1650.4, "priceVat": 2063 }, { "id": 12345673, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990900", "productName": "Godkjente bygningstegninger", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "Datafil", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345674, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99991001", "productName": "Tilknytning til offentlig vann og kloakk - skjemaløsning", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "Ukjent", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345675, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990400", "productName": "Grunnkart", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "Tekstfil", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345676, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99992350", "productName": "Planutsnitt med bestemmelser", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "PDF-dok", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345677, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99991600", "productName": "Kommunale avgifter og eiendomsskatt", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "PDF-dok", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 }, { "id": 12345678, "status": { "code": "NEW", "name": "New order. Has not been processed yet." }, "product": "WI99990901", "productName": "Midlertidig brukstillatelse og ferdigattest", "productType": { "code": "0", "name": "NORMAL" }, "mediaType": "PDF-dok", "delivery": "Elektronisk", "priceNet": 0, "priceVat": 0 } ] } ] }