Parcel Activate Order API

This API enables activating a return parcel.

Contents

Prerequisites/Info

  • The user is a ws-user

  • The user has access to the web service FlowBooking

  • The user has access to the shop registered on the parcel

  • A parcel can only be activated once

Setup

Make sure you have the following information at hand before proceeding.



Example

Description



Example

Description

Username (see Authentication section)

wsfoobar

A valid username.

Password (see Authentication section)

a-very-very-long-password

A password matching given username.

Environments / Endpoints

Consider using the TEST-endpoint wile developing your system. By doing this you ensure that your test-data will not pollute any potential external systems.

TEST POST

https://staging-ws.di.no/ws/json/parcel/booking/v-1/activateOrder

PRODUCTION POST

https://ws.di.no/ws/json/parcel/booking/v-1/activateOrder

Authentication

This endpoint requires the user to be authenticated. Refer to the documentation here for more information on how to obtain a valid token to use in your request. 

Making a Request

Notes

  • A parcel can only be activated once

  • Clients using this API should not fail if new optional fields are added to the API. If a new field is added to the request or response on a later stage, existing clients should handle this in a way such as they just ignore the field.

Request-Headers

key

value example

comment

key

value example

comment

Authorization

Bearer "SECRET_WS_TOKEN"

See authentication on how to obtain a token

Content-Type

application/json



Request Body

Name

Type

Example

Mandatory

Description

Name

Type

Example

Mandatory

Description

identifier

string

(401)70712190172720651 / (00)370123460120012952

The identifier determines the parcel which should be activated. 

Identifier can be either a trackingReference or a shipmentId.

desiredDeliveryDate

string

20190612



Date format yyyyMMdd. Optional field.
If specified for return solutions this date represents the day when the carrier should pickup the package and should be earliest tomorrow. Normally the consignor / sender will be instructed to lay out the package the day before pickup.
The date will default to the first possible date if not specified, and can not exceed three months.

Response

Name

Type

Example

Description

Name

Type

Example

Description

parties

list of party objects



Note that the API could make minor changes to the returned consignee address.

properties

map of root properties



Map with additional properties. See root properties below.

Root properties

Name

Type

Example

Description

Name

Type

Example

Description

returnCode

string

R-1337

This can be placed on some shipping labels.

pickupDate

string

12.06.2019

Defines which date the customer should return the parcel.

placementCode

string

mailbox

Defines where the customer should place the parcel when ready for pickup.

Error response

Code

Action

Code

Action

409 - order.waiting.for.register.arrival

Activation done too soon after registration. Wait a couple of minutes and try again