DPD API Documentation v1 2 1
DPD API Documentation v1 2 1
documentation
v.1.2.1, March, 2023
1. Introduction .............................................................................................................................................. 3
2. Overview of the web service .................................................................................................................... 4
3. DPD services and service restrictions ..................................................................................................... 6
3.1. The main services .................................................................................................................................... 6
3.2. Additional services ................................................................................................................................... 8
4. Authorization management .................................................................................................................... 12
4.1. Token processing by GUI ...................................................................................................................... 12
4.2. Token processing by API request .......................................................................................................... 13
4.2.1. Authorization token creation .................................................................................................................. 13
4.2.2. Authorization token list retrieval ............................................................................................................. 14
4.2.3. Authorization token deletion .................................................................................................................. 15
5. Shipment sending process .................................................................................................................... 16
5.1. Shipment creation .................................................................................................................................. 16
5.2. Label creation ........................................................................................................................................ 24
5.3. Courier request ...................................................................................................................................... 26
6. Parcel tracking ....................................................................................................................................... 29
6.1. On demand ............................................................................................................................................ 29
6.1.1. Details array for basic data (detail: 0) .................................................................................................... 30
6.1.2. Parcel status messages ......................................................................................................................... 31
6.1.3. Details array for advanced data (detail: 3) ............................................................................................. 31
6.1.4. Status codes / service codes ................................................................................................................. 32
6.1.5. Additional codes .................................................................................................................................... 35
6.2. Call-back request ................................................................................................................................... 36
7. Additional functionality ........................................................................................................................... 37
7.1. Service list retrieval ................................................................................................................................ 37
7.2. Pickup point list retrieval ........................................................................................................................ 39
7.3. Payer list retrieval .................................................................................................................................. 43
7.4. Shipment list retrieval ............................................................................................................................ 44
7.5. Shipment deletion .................................................................................................................................. 46
7.6. Courier request time frame retrieval ...................................................................................................... 47
8. Pricing / invoicing ................................................................................................................................... 49
9. Frequently asked questions (FAQ) ........................................................................................................ 49
10. Response errors .................................................................................................................................... 51
10.1. Knowledge base .................................................................................................................................... 51
11. Contact information ................................................................................................................................ 52
12. Examples ............................................................................................................................................... 53
12.1. DPD Classic shipment creation request ................................................................................................ 53
12.2. B2C + COD shipment creation request (incl. label request).................................................................. 54
12.3. B2C + Evening shipment creation request ............................................................................................ 55
12.4. PDF A4 label creation request ............................................................................................................... 56
12.5. Courier request ...................................................................................................................................... 56
2
1. Introduction
API is a REST-based solution that is a part of DPD labelling system and can be used to automate
processes of the DPD web portals (esiunta.dpd.lt, eserviss.dpd.lv, telli.dpd.ee):
For easier understanding of the documentation, we have divided the methods into 3 parts:
• Authorization management (Chapter 4) will contain all the methods needed for managing
authorization tokens.
As the knowledge of tokens will be needed further, please read this chapter first.
• Shipment sending (Chapter 5) will contain commonly used methods for creating and sending
shipments.
Please take into account that shipment creation depends on the service type you’re planning
to use, therefore we have added short service and additional service descriptions in
Chapter 3. On the right side of each service, we have listed request blocks that shall be used
for a specific service.
• Additional functionality (Chapter 6) – here you will find methods that support the main
functionality of the API (such as retrieving Pickup point list). The methods are intended for
closer integration into the DPD system.
There are multiple options on how the API methods can be used, hence in the Chapter 9 “Frequently
asked questions (FAQ)” we have listed some of the ideas that may be useful to read before starting an
integration.
3
To keep continuity and track changes the documentation has version number assigned. The number
is built according to the following principles: x1.x2.x3
• LT: https://esiunta.dpd.lt/api
• LV: https://eserviss.dpd.lv/api
• EE: https://telli.dpd.ee/api
• Standard HTTP response codes are returned in response, matching the type of response.
Response HTTP code contains information about the request status:
▪ 200 – Request has been processed correctly
▪ 201 – Request has been processed correctly
▪ 204 – Request has been processed correctly, there will be no data in response body
▪ 206 – Request has been processed partially, response body should be checked
▪ 400 – Request has not been processed (bad request), request data should be
checked
▪ 401 – Request has not been processed (unauthorized), authorization token should be
checked!
▪ 403 – Request has not been processed (forbidden)
▪ 404 – Request has not been processed (not found)
▪ 422 – Request has not been processed (unprocessable entity)
▪ 429 – Request has not been processed (too many requests)
• All methods (except authorisation token generation method) must contain bearer
authentication key that can be requested from the system (chapter Error! Reference source n
ot found.).
4
• HTTP verbs are used to denote the type of operations:
▪ search (GET)
▪ create (POST)
▪ delete (DELETE)
• Parameters must be provided based on HTTP method:
▪ GET: Parameters must be provided within URL as standard GET
parameter (http://site.name?parameter=value)
▪ DELETE: Parameters must be provided within URL as part of it
(http://site.name/value)
▪ POST: Parameters must be provided within request body as JSON data entity in a
structure and format defined by API. The API uses JSON bodies.
Environments:
Once your contract is signed, you will need to register in the specific environment. When this is done,
please contact DPD support, who will assign the contract to your profile. From the moment the contract is
assigned, you will be able to use API according to your agreement. As soon as this is done, you’re ready to go!
5
3. DPD services and service restrictions
DPD separates all the services into two groups: main services and additional services. Main services
define shipment specifics and principles of the delivery process. Additional services provide additional
functionality/service to the specific main service (it can change some parts of the main service process).
There can be some shipment packaging and labelling regulations related to specific main and/or
additional services, therefore packaging and labelling guide should be read before shipment creation.
6
EE: For shipments to Greece DPD Classic should be
used instead of DPD Private service.
7
Collection from Greece is not provided. Pallets can only
be collected from Latvia, Lithuania, Estonia, Poland, Denmark,
Finland and Sweden.
8
recipient and the return of the relevant copies of a document • Additional service block
(delivery note, contract, passport copy) to the sender according
9
To get more information please check your local DPD
website or contact the local DPD sales department.
10
DPD Pickup return In addition to main service blocks,
these additional blocks are
Identical to DPD Pickup return main service. In case if
needed:
this additional service will be required instead of the main service,
there will be return labels generated together with the main • Return block
service labels. • Additional service block
11
4. Authorization management
Every API request will need to have a bearer token in the Header for user authorization. An
unauthorized request won’t be processed.
Please keep your tokens secure. Any action done by a specific token will be treated as an action by
that specific user. In case of created and sent shipments, these shipments will be invoiced to that specific
customer.
Here you will find information about the main functions that will allow you to manage your tokens.
Each user can have up to 100 tokens! Inactive tokens must be deleted!
12
4.2. Token processing by API request
4.2.1. Authorization token creation
This method generates an authorization token that can be used for any of the web service methods.
Method: /auth/tokens
Type: POST
Headers Authorization: Basic auth (by providing DPD system username and password)
Request:
Response:
13
4.2.2. Authorization token list retrieval
This method provides a list of all active authorization tokens. To retrieve the list, there must be a valid
token provided in the header bearer authentication.
If a token has been forgotten, the token value cannot be retrieved. The new token must be generated
instead and the previous existing token must be deleted.
Method: /auth/token-secrets
Type: GET
Request:
No parameter is needed
Response:
14
4.2.3. Authorization token deletion
To retrieve the list, there must be a valid token provided in the header bearer authentication. Please
be aware that there is an option to delete a specific token by using the same token. In such case, it will be deleted
and there won’t be an option to use it again.
Method: /auth/token-secrets
Type: DELETE
Request:
Response:
15
5. Shipment sending process
This method creates a shipment that can contain one or multiple parcels.
The data that is needed for creating shipments will depend on the DPD service that is requested.
Method: /shipments
Type: POST
Request
Every request can contain up to 50 shipment blocks, every shipment block must contain data blocks
according to the mandatory blocks of the required service (chapter 3). Additional data block can be used
according to specifics of the exact block.
16
Request - Payer code
It allows a user to create a shipment on behalf of another user (only if the correct permissions have been
granted)
Based on the sender’s address, there are 2 options how this block should be filled in (in case if both options
will be used together – pudoId parameter will be submitted, request will be treated as shipment from Pickup
point):
Use if sender’s address is available or if a parcel cannot be returned to a Pickup point in case of failed delivery
(for example – because of the parcel size):
17
Sender’s postal code.
postalCode string 7 M
Without the country code and spaces.
Sender’s country.
country string 3 M ISO 3166-1 alpha-2 country codes format, e.g. LT, LV,
EE.
Use in case there is no sender address available and shipment must be returned to a Pickup point in case of a
failed delivery:
There are 2 options how this block should be filled in based on the service selected - how the parcel will be
delivered (in case if both options will be used together – pudoId parameter will be submitted, request will be
treated as shipment to Pickup point):
18
recommend providing it as it can increase delivery’s
quality.
Only one email address on this parameter.
Recipient’s phone number that will be displayed on a
label.
Only one phone number on this parameter. No other
information should be provided here!
phone string 30 M
There must be an international country code provided,
e.g. “+372555555”, “+37065123456”.
If there is no country code, it will be added
automatically based on the country parameter.
Recipient’s address.
In case it is not possible to separate, this can contain
street string 35 M
street name + property number or street name +
property number + flat number.
Recipient’s property number.
streetNo string O In case it is not possible to separate, this can contain
property number + flat number.
8 Recipient’s flat number.
If both parameters (streetNo and flatNo) are provided,
flatNo string O
max length (both parameter character sum) is reduced
to 7
Recipient’s postcode.
postalCode string 7 M
Without the country code and spaces.
Recipient’s country.
country string 3 M ISO 3166-1 alpha-2 country codes format, e.g. LT, LV,
EE.
19
This can be obtained by Pickup point search
method - Chapter 7.2.
This block is mandatory only for additional services SWAP and DPD Pickup return.
If return address is identical to sender address, please use sender block data to fill return block.
Parameters within this block must be filled in according to the services available for a specific user (chapter
7.1)
Parameters within this block must be filled in according to the services available for a specific user (chapter
7.1)
20
Accordingly, to service list response (chapter 7.1),
specific additional service parameters must be used
here. Parameter name that should be used in this
array is defined in specialFields name value,
information what should be listed within specific
fields array parameter – specialFields description. Note that other
specialFields parameter (mandatory, type,
possibleValues, validationType, validationRules) can
contain valuable information how specific parameter
should be provided as well as how it will be validated
by DPD.
There can be up to 50 blocks, every block must contain parameters for each parcel:
There can be up to 50 blocks, every block must contain parameters for each pallet:
Pallet type.
Values:
type string 3 M
• EUR
• FIN
Parcel (pallet) references.
mpsReferences array 4 O
Up to 4 (four) references (string, 35).
It allows to set shipment-based references that can be used for specific reports. If parcel/pallet-based
reference is needed, parcels/pallets block mpsReference should be used instead.
21
Name Type Length Req. Description
This block is mandatory only for main service Collection request or additional service Courier brings label.
It will provide information to DPD when courier should arrive to pick up parcels at sender’s address.
22
Request – Additional functionality block
Response
Shipment identifier
id string 36 this identifier will be needed for any other action with the
shipment.
A list of parcel identifiers (string, 14)
Empty by default. Parcel identifiers will be provided if the
parcelNumbers array 100
parcel label is requested in combination with the shipment
creation (Chapter 9).
payer object:
If the generatesDplPin is set to “true”, there will be dplPin parameter in the response that will contain a set of
arrays for each parcel:
23
Name Type Length Description
DPL service is only available in Baltics. DPL and related PIN code won’t work in locker of
any other country!
There will also be a full list of request parameters added to the response. This can be used for
response data validation regarding the requested data.
Parcel/pallet block can contain an additional parameter parcelNumber (integer, 14), that will indicate
which references and weight data is assigned to the specific parcel identifier. This parameter will be provided
in case the label or invoice is generated.
This method generates labels for shipments/parcels that were created either by a user or a user that
is granted permissions to access specific shipments/parcels.
Method: /shipments/labels
Type: POST
Request
24
Starting positions of the first DPD label on an A4 page.
Values:
• 0 – starts on top left corner
offsetPosition integer 1 O • 1 – starts on top right corner
• 2 – starts on bottom left corner
• 3 – starts on bottom right corner
For A6 page size, this value can only be 0.
True/false parameter that indicates if the response
true/fal
downloadLabel boolean M should contain a label file
se
In case of false, 204 header response will be returned.
True/false parameter that indicates if DPD should send
a label to a sender’s email address.
If shipment creation request parameter
true/fal
emailLabel boolean O generatesDplPin was set as “true”, email will contain
se
digital label PIN code and additional attachment of
digital label QR code as PNG file.
Default value: false
Requested file format.
Values:
labelFormat string 15 O
• application/pdf (default, PDF file)
• image/png (PNG file)
Paper size.
Values:
paperSize string 2 O
• A4 (default)
• A6
Response
shipmentIds array 50 List of shipment identifiers (string, 36) that was processed.
parcelNumbers array - List of parcel numbers (string, 14) that were processed.
In case of the A4 page document, labels’ sequence on the page is as follows: top left, top right, bottom
left, bottom right.
25
5.3. Courier request
This method submits a courier request to inform DPD that a courier pickup (arrival) is needed from a
specific address during a specific time frame. Please keep in mind that there can be specific courier request
conditions for each country, as well as different conditions within one country (based on the geographical location
– postal code). Parameters like:
• the pickup date (until which time it’s possible to request a courier for the same day arrival),
• pickup starting time (from what time is the shipment ready for pickup),
• pickup final time (the last time until which the courier can arrive),
• minimal interval between starting time and final time,
• interval from request submission time until the starting time
These parameters are described in DPD service use terms and conditions and are subject to change
(changes can be affected by regular processes like peak periods, as well as by unpredictable processes like
pandemics).
Method: /pickups
Type: POST
Request
26
Shipment identifier (string, 36) about shipments that
must be picked up.
shipmentUuids array -
Either shipmentUuids or parcel and/ or pallets
parameters can be used at a time.
Information about parcels that must be picked up.
M
parcel block 1 Either shipmentUuids or parcel and/ or pallets
parameters can be used at a time.
Information about pallets that must be picked up.
pallets block 50 Either shipmentUuids or parcel and/ or pallets
parameters can be used at a time.
address block:
Pickup postcode.
postalCode string 9 M
Without the country code and spaces.
Pickup country.
country string 2 M ISO 3166-1 alpha-2 country codes format, e.g. LT, LV,
EE.
parcel block:
27
pallets – block must contain array of parameters for each pallet:
Response
messageToCourier string 250 Additional information for pickup according to the request
28
6. Parcel tracking
There are 2 options to retrieve parcel delivery statuses. It is possible to retrieve statuses for specific
parcels on demand or you can use call-back (DPD system would send data to specific endpoint in case of any
new parcel delivery status).
• Only statuses for shipments with Baltic parcel numbers created by specific user are
available.
• Data is available for the period of last two months.
• When multiple parcel numbers are returned, results are returned in order passed.
• Statuses for each parcel are returned in descending order (newest first).
6.1. On demand
This method provides information regarding parcel statuses. You can have up to 30 parcels checked
per request. In case if more parcels need to be checked, there should be multiple requests made where none of
those contains more than 30 parcels.
Additionally – there is no need to request all events (show_all=1) every time. Scheduled task (CRON)
can request only the latest event (show_all=0), but in case if You want to use the data for internal reports, you
can request all events only once at the end of the life cycle (when parcel is delivered).
Method: /status/tracking
Type: GET
Request
29
Number of statuses for each parcel.
Values:
show_all Char 1 O
• 0 – return only latest parcel status (default)
• 1 – return all parcel statuses
Language for status in case if detail value “0”.
Values:
• en – English (default)
lang Varchar 2 O
• lt – Lithuanian
• lv – Latvian
• ee – Estonian
Response
error array:
30
6.1.2. Parcel status messages
Saajale kohale
Delivered to Consignee Paka piegādāta klientam Pristatyta gavėjui
toimetatud
Delivered to Pickup Paka piegādāta Pickup Pristatyta į siuntų Toimetatud Pickup
Point punktā tašką/terminalą punkti
Picked up by Consignee Klients saņēmis paku Gavėjas atsiėmė siuntą Saaja poolt Pickup
from Pickup point Pickup punktā iš siuntų taško/terminalo punktist välja võetud
Paka tiks atgriezta
Returning to Sender Grąžinama siuntėjui Tagastamisel saatjale
nosūtītājam
Paka ir atgriezta
Returned to Sender Grąžinta siuntėjui Tagastatud saatjale
nosūtītājam
31
Aproximate delivery time (HHmm-HHmm)
Value might be provided for events where statusCode is 03
TimeFrame string 9
and it indicates approximate delivery time.
Example: 1127-1257
Additional information about the event (chapter 0)
AddCode string Up to 11
Multiple additional codes are separated by comma.
Parcel weight fixed by DPD (kilograms).
Weight float (6,2) Value might be provided for events where statusCode is 05
or 10.
StatusCode is used for internal DPD processes to identify parcel life cycle status. As from parcel life
cycle perspective delivery event finalizes parcel life cycle, there is identical status code for cases when parcel
was delivered to consignee or when it was delivered back to sender. Therefore, to understand the correct status
of the parcel, there is a need to use multiple parameters - combinations of statusCode and serviceCode allows
You to get correct information:
serviceCode prevStat
statusCode usCode Parcel location Description
(at least one)
Parcel is processed (consolidated) in DPD
01 In terminal
terminal.
32
Parcel was stopped in terminal. Additional
08 In terminal
action/information is needed.
Parcel was processed for re-delivery,
09 In terminal returning to sender or transferring to
another terminal.
Parcel is in sorting process for delivery to
10 In terminal
next DPD terminal.
Delivered
13 Parcel is delivered to consignee.
At the consignee
298, 299, 300, Delivered
13 Parcel is returned to sender.
301, 332 At the sender
33
This is how approximately delivery process looks like:
34
6.1.5. Additional codes
Additional codes can be used to get more information about the specific event – for example – reason
why parcel was not delivered to consignee. We have tried to describe some of additional codes and:
11, 12, 14, 15, 16, 22, 24, 25, 29, 30, 32, 33, 37, 41, 42, Additional information is needed from sender to
46, 47, 49, 50, 61, 62, 66, 72, 73, 84, 85, 94, 95, 96 proceed with delivery.
There can be combinations of these events – for example: in case of value 12, DPD could contact
sender to recheck if the damaged parcel should be delivered to consignee.
The rest of codes are used for DPD internal processes and there is no need to process those.
35
6.2. Call-back request
This method allows to retrieve information to specific endpoint as soon as any changes happens to
specific parcel with 2 month period. After 2 months specific subscription is automatically suspended.
Unsubsription is not required and can be used only in specific cases.
Type: GET
Request
Parcel number.
parcelnumber string 14 M Note! Parcel number consists of 14 numeric
characters.
URL where data must be submitted whenever there is
any new status for the parcel.
Note.URL needs to be URL-encoded before passing to
this request. For example, “http://somesite.com” must
callbackurl string 255 M be provided as “https%3A%2F%2Fround-lake.dustinice.workers.dev%3A443%2Fhttp%2Fsomesite.com”
Response
HTTP 400 status code in case if there is an existing subscription on specific combination.
Call-back request
Type: POST
Once the call-back URL is invoked a POST request is sent to specific URL every time parcel status
changes. Information about the parcel and the new status will be provided within BODY of the request as JSON
accordingly to tracking (chapter 6.1 and chapter 6.1.1) request where pknr is the parcel ID that was registered,
detail=0, show_all=0 and lang=en (these values are not configurable).
36
7. Additional functionality
Additional functions list consists of methods that either are needed in certain situations, or will help you
to manage information within the DPD system.
This method will return a list of DPD services that can be used by a specific user.
Method: /services
Type: GET
Request
Sender's country.
countryFrom String 2 M ISO 3166-1 alpha-2 country codes format, e.g. LT, LV,
EE.
Sender's postcode.
postalCodeFrom String 7 O
Without the country code and spaces.
Recipient’s country.
countryTo String 2 M ISO 3166-1 alpha-2 country codes format, e.g. LT, LV,
EE.
Recipient’s postcode.
postalCodeTo String 7 O
Without the country code and spaces.
An additional DPD service classifier that identifies the
receiver type.
Can be one of these options:
• Business
serviceType Enum 1 O
• Private
• Pudo
• Collection Request
• Return through Pudo
mainServiceName String 120 O Name of the DPD main service that is searched
37
Response
additionalServices array:
38
This parameter by default will be 0. It is used only for
price float (5,2) specific cases when suggested by DPD. For pricing
calculation purposes please read chapter 9.
Additional information about the service
message blob -
Line breaks and backslashes are escaped.
This parameter can be ignored for additional services (it
additionalServices - - will be always empty).
Only main services will contain special fields.
True/false parameter that indicates if there are
geographical restrictions for a specific service.
additionalRestrictions
boolean true/false For example – it will be true if the request is done for a
Apply
domestic shipment, while the service is only available for
a delivery to a specific zip code.
specialFields array:
description string 1000 Information about the purpose of the specific parameter.
This method returns a list of DPD Pickup points that are needed for creating shipments from/to specific
pickup points.
In case of multiple parameters used in one request, only those Pickup points that consist of all the
parameters will be provided. There will be blank response if no Pickup point matches all the parameters.
39
Method: /lockers
Type: GET
Request
Country code.
countryCode string 2 M ISO 3166-1 alpha-2 country codes format, e.g. LT, LV,
EE.
40
• air
• walking
• driving
If this combination used, response will contain list of
pickup points ordered ascending by distance from GPS
coordinates or address to specific pickup point.
In case if GPS coordinates and address will be
provided, only address will be used.
Without radius this option won’t provide nearest pickup
points.
Response
41
• PickupStation
• ParcelShop
address block:
hours block:
42
Thursday block 2 Array of working hours on Thursday.
Method: /customers/payers
Type: GET
Request:
No parameter is needed
Response:
Each block:
43
code integer 7 DPD customer ID that will be invoiced.
This method provides a list of all shipments created or accessible (if user has permissions to access
other user shipments) by specific user.
Method: /shipments
Type: GET
Request:
44
referenceNumber string 35 O One of shipment references.
Shipment type.
Values:
direction string 30 O
• domestic
• international
Shipments created since date
creationDateFrom date 10 O (YYYY-MM-DD).
Default value: 30 days before request date
Response:
45
Shipment’s status.
Values:
• pending – shipment created
• not_printed – label not printed
• not_booked – currier not ordered
• in_route – shipment in delivery
• delivered – shipment delivered
• returned – shipment returned to sender
status string 20 • rdl_in_route – return digital label service
shipments that are on the way to be returned to
sender
• rdl_delivered – return digital label service
shipments that are delivered back to sender
If shipment consist of multiple parcels, there will be latest
parcel life cycle status, therefore these statuses are
recommended to use in case of one parcel per shipment.
Please note that as soon as DPD parcel ID is assigned to shipment, this creates a possibility for a
customer to send the parcel even if it was previously removed from a shipments list, therefore shipment will not
be deleted (it will be just removed from list to ease up customer processes), but data will be processed by DPD
according to privacy policy as for any regular shipment.
If a shipment consists of multiple parcels, all parcels will be deleted together when shipment is deleted
or - when one of shipment’s parcels is deleted.
Method: /shipments
Type: DELETE
Request:
Response:
46
7.6. Courier request time frame retrieval
This method will provide possible time frames for courier request (chapter 0). There is no need to use
this method every time before requesting courier. If there is a need for irregular courier requests this method can
be requested once per day to save request time frames for following days.
Method: /pickup-timeframes
Type: GET
Request:
Response:
timeFrames block - List of available pickup dates within the requested range.
timeFrames block:
47
timeFramesDTO block:
48
8. Pricing / invoicing
Pricing for contracted customers is done according to an agreement conditions for the parcels that
were shipped. If a shipment was created, label was printed, but parcels were not provided to DPD, shipment
won’t be invoiced.
As there can be multiple agreement conditions that can affect pricing, DPD do not provide web service
that could provide exact price for specific parcel. If there is a need to reinvoice 3rd party or require pre-payment
from 3rd party for delivery services, a shipping price list can be designed according to specifics of a customer
business model.
There is an option to request a parcel label within the shipment creation request. To do that an object
labelOptions must be provided on shipment creation request (chapter 5.1). This array must contain the label
creation parameters (chapter 5.2).
This will create a new block in shipment creation response named shipmentLabels that will contain the
label data (chapter 5.2)
There are methods that require payerId value. How to obtain it? Every DPD client has a unique
identifier assigned. This identifier is listed in the agreement and can also be obtained via API (chapter 7.3) or by
contacting DPD support.
Permissions can be managed in the DPD system under User management menu by the user who has
permissions of an account’s admin.
As DPD does not change the Pickup list very often, there’s no need to load the Pickup list more than
once per day (chapter 7.2)
49
How can I help identify the root cause for any issue?
Please log all your API requests and responses. This information will be useful in case of any data
exchange issues. When contacting DPD support regarding the web service issues, this information would help
to identify the issue faster. Therefore, please make sure to include the following in the email:
• Full request that you sent (with URL and all parameters)
• Error message you’ve received in response
50
10. Response errors
Method: Endpoint must be taken from the error response type parameter.
Type: GET
Request:
No parameter is needed
Response:
51
11. Contact information
52
12. Examples
12.1. DPD Classic shipment creation request
[
{
"senderAddress": {
"name": "Test Sender",
"email": "[email protected]",
"phone": "+37112345678",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"receiverAddress": {
"name": "Test Receiver",
"email": "[email protected]",
"phone": "+37112345678",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"service": {
"serviceAlias": "DPD CLASSIC"
},
"parcels": [
{
"weight": 1.2,
"mpsReferences": ["Parcel reference 1","Parcel reference 2", "Parcel reference 3", "Parcel reference 4"]
},
{
"weight": 2.3
}
],
"pallets": [
{
"weight": 150,
"type": "EUR",
"mpsReferences": ["Pallet reference 1","Parcel reference 2"]
},
{
"weight": 250,
"type": "FIN",
"mpsReferences": ["Pallet reference 1"," Pallet reference 2", " Pallet reference 3", " Pallet reference 4"]
}
],
"shipmentReferences": ["Shipment reference 1","Shipment reference 2", "Shipment reference 3", "Shipment reference 4"]
}
]
53
12.2. B2C + COD shipment creation request (incl.
label request)
[
{
"senderAddress": {
"name": "Test Sender",
"email": "[email protected]",
"phone": "+37112345678",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"receiverAddress": {
"name": "Test Receiver",
"email": "[email protected]",
"phone": "+37112345678",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"service": {
"serviceAlias": "DPD B2C"
},
"additionalServices": [
{
"serviceAlias": "COD",
"fields": {
"cst_cod_value": "10",
"cst_cod_currency": "EUR",
"cst_cod_reference": "COD reference"
}
}
],
"parcels": [
{
"weight": 10,
"mpsReferences": ["Parcel reference 1"]
}
],
"shipmentReferences": ["Shipment reference 1"],
"labelOptions": {
"shipmentIds": [],
"offsetPosition": 0,
"downloadLabel": true,
"emailLabel": false,
"labelFormat": "image/png",
"paperSize": "A6"
}
}
]
54
12.3. B2C + Evening shipment creation request
[
{
"senderAddress": {
"name": "Test Sender",
"email": "[email protected]",
"phone": "+37112345678",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"receiverAddress": {
"name": "Test Receiver",
"email": "[email protected]",
"phone": "+37112345678",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"service": {
"serviceAlias": "DPD B2C"
},
"additionalServices": [
{
"serviceAlias": "Evening",
"fields": {
"cst_timeframe_service_timeframe_select": "18:00-22:00"
}
}
],
"parcels": [
{
"weight": 10,
"mpsReferences": ["Parcel reference 1"]
}
]
}
]
55
12.4. PDF A4 label creation request
{
"shipmentIds": ["e32496bd-7303-4751-954e-2f886a44bbe8"],
"parcelNumbers": [],
"offsetPosition": 0,
"downloadLabel": true,
"emailLabel": false,
"labelFormat": "application/pdf",
"paperSize": "A4"
}
{
"pickupDate": "2021-03-23",
"pickupTimeFrom": "12:00",
"pickupTimeTo": "17:00",
"address": {
"name": "Company",
"contactName": "John Doe",
"email": "[email protected]",
"phone": "+37122222222",
"street": "Uriekstes",
"streetNo": "8a",
"flatNo": null,
"city": "Rīga",
"postalCode": "1005",
"country": "LV"
},
"messageToCourier": "Office entrance must be used",
"parcel": {
"count": 2,
"weight": 2
},
"pallets": [
{
"weight": 300,
"type": "EUR",
"count": 2
}
]
}
56