Versions Compared

Key

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

...

Path

Operation supported

Value description

Example operation

/distributionDate

"op": "replace"

String,
Date with format YYYY-MM-DD

Code Block
languagejson
{ "op":"replace", "path": "/distributionDate", "value": "2020-09-30" }

/consignor/name

"op": "replace"

String,
Consignor/sender name

Code Block
languagejson
{ "op":"replace", "path": "/consignor/name", "value": "MyStore" }

/consignor/phone1

"op": "replace"

String,
Consignor/sender phone number

Code Block
languagejson
{ "op":"replace", "path": "/consignor/phone1", "value": "12345678" }

/consignor/email

"op": "replace"

String,
Consignor/sender email

Code Block
languagejson
{ "op":"replace", "path": "/consignor/email", "value": "info@email.com" }

/consignor/coAddress

"op": "replace"

String,
Consignor/sender co address

Code Block
languagejson
{ "op":"replace", "path": "/consignor/coAddress", "value": "MyStores Corporate Group" }

/consignor/address

"op": "replace"

String,
Consignor/sender street address, number and household

Code Block
{ "op":"replace","path":"/consignor/address","value":"Storgata 4B H0201"},

/consignor/postalName

"op": "replace"

String,
Consignor/sender city

Code Block
{"op":"replace","path":"/consignor/postalName","value":"Oslo"}, 

/consignor/zipCode

"op": "replace"

String,
Consignor/sender postal code

Code Block
{"op":"replace","path":"/consignor/zipCode","value":"0577"}

/consignorReference

"op": "replace"

String,
Consignor/sender reference

Code Block
languagejson
{ "op":"replace", "path": "/consignor/reference", "value": "senderReference" }

/consignee/name

"op": "replace"

String,
Consignee/receiver name

Code Block
languagejson
{ "op":"replace", "path": "/consignee/name", "value": "Ola Normann" }

/consignee/phone1

"op": "replace"

String,
Consignee/receiver phone number

Code Block
languagejson
{ "op":"replace", "path": "/consignee/phone1", "value": "12345678" }

/consignee/email

"op": "replace"

String,
Consignee/receiver email

Code Block
languagejson
{ "op":"replace", "path": "/consignee/email", "value": "info@email.com" }

/consignee/coAddress

"op": "replace"

String,
Consignee/receiver co address

Code Block
languagejson
{ "op":"replace", "path": "/consignee/coAddress", "value": "Kari Normann" }

/consignee/address

"op": "replace"

String,
Consignee/receiver street address, number and household

Code Block
{ "op":"replace","path":"/consignee/address","value":"Storgata 4B H0201"},

/consignee/postalName

"op": "replace"

String,
Consignee/receiver city

Code Block
{"op":"replace","path":"/consignee/postalName","value":"Oslo"}, 

/consignee/zipCode

"op": "replace"

String,
Consignee/receiver postal code

Code Block
{"op":"replace","path":"/consignee/zipCode","value":"0577"}

/consigneeReference

"op": "replace"

String,
Consignee/receiver reference

Code Block
languagejson
{ "op":"replace", "path": "/consignee/reference", "value": "receiverReference" }

/measurements/weightGrams

"op": "replace"

String,

Package weight in grams

Code Block
{ "op" : "replace", path" : "/measurements/weightGrams", value" : 600 }

/measurements/lengthCm

"op": "replace"

String,

Package length in cm

Code Block
{ "op" : "replace", path" : "/measurements/lengthCm", value" : 10 }

/measurements/widthCm

"op": "replace"

String,

Package width in cm

Code Block
{ "op" : "replace", path" : "/measurements/widthCm", value" : 10 }

/measurements/heightCm

"op": "replace"

String,

Package height in cm

Code Block
{ "op" : "replace", path" : "/measurements/heightCm", value" : 10 }

Examples

Curl request edit consignor all details

...

titleCurl request edit consignor

...

Examples

Curl request edit consignor all details

Expand
titleCurl request edit consignor
Code Block
curl --location --request PATCH 'https://staging-ws.di.no/ws/json/parcel/booking/v-1/orders/70724762044206508' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $SECRET_WS_TOKEN' \
--data-raw '[
    {
        "op": "replace",
        "path": "/consignor/postalNamename",
        "value": "OsloMyStore"
    },
    {
        "op": "replace",
        "path": "/consignor/zipCodephone1",
        "value": "057712345678"
    },
{
        "op": "replace",
        "path": "/consignor/referenceemail",
        "value": "senderReferenceinfo@email.com"
    }
]'

Curl request edit consignee all details

curl --location --request PATCH 'https://staging-ws.di.no/ws/json/parcel/booking/v-1/orders/70724762044206508' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer $SECRET_WS_TOKEN' \ --data-raw '[
Expand
titleCurl request edit consignee
Code Block
,
{
        "op": "replace",
        "path": "/consignor/coAddress",
        "value": "MyStores Corporate Group"
    },
{
        "op": "replace",
        "path": "/
consignee
consignor/
name
address",
        "value": "
Ola
Storgata 4B 
Normann
H0201"
    },
    {
        "op": "replace",
        "path": "/
consignee
consignor/
phone1
postalName",
        "value": "
12345678
Oslo"
    },
    {
        "op": "replace",
        "path": "/
consignee
consignor/
email
zipCode",
        "value": "
info@email.com
0577"
    },
{
        "op": "replace",
        "path": "/
consignee/coAddress", "value": "Kari Normann" }, {
consignor/reference",
        "
op
value": "
replace
senderReference"
,

    }
]'

Curl request edit consignee all details

Expand
titleCurl request edit consignee

Code Block
curl --location --request PATCH "path": "/consignee/address",
        "value": "Storgata 4B H0201"
    },
    'https://staging-ws.di.no/ws/json/parcel/booking/v-1/orders/70724762044206508' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $SECRET_WS_TOKEN' \
--data-raw '[
    {
        "op": "replace",
        "path": "/consignee/postalNamename",
        "value": "Oslo"
    },Ola Normann"
    },
{
        "op": "replace",
        "path": "/consignee/zipCodephone1",
        "value": "057712345678"
    },
{
        "op": "replace",
        "path": "/consignee/referenceemail",
        "value": "receiverReferenceinfo@email.com"
    }
]'

Curl request edit distribution date

curl --location --request PATCH 'https://staging-ws.di.no/ws/json/parcel/booking/v-1/orders/70724762044206508' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer $SECRET_WS_TOKEN' \ --data-raw '[

Expand
titleCurl request edit distribution date
Code Block
,
{
        "op": "replace",
        "path": "/consignee/coAddress",
        "value": "Kari Normann"
    },
{
        "op": "replace",
        "path": "/consignee/

distributionDate

address",
        "value": "

2021-12-22

Storgata 4B H0201"
    }

]'

Curl request edit package measurements

curl --location --request PATCH 'https://staging-ws.di.no/ws/json/parcel/booking/v-1/orders/70724762044206508' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer $SECRET_WS_TOKEN' \ --data-raw '[

Expand
titleCurl request edit package measurements
Code Block
,
    {
        "op": "replace",
        "path": "/consignee/postalName",
        "value": "Oslo"
    },
    {
        "op"

: "replace",
        "path"

: "/

measurements

consignee/

weightGrams

zipCode",
        "value"

: 

600

"0577"
    },
{
   

{

     

"op"

: "replace",
        "path"

: "/

measurements

consignee/

lengthCm", "value" : 30 },

reference",
   

{

     

"

op

value"

: "

replace

receiverReference"

,


    }
]'

Curl request edit distribution date

Expand
titleCurl request edit distribution date
Code Block
curl --location  "path" : "/measurements/heightCm",
      "value" : 10
    },
    {--request PATCH 'https://staging-ws.di.no/ws/json/parcel/booking/v-1/orders/70724762044206508' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $SECRET_WS_TOKEN' \
--data-raw '[    
{
        "op" : "replace",
        "path" : "/measurements/widthCmdistributionDate",
        "value" : 10"2021-12-22"
    }
]'

Response

Name

Type

Example

Mandatory

Description

shipmentId

String

70724761617883184

(tick)

This is a unique identifier. Typically named MessageNumber

freightProductId

Whole number

2

(tick)

The selected freight product for this shipment.

parties

List of party objects

(tick)

List of all the parties in this shipment.

items

List of item objects

(tick)

List of all the items in this shipment.

properties

Map of root properties

Map with additional properties. Various information (properties) are specified only for certain transport products.

additionalServices

List of additionalService objects

Additional services that should be applied to the shipment.

...