Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 hereSwagger.

Send a POST request to https://beta-api.ambita.com/kode/v1/orders/[cadastre|share|map]

Example request

Code Block
languagejs
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

deliveryInformation*

Object that includes information related to delivery of the products, see section below

orderData

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

reference

This reference is used to connect multiple orders to one reference, usually an assignment key and commonly used for billing reference

technicalReference*

This reference is used to reference an order in our system, to a unique id in your system, good for debugging and lookups

products

Array of objects, see section below

...

deliveryInformation object

Property

Description

address*

Address line

address2*

Address line 2

address3*

Address line 3

alias*

Alias

companyName*

Company name

email*

Email

name*

Name

phone*

Phone

postalCode*

Postal code

* indicates optional fields

orderData object

Property

Description

For ordering cadastre products, see example below

 

address

Important to use this format {Street address}, {Postal code} {Postal officeplace}, for example, Infoveien 1, 9999 Infoland

cadastre

Cadastre should always include all required parts {Kommunenummer}-{Gårdsnummer}-{Bruksnummer}-{Festenummer}-{Seksjonsnummer}, for example, 0301-100-10-0-0

For ordering share products, see example below

 

organizationNumber

Organization number

shareNumberShare number

The id of the owner's right of occupation in the cooperative

For ordering map productproducts, 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 cadastre products orderData

Code Block
languagejson
"orderData": {
  "address": "Infoveien 1, 9999 Infoland",
  "cadastre": "9999-1-1-0-0"
}

Example share products orderData

Code Block
languagejson
"orderData": {
  "organizationNumber": 988424587,
  "shareNumber": 136
}

Example map products orderData

Code Block
languagejson
"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

code

Use product products API to find correct product codes in given municipality

data*

Additional data required to order a specific products product that varies based on a product, see example below

...

Example map products array with additional data

Code Block
languagejson
"products": [
  {
    "code": "WI54016101",
    "data": {
      "formatsystem": "UTM"
    }
  }
]

Example response

Code Block
languagejson
{
  "id": 16649841234567,
  "status": "NEW",
  "priceNet": 01650.4,
  "priceVat": 02063,
  "dateOrdered": "2021-01-28T09:10:15+010021.02.2021 13:26:52",
  "dateStatus": "2021-01-28T09:10:15+010021.02.2021 13:27:54",
  "orders": [
    {
      "id": 26406491234567,
      "supplierName": "Tromsø kommuneInfoland Kommune - demo",
      "user": "Test User(BETA) Ola Nordmann",
      "technicalReference": null"some-technical-reference",
      "orderLines": [
        {
          "id": 1160316412345672,
          "status": {
 "NEW",
          "product": "WI99990033",
          "codeproductName": "NEWMeglerpakke",
          "productType": "PACKAGE",
          "namemediaType": "New order. Has not been processed yet."Ukjent",
          "delivery": "Elektronisk",
          }"priceNet": 1650.4,
          "productpriceVat": "WI54016101"2063,
          "productNamedateStatus": "Basiskart som vektordata"21.02.2021",
          "packageLineId": null,
          "productTypeassets": []
        },
        {
          "id": 12345673,
"code          "status": "0NEW",
          "product": "WI99990900",
 "name         "productName": "NORMALGodkjente bygningstegninger",
           }"productType": "NORMAL",
          "mediaType": "Datafil",
          "delivery": "Elektronisk",
          "priceNet": 0,
          "priceVat": 0,
          "dateStatus": "21.02.2021",
          "packageLineId": 11604271,
          "assets": []
        },
        ...
      ]
    }
  ]
}

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

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

Example request

Code Block
languagejs
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

Get delivered files

Here you can find information about assets in our API

Asset object

Code Blockcode
languagejson
{
  "name"id": 1234567,
  "status": "PROCESSING",
  "priceNet": 1650.4,
  "priceVat": 2063,
  "dateOrdered": "The-exact-name-of-the-file.pdf21.02.2021 13:26:52",
  "filenamedateStatus": "More-descriptive-name-of-the-file.pdf21.02.2021 13:28:58",
  "downloadUrlorders": [
    {
      "id": "https://beta-api.ambita.com/shopping/v2/assets/d2f48dk9d267a86d2858244d0c2c19371234567,
      "supplierName": "Infoland Kommune - demo",
      "assetStatususer": "OK(BETA) Ola Nordmann",
      "productCategorytechnicalReference": "PRODUCT_UTEN_KATEGORI",some-technical-reference",
      "orderLines": [
        {
          "id": 12345672,
"d2f48dk9d267a86d2858244d0c2c1937"
}

...

Property

...

Description

...

name

...

The name of the file that is uploaded to our system

...

filename

...

A descriptive filename that we create based on product name

...

downloadUrl

...

The URL to where you can download the file

...

assetStatus

...

The status of the asset, see section below

...

productCategory

...

The category of the asset, can be used to categorize files or cost, see section below

...

id

...

Unique id for each asset

Asset status

...

Status

...

Description

...

OK

...

The asset is available and can be downloaded

...

DELETED

...

The asset is deleted and is no longer available, you should remove the file from your system

Product categories

Available product categories

...

Product category

...

PRODUKT_UTEN_KATEGORI

...

KOMMUNAL_INFORMASJON

...

PLAN_KART_REGULERING

...

FERDIGATTEST_OG_MIDLERTIDIG_BRUKSTILLATELSE

File types

Most of the files are PDFs, but we also deliver other file types, these are the most common types:

...

.pdf

...

.txt

...

.xlsx, .xls, .csv

...

.jpg, .png

...

.sos, .kof, .dxf, .dvg, .sketchup

...

          "status": "PROCESSING",
          "product": "WI99990033",
          "productName": "Meglerpakke",
          "productType": "PACKAGE",
          "mediaType": "Ukjent",
          "delivery": "Elektronisk",
          "priceNet": 1650.4,
          "priceVat": 2063,
          "dateStatus": "21.02.2021",
          "packageLineId": null,
          "assets": []
        },
        {
          "id": 12345673,
          "status": "PROCESSING",
          "product": "WI99990900",
          "productName": "Godkjente bygningstegninger",
          "productType": "NORMAL",
          "mediaType": "Datafil",
          "delivery": "Elektronisk",
          "priceNet": 0,
          "priceVat": 0,
          "dateStatus": "21.02.2021",
          "packageLineId": 11604271,
          "assets": []
        },
        ...
      ]
    }
  ]
}