Versions Compared

Key

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

...

key

value example

comment

identifier

(00)370724760010119754

can be either a trackingReference or a shipmentId. If a shipmentId is specified the resulting pdf can return a pdf containing several pages (one for each item)

labelTypeunified-large

What kind of label that is wanted. The type determines both layout and size of the label. Currently the following types are supported *:

  • "unified-large" - this label measures 102 mm x 192mm, and the layout is also known as the "Felles transportetikett"



* in the future could also make support for example "unified-A6" which is similar to "unified-large", but not so tall


Example request

Comment: Notice that you have to specify two paramters in accept header, i.e. label format and error messages format (json)

Code Block
languagebash
titleCurl request Helthjem standard (transportSolutionId = 1)
curl --request GET --url https://staging-ws.di.no/ws/json/parcel/parcel/label/v-1/labels/00370724760010119754/unified-large \
     --header "authorization: Bearer $SECRET_WS_TOKEN" \
     --header 'content-type: application/json' \
	 --header 'accept: application/pdf,application/json' \


Error handling

If you make requests that the API doesn't support or an error in the API occurs, it will set a http status code that describes the error, and return a text string with an error message. Clients should gracefully handle that new error keys can be added at a later stage.

...