Webservice for postal deviations
The webservice for postal deviation is to be used for fetching postal distribution deviations reported by Posten Norge, when handling subscribers that have had errors in their deliveries.
This document describes the setup for the webservice (API).
URL PROD: https://postaldeviation.di.no/lookup
URL STG: https://postaldeviations.stg.media.aws.di.no/lookup
Method: POST
Key: x-api-key
Value: one-time-secret password provided from DI
Body, example:
{
"postalNumber" : 2662,
"fromDate": "2022-12-24",
"toDate": "2022-12-24",
"subscriberId" : "888888",
"products":[
{
"product": "AFM",
"customerSystem": "AFT"
}
],
"credentials": {
"username":"{{username}}",
"password":"{{password}}"
}
}
postal number: the postal number that the customer is connected to. Must be a varchar field, with four digits (ex 0576)
fromdate: startdate of the deviation (for postal deviations, fromdate and todate are always the same), on the form ‘yyyy-mm-dd’
todate: stopdate of the deviation (for postal deviations, fromdate and todate are always the same), on the form ‘yyyy-mm-dd’
subscriberid: the unique subscriber id of the customer in the CRM system
products - product: short name of the product that the customer is subscribing to
products - customerSystem: short name of the customer system that the customer is subscribing to
credentials - username: username of the user connecting to the API
credentials - password: password of the user connecting to the API