Versions Compared

Key

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

...

The API provides a list of future distribution dates that have delivery or pickup coverage for of a product on the specified address. The product are determined from the freight product (freightProductId). The remaining fields along with the customer name field will be used to lookup the address in the carrier system.

...

Tip

Integration tips

  • We recommend to always include all information you have available, and use the same information in other relevant APIs to ensure the results are consistent

  • Specify household number where possible, e.g. H0201, in order for the system to match of the address as exact as possible

  • NB only a few freight products are supported in this API. Make sure to confer the wanted freight product with DI

Setup

Example

Description

Username (see Authentication section)

wsfoobar

A valid username.

Password (see Authentication section)

a-very-very-long-password

A password matching given username.

shopId

12345

The coverage check is made with respect to a given shop. 

freightProductId

55

An identifier for a valid freight product.

...

Field

Value

Content-Type

application/json

Authorization

$SECRET_WS_TOKEN - jwt token from authentication

Request query parameter

Field

Description

Example

Data type

Mandatory

limit

Defines how many days ahead it should look for coverage. Any value from 1-30, where 14 are the default limit if none is specified

23

Integer

Request body

Field

Description

Example

Data type

Mandatory

shopId

The identifier of the shop that makes the request

23

Integer

(tick)

freightProductId

The freight product that we want check the coverage of

12

Integer

(tick)

customerName

Customer name

Ola Norrman

String

countryCode

Two letter country code of the address

NO

String(tick)

postalName

City name of the address

Oslo

String

zipCode

Zip code of the address

0155

String

(tick)

address

Street name of the address

Akersgata 55A H0212

String(tick)

co

Care of address of the address

Kari Norrman

String

Field

Value

Content-Type

application/json

Authorization

$SECRET_WS_TOKEN - jwt token from authentication

Curl request example

Expand
titleExample
Code Block
curl --location 'https://staging-ws.di.no/ws/json/addressCheck/single/v-1/dates?limit=14' \
--header 'Authorization: Bearer $SECRET_WS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{ 
"shopId": "33",
"freightProductId": "10",
"customerName": "Ola Norrman",
"countryCode" : "NO",
"postalName" : "SEM",
"zipCode": "3171",
"address": "GAMLE RAMNESVEI 38",
"co" : "Kari Norrman"
}'

Response

The endpoint replies with a response object in JSON format, containing the following data

...

Expand
titleList of error keys

error key

status code

required.shop.id

400

wrong.shop.id

400

missing.freight.product.id

400

wrong.freight.product.id

400

required.zip.code

400

incorrect.param.limit

400

no.access.shop.id

403

internal.error

500

...