Versions Compared

Key

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

About

Ambita Kode API is…..

….

KODE stands for Kommunalt Ordresystem for Distribusjon av Eiendomsdata.

Subscribe to our email list to receive updates about our API here.

How to integrate

You want to start with setting up the authentication, go to the Authentications Authentication page.

Then you want to find the product you want to order, this is done by looking up the product list for a given municipality, see Products. You can also contact support if you are unsure about what product to order, support@ambita.com.

You also want to know the price of the product you want to order and in most cases the price will be available on the product, but in the case of ordering a product with custom order data like a map product the price can differ based on the order data, so you should get the price as described in Prices.

Next you want to create an order, this is described in Orders.

...

  1. Use the orderId and get the order from our API described in Orders.

  2. Loop through assets and do necessary actionsFiles , files can occur on both order level and order line level.

    Example (provided in JavaScript)

    Code Block
    languagejs
     fetch('https://beta-api.ambita.com/kode/v1/orders/:orderId')
       .then(response => {
         response.orders.forEach(order => {
           if (order.assets.length > 0) {
             // loop through order assets and do necessary actions
           }
    
           order.orderLines.forEach(orderLine => {
             if (orderLine.assets.length > 0) {
               // loop through order line assets and do necessary actions
             }
           });
         });
       });
    
  3. Delete or save the file

    Response from https://beta-api.ambita.com/kode/v1/orders/:orderId

    Code Block
    languagejson
     {
       "id": 1234567,
       "status": "PROGRESS",
       ...
       "orders": [
         {
           "id": 1234567,
           "supplierName": "Infoland Kommune - demo",
           "assets": [
             ...
           ],
           ...
           "orderLines": [
             {
               "id": 12345678,
               "assets": [
                 ...
               ]
    

    Take a look at the Delivered filesFiles section, the id of the asset will be unique and should be stored in your system. Use this id as a reference to check if you have downloaded the asset before, this way you won’t end up with duplicates. You should also check the status of the asset and delete the file if it has status DELETED.

Distributor

...

Messages

You should implement handling of these messages, see Distributor Messages for more info.