Endpoint | Method | Description | Example payload/parameters | Example response |
---|
{{base_url_ws}}/ws/json/auth/v-3/login/600 | POST | Login with DI ws-user and receive a bearer token | Code Block |
---|
{
"username": "wsaftonbladet",
"password": "passphrase"
} |
| Code Block |
---|
{
"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 | Code Block |
---|
{
"productNameExternal": "OR",
"date": "2023-03-01"
} |
| Code Block |
---|
{
"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. | Code Block |
---|
{
"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
}
]
} |
| Code Block |
---|
{
"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. | Code Block |
---|
{
"productNameExternal": "OR",
"date": "2023-03-05"
} |
| Code Block |
---|
{
"status": "ok"
} |
|
{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/retailerStatistics | GET | Get how many papers have been delivered and returned in the last x days. | historyDays=790&productNameExternal=OR&productNameExternal=AB39&fsstNumber=15454 | Code Block |
---|
[
{
"fsstNumber": 15454,
"productName": "OR",
"delivered": 6,
"returned": 2,
"soldFrom": "2020-12-29"
},
{
"fsstNumber": 15454,
"productName": "OR",
"delivered": 5,
"returned": 4,
"soldFrom": "2020-12-30"
},
] |
|
{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/retailerStatisticsAggregated | POST | Get aggregated deliveries and returns data for multiple retailers. | Code Block |
---|
{
"fsstNumbers": [15454,999999],
"productNamesList": ["OR", "AB3"],
"fromDate": "2023-01-01",
"toDate": "2023-02-01"
} |
| Code Block |
---|
[
{
"productId": 2184,
"productName": "OR",
"deliveriesInTotal": 3,
"deliveriesToFsstsWithConfirmedReturns": 3,
"confirmedReturns": 2,
"soldFrom": "2023-01-03"
},
{
"productId": 2184,
"productName": "OR",
"deliveriesInTotal": 3,
"deliveriesToFsstsWithConfirmedReturns": 3,
"confirmedReturns": 3,
"soldFrom": "2023-01-05"
}
] |
|
{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/activeRetailers | GET | Get a list of fsst-numbers with autoreg=1 that are active x number of days from now | daysFromNow=10 | Code Block |
---|
"fsstNumbers": [
15454,
16805,
15756,
16614
]
} |
|
{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/releasedProducts | GET | Get AB products that has a release the given day according to ProduktUtgivelse | releaseDate=2023-01-23 | Code Block |
---|
[
{
"productId": "OR",
"releaseDate": "2023-01-23",
"saleDayCount": 1,
"price": 29.0
},
{
"productId": "AB7",
"releaseDate": "2023-01-23",
"saleDayCount": 7,
"price": 33.9
}
] |
|
{{base_url_ws}}/ws/json/retailer/aftonbladet/v-1/activeProducts | GET | Get AB products that are currently active and what the current price is. | | Code Block |
---|
{
{
"productId": "AB7",
"productType": "BIL",
"productName": "AB Kryss & Quiz",
"price": 0.0
},
{
"productId": "OR",
"productType": "TIDN",
"productName": "AB Aftonbladet",
"price": 28.0
}
} |
|