Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

{{base_url_ws}} is https://ws.di.no for production and https://dev-ws.di.no for dev

Endpoint

Method

Description

Example payload

Example response

{{base_url_ws}}/ws/json/auth/v-3/login/600

POST

Login with DI ws-user and receive a bearer token

{
    "username": "wsaftonbladet",
    "password": "passphrase"
}

{
    "token": "bearertokenstring"
}

{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/start

POST

Give DI notice that you will start sending delivery amounts for a product

{
    "productNameExternal": "OR",
    "date": "2023-03-01"
}

{
    "status": "ok"
}

{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/updateForecast

POST

Send an array of delivery amounts for product and days. Retailer has to have autoreg = true in the DI retailer-system. Note that demand and spread is ignored.

{
    "fsstNumber": 999999,
    "productNameExternal": "OR",
    "resellerEditions": [
        {
            "date": "2023-03-01",
            "demand": 4.0,
            "delivery": 4.0,
            "spread": 0.0
        },
        {
            "date": "2023-03-02",
            "demand": 5.0,
            "delivery": 5.0,
            "spread": 0.0
        },
        {
            "date": "2023-03-03",
            "demand": 6.0,
            "delivery": 6.0,
            "spread": 0.0
        }                                                  
    ]
}

{
    "status": "ok"
}

{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/end

POST

Give DI notice that you have stopped sending delivery amounts for a product. This will also truncate logs older than 2 days.

{
    "productNameExternal": "OR",
    "date": "2023-03-05"
}

{
    "status": "ok"
}

  • No labels