...
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) |
labelType | unified-large | What kind of label that is wanted. The type determines both layout and size of the label. Currently the following types are supported *:
|
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 | ||||
---|---|---|---|---|
| ||||
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.
...