-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparcel-de-shipping-v2_1.yaml
2268 lines (2251 loc) · 82.5 KB
/
parcel-de-shipping-v2_1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.1
info:
title: Parcel DE Shipping API (Post & Parcel Germany)
description: >
Note: This is the specification of the DPDHL Group Parcel DE Shipping API for Post & Parcel Germany. This REST web service allows business customers to create shipping labels on demand.
version: 2.1.10
servers:
- url: https://api-eu.dhl.com/parcel/de/shipping/v2
description: Productive Server
- url: https://api-sandbox.dhl.com/parcel/de/shipping/v2
description: Sandbox Server
tags:
- name: General
description: Get API version info
- name: Shipments and Labels
description: Order and retrieve shipment labels
- name: Manifests
description: Manifest shipments and retrieve daily manifest lists
paths:
/:
get:
tags:
- General
summary: Return API version
description: >
Returns the current version of the API as major.minor.patch. Furthermore, it will also return more details (semantic version number, revision, environment) of the API layer.
operationId: rootGet
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInformation'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
/labels:
get:
tags:
- Shipments and Labels
summary: Download PDF document
description: >
Public download URL for shipment labels and documents. The URL is provided in the response of the POST /orders or GET /orders resources. The document is identified via the token query parameter. There is no additional authorization, the resource URL can be shared. Please protect the URL as needed. The call returns a PDF label.
operationId: getLabel
parameters:
- name: token
in: query
description: Identifies PDF document and requested print settings for download.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/pdf:
schema:
$ref: '#/components/schemas/LabelDataResponse'
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'404':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
/manifests:
get:
tags:
- Manifests
summary: Retrieve daily manifest document
description: Return the manifest document for the specific date (abbreviated ISO8601 format YYYY-MM-DD). If no date is provided, the manifest for today will be returned. The manifest PDF document will list the shipments for your EKP, separated by billing numbers. Potentially, the document is large and response time will reflect this. <br />Additionally, the response contains a mapping of billing numbers to sheet numbers of the manifest and a mapping of shipment numbers to sheet numbers.<br />The call can be repeated as often as needed. Should a date be provided which is too old or lies within the future, HTTP 400 is returned.
operationId: getManifests
security:
- ApiKey: []
- BasicAuth: []
parameters:
- name: billingNumber
in: query
description: Customer billingNumber number.
required: false
schema:
type: string
- name: date
in: query
schema:
type: string
- name: includeDocs
in: query
description: |-
Legacy name **labelResponseType**. Shipping labels and further shipment documents can be:
* __include__: included as base64 encoded data in the response (default)
* __URL__: provided as URL reference.
Default is include the base64 encoded labels.
schema:
type: string
enum:
- include
- URL
default: include
- name: Accept-Language
in: header
description: Control the APIs response language via locale abbreviation. English (en-US) and german (de-DE) are supported. If not specified, the default is english.
schema:
type: string
example: de-DE
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SingleManifestResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/SingleManifestResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
post:
tags:
- Manifests
summary: Mark shipments as being ready for shipping
description: |-
Shipments are normally ''closed out'' at a fixed time of the day (such as 6 pm, configured by EKP/account) for the date provided as shipDate in the create call.
<br />This call allows forcing the closeout for sets of shipments earlier. This will also override the original shipDate. Afterwards, the shipment cannot be changed and the shipment labels cannot be queried anymore (however they may remain cached for limited duration).
Once a shipment has been closed, then calling closeout for the same shipment will result in a warning. The same warning will also be returned if the automatic closeout happened prior to the call. It is however possible to add new shipments, they will be manifested as well and be part of the day's manifest.
<br />Note on billing: The manifesting step has billing implications. Some products (Warenpost, Parcel International partially) are billed based on the shipment data available to DHL at the end of the day. All other products (including DHL Paket Standard) are billed based on production data. For more details, please contact your account representative.
#### Request
It's changing the status of the shipment, so parameters are provided in the body or as query parameter.
* ''profile'' attribute (request body parameter) - defines the user group profile. A user group is permitted to specific billing numbers. Shipments are only closed out if they belong to a billing number that the user group profile is entitled to use. This attribute is mandatory. Please use the standard user group profile ''STANDARD_GRUPPENPROFIL'' if no dedicated user group profile is available.
* ''billingNumber'' attribute (query parameter) - defines the billing number for which shipments shall be closed out. If a billing number is set, then only the shipments of that billing number are closed out. In that case no list of specific shipment numbers needs to be passed.
* ''shipmentNumbers'' attribute (request body parameter) - lists the specific shipping numbers of the shipments that shall be closed out.
If all shipments shall be closed, the query parameter ''all'' needs to be set to ''true''. In that case neither a billing number nor a list of shipment numbers need to be passed in the request.
#### Response
* Closing status for each shipment
operationId: manifestsPost
security:
- ApiKey: []
- BasicAuth: []
parameters:
- name: Accept-Language
in: header
description: Control the APIs response language via locale abbreviation. English (en-US) and german (de-DE) are supported. If not specified, the default is english.
schema:
type: string
example: de-DE
- name: all
in: query
description: Specify if all applicable shipments shall be marked as being ready for shipping.
schema:
type: boolean
default: false
requestBody:
description: Manifest request taking multiple input elements
content:
application/json:
schema:
$ref: '#/components/schemas/ShipmentManifestingRequest'
required: true
responses:
'207':
description: Response for manifesting request taking multiple input elements
content:
application/json:
schema:
$ref: '#/components/schemas/MultipleManifestResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/MultipleManifestResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
/orders:
get:
tags:
- Shipments and Labels
summary: Retrieve shipment documents - labels and customs documents
description: |-
Returns documents for existing shipment(s). The call accepts multiple shipment numbers and will provide sets of documents for those. The **format (PDF,ZPL)** and **method of delivery (URL, encoded, data)** can be selected for **all** shipments and labels in that call. You cannot chose one format and delivery method for one label and different for another label within the same call. You can also specify if you want regular labels, return labels, cod labels, or customsDoc. Any combination is possible.
The call returns for each shipment number the status indicator and the selected labels and documents. If a label type (for example a cod label) does not exist for a shipment, it will not be returned. This is not an error. If you were sending multiple shipments, you will get an HTTP 207 response (multistatus) with detailed status for each shipment. Other standard HTTP response codes (200, 400, 401, 429, 500) are possible as well. Labels can be either provided as part of the response (base64 encoded for PDF, text for ZPL) or via URL link for view and download (PDF). Note that the format settings per query parameters apply to the shipping label. Retoure label paper type can be specified separately since a different printer may be used here. If requesting labels to be returned as URL for separate download, the URLs provided can be shared.
operationId: getOrder
security:
- ApiKey: []
- BasicAuth: []
parameters:
- name: shipment
in: query
description: This parameter identifies shipments. The parameter can be used multiple times in one request to get the labels and/or documents for up to 30 shipments maximum. Only documents and label for shipments that are not yet closed can be retrieved.
required: true
schema:
type: array
items:
type: string
- name: Accept-Language
in: header
description: Control the APIs response language via locale abbreviation. English (en-US) and german (de-DE) are supported. If not specified, the default is english.
schema:
type: string
example: de-DE
- name: docFormat
in: query
description: '**Defines** the **printable** document format to be used for label and manifest documents.'
schema:
type: string
enum:
- ZPL2
- PDF
default: PDF
- name: printFormat
in: query
description: "**Defines** the print medium for the shipping label. The different option vary from standard papersizes DIN A4 and DIN A5 to specific label print formats.\_\n\nSpecific laser print formats using DIN A5 blanks are:\n\n* 910-300-600(-oz) (105 x 205mm)\n* 910-300-300(-oz) (105 x 148mm)\n\nSpecific laser print formats **not** using a DIN A5 blank:\n\n* 910-300-610 (105 x 208mm)\n* 100x70mm\n\nSpecific thermal print formats:\n\n* 910-300-600 (103 x 199mm)\n* 910-300-400 (103 x 150mm)\n* 100x70mm\n\nPlease use the different formats as follows. If you do not set the parameter the settings of DHL costumer portal account will be used as default."
schema:
type: string
enum:
- A4
- 910-300-600
- 910-300-610
- 910-300-700
- 910-300-700-oz
- 910-300-710
- 910-300-300
- 910-300-300-oz
- 910-300-400
- 910-300-410
- 100x70mm
- name: retourePrintFormat
in: query
description: "**Defines** the print medium for the return shipping label. This parameter is only usable, if you do not use **combined printing**. The different option vary from standard papersizes DIN A4 and DIN A5 to specific label print formats.\_\n\nSpecific laser print formats using DIN A5 blanks are:\n\n* 910-300-600(-oz) (105 x 205mm)\n* 910-300-300(-oz) (105 x 148mm)\n\nSpecific laser print formats **not** using a DIN A5 blank:\n\n* 910-300-610 (105 x 208mm)\n* 100x70mm\n\nSpecific thermal print formats:\n\n* 910-300-600 (103 x 199mm)\n* 910-300-400 (103 x 150mm)\n* 100x70mm\n\nPlease use the different formats as follows. If you do not set the parameter the settings of DHL costumer portal account will be used as default."
schema:
type: string
enum:
- A4
- 910-300-600
- 910-300-610
- 910-300-700
- 910-300-700-oz
- 910-300-710
- 910-300-300
- 910-300-300-oz
- 910-300-400
- 910-300-410
- 100x70mm
- name: includeDocs
in: query
description: |-
Legacy name **labelResponseType**. Shipping labels and further shipment documents can be:
* __include__: included as base64 encoded data in the response (default)
* __URL__: provided as URL reference.
Default is include the base64 encoded labels.
schema:
type: string
enum:
- include
- URL
default: include
- name: combine
in: query
description: If set, label and return label for one shipment will be printed as single PDF document with possibly multiple pages. Else, those two labels come as separate documents. The option does not affect customs documents and COD labels.
schema:
type: boolean
default: true
responses:
'200':
description: Success response for requests with a single shipment.
content:
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'207':
description: Response for requests taking multiple input elements
content:
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
post:
tags:
- Shipments and Labels
summary: 'Create one or more shipments and their documents. (This is the primary call of the API.)'
description: |-
This request is used to create one or more shipments and return corresponding shipment tracking numbers, labels, and documentation. Up to 30 shipments can be created in a single call.
#### Request
The selected products and corresponding billing numbers, as well as the desired services and package details are required to create a shipment. Each shipment can have a dedicated shipper address. The example request body contains sample values for most services.
#### Response
The request will return shipment tracking numbers and the applicable labels for each shipment. If multiple shipments have been included, an HTTP 207 response (multistatus) is returned and holds detailed status for each shipment. Other standard HTTP response codes (401, 500, 400, 200, 429) are possible, too. Labels can be either provided as part of the response (base64 encoded for PDF, text for ZPL) or via URL link for view and download. Note that the format settings per query parameters apply to the shipping label. It may also apply to other labels included, depending on the configuration of your account. Label paper for return shipments can be specified separately since a different printer may be used here. If requesting labels to be provided as URL for separate download, the URLs can be shared.
#### Validation
It is recommended to validate the request first prior to shipment creation by setting the `validate` query parameter to `true`. Especially, during development and test, it is recommended to perform this validation. This functionality supports both
* JSON schema validation (against this API description). During development and test, it is recommended to do this validation. JSON schema is available for local validation
* Dry run against the DHL backend
If this succeeds, actual shipment creation will also succeed.
operationId: createOrders
security:
- ApiKey: []
- BasicAuth: []
parameters:
- name: Accept-Language
in: header
description: Control the APIs response language via locale abbreviation. English (en-US) and german (de-DE) are supported. If not specified, the default is english.
schema:
type: string
example: de-DE
- name: validate
in: query
description: |-
If provided and set to `true`, the input document will be:
* validated against JSON schema (/orders/ endpoint) at the API layer. In case of errors, HTTP 400 and details will be returned.
* validated against the DHL backend.
In that case, no state changes are happening, no data is stored, shipments neither deleted nor created, no labels being returned. The call will return a status (200, 400) for each shipment element.
schema:
type: boolean
default: false
- name: mustEncode
in: query
description: Legacy name **printOnlyIfCodable**. If set to *true*, labels will only be created if an address is encodable. This is only relevant for German consignee addresses. If set to false or left out, addresses, that are not encodable will be printed even though you receive a warning.
schema:
type: boolean
default: false
- name: includeDocs
in: query
description: |-
Legacy name **labelResponseType**. Shipping labels and further shipment documents can be:
* __include__: included as base64 encoded data in the response (default)
* __URL__: provided as URL reference.
schema:
type: string
enum:
- include
- URL
default: include
- name: docFormat
in: query
description: |-
**Defines** the **printable** document format to be used for label and manifest documents.
schema:
type: string
enum:
- ZPL2
- PDF
default: PDF
- name: printFormat
in: query
description: |-
**Defines** the print medium for the shipping label. The different option vary from standard paper sizes DIN A4 and DIN A5 to specific label print formats.
Specific laser print formats using DIN A5 blanks are:
* 910-300-600(-oz) (105 x 205mm)
* 910-300-300(-oz) (105 x 148mm)
Specific laser print formats **not** using a DIN A5 blank:
* 910-300-610 (105 x 208mm)
* 100x70mm
Specific thermal print formats:
* 910-300-600 (103 x 199mm)
* 910-300-400 (103 x 150mm)
* 100x70mm
Please use the different formats as follows. If you do not set the parameter the settings of DHL costumer portal account will be used as default.
schema:
type: string
enum:
- A4
- 910-300-600
- 910-300-610
- 910-300-700
- 910-300-700-oz
- 910-300-710
- 910-300-300
- 910-300-300-oz
- 910-300-400
- 910-300-410
- 100x70mm
- name: retourePrintFormat
in: query
description: |-
**Defines** the print medium for the return shipping label. This parameter is only usable, if you do not use **combined printing**. The different option vary from standard paper sizes DIN A4 and DIN A5 to specific label print formats.
Specific laser print formats using DIN A5 blanks are:
* 910-300-600(-oz) (105 x 205mm)
* 910-300-300(-oz) (105 x 148mm)
Specific laser print formats **not** using a DIN A5 blank:
* 910-300-610 (105 x 208mm)
* 100x70mm
Specific thermal print formats:
* 910-300-600 (103 x 199mm)
* 910-300-400 (103 x 150mm)
* 100x70mm
Please use the different formats as follows. If you do not set the parameter the settings of DHL costumer portal account will be used as default.
schema:
type: string
enum:
- A4
- 910-300-600
- 910-300-610
- 910-300-700
- 910-300-700-oz
- 910-300-710
- 910-300-300
- 910-300-300-oz
- 910-300-400
- 910-300-410
- 100x70mm
- name: combine
in: query
description: If set, label and return label for one shipment will be printed as single PDF document with possibly multiple pages. Else, those two labels come as separate documents. The option does not affect customs documents and COD labels.
schema:
type: boolean
default: true
requestBody:
description: Shipment order request.
content:
application/json:
schema:
$ref: '#/components/schemas/ShipmentOrderRequest'
examples:
DHLPaket:
$ref: '#/components/examples/DHLPaket'
DHLPaketInternational:
$ref: '#/components/examples/DHLPaketInternational'
DHLPaketInternationalWithCustoms:
$ref: '#/components/examples/DHLPaketInternationalWithCustoms'
Warenpost:
$ref: '#/components/examples/Warenpost'
WarenpostInternationalWithCustoms:
$ref: '#/components/examples/WarenpostInternationalWithCustoms'
required: true
responses:
'200':
description: Success response for requests with a single shipment.
content:
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'207':
description: Response for requests taking multiple input elements
content:
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
delete:
tags:
- Shipments and Labels
summary: Delete one or more shipments
description: 'Delete one or more shipments created earlier. Deletion of shipments is only possible prior to them being manifested (closed out, ''Tagesabschluss''). The call will return HTTP 200 (single shipment) or 207 on success, with individual status elements for each shipment. Individual status elements are HTTP 200, 400. 400 will be returned when shipment does not exist (or was already deleted).'
operationId: ordersAccountDelete
security:
- ApiKey: []
- BasicAuth: []
parameters:
- name: Accept-Language
in: header
description: Control the APIs response language via locale abbreviation. English (en-US) and german (de-DE) are supported. If not specified, the default is english.
schema:
type: string
example: de-DE
- name: profile
in: query
required: true
description: 'Defines the user group profile. A user group is permitted to specific billing numbers. Shipments are only canceled if they belong to a billing number that the user group profile is entitled to use. This attribute is mandatory. Please use the standard user group profile ''STANDARD_GRUPPENPROFIL'' if no dedicated user group profile is available.'
schema:
type: string
example: 'STANDARD_GRUPPENPROFIL'
- name: shipment
required: true
in: query
description: Shipment number that shall be canceled. If multiple shipments shall be canceled, the parameter must be added multiple times. Up to 30 shipments can be canceled at once.
schema:
type: string
example: '123456789'
responses:
'200':
description: Response for requests with a single element
content:
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'207':
description: Response for requests taking multiple input elements
content:
application/json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
application/problem+json:
schema:
$ref: '#/components/schemas/LabelDataResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
components:
schemas:
ServiceInformation:
type: object
description: Response for the API version endpoint detailing version information.
properties:
amp:
type: object
properties:
name:
type: string
description: name of api
example: pp-parcel-shipping-native
env:
type: string
description: environment
example: sandbox
version:
type: string
description: version of api
example: v2.0.4
rev:
type: string
description: revision
example: 22
backend:
type: object
properties:
env:
type: string
description: environment
example: sandbox
version:
type: string
description: version of backend
example: v2.1.0
Document:
type: object
properties:
b64:
type: string
description: The Base64 encoded byte stream
zpl2:
type: string
description: The document in zpl encoding
url:
type: string
description: URL reference to download document
example: www.dhl.de/download/myobscurelink?label.png
fileFormat:
type: string
description: format of the encoded bytes
example: PDF
enum:
- ZPL2
- PDF
printFormat:
type: string
description: The print format used. Customs documents and cash on delivery documents can only be returned in format A4.
example: 910-300-700
enum:
- A4-PT
- A4
- 910-300-700
- 910-300-700-oZ/oz
- 910-300-300
- 910-300-300-oz
- 910-300-710
- 910-300-600/610
- 910-300-400/410
- 100x70mm
description: 'Encoded document. All types of labels and documents.'
RequestStatus:
type: object
description: General status description for the attached response or response item.
required:
- statusCode
- title
properties:
title:
type: string
example: ok
statusCode:
description: The status code of the response. Usually, but not necessarliy the HTTP status code. Same as attribut "status" but deprecated. Do not use. Will be removed in the next major version.
type: integer
format: int32
example: 200
status:
description: The status code of the response. Usually, but not necessarliy the HTTP status code.
type: integer
format: int32
example: 200
instance:
type: string
description: A URI reference that identifies the specific occurrence of the problem.
detail:
maxLength: 80
minLength: 0
type: string
example: The Webservice call ran successfully.
LabelDataResponse:
type: object
properties:
status:
$ref: '#/components/schemas/RequestStatus'
items:
type: array
description: If the request contains a multi element array (e.g. multiple shipments), then the order of the items in the response corresponds to the order of the items in the request. For consistency, if the request contains only one item then the response contains a single element array.
example:
- shipmentNo: 340434310428091700
routingCode: 40327653113+99000943058020
sstatus:
title: OK
status: 200
label:
url: https://api-dev.dhl.com/parcel/de/shipping/v1-feature-order-endpoint/labels?token=x5xzrHE7ctmqPqk33k%2BKkBwbvIfYP4elMQsBFM%2BJOdiT2bmoaXXzris%2Ftz9jBtdVFLY5cCENit0Jnd9aXuxoNEXhP9PQ8tAVdPeXD26RZ6JZqF5NCJlrihrAv1%2FAOzuDPqWJLRVaRq461BpT4bcbzChAAHVg%2FHUaQAkeIkaZ8NqfcxWEQzK1AYJWczpy6sv6
format: PDF
items:
$ref: '#/components/schemas/ResponseItem'
ResponseItem:
required:
- sstatus
type: object
properties:
shipmentNo:
maxLength: 50
minLength: 0
type: string
routingCode:
maxLength: 35
minLength: 0
type: string
description: Routing code of the consignee address
returnShipmentNo:
maxLength: 50
minLength: 0
type: string
sstatus:
$ref: '#/components/schemas/RequestStatus'
shipmentRefNo:
maxLength: 50
minLength: 6
type: string
label:
$ref: '#/components/schemas/Document'
returnLabel:
$ref: '#/components/schemas/Document'
customsDoc:
$ref: '#/components/schemas/Document'
codLabel:
$ref: '#/components/schemas/Document'
validationMessages:
type: array
description: Optional validation messages attached to the shipment.
items:
$ref: '#/components/schemas/ValidationMessageItem'
description: Response for a single shipment containing status, numbers and labels
example:
- shipmentNo: 340434310428091700
routingCode: 40327653113+99000943058020
sstatus:
title: OK
status: 200
label:
url: https://api-dev.dhl.com/parcel/de/shipping/v1-feature-order-endpoint/labels?token=x5xzrHE7ctmqPqk33k%2BKkBwbvIfYP4elMQsBFM%2BJOdiT2bmoaXXzris%2Ftz9jBtdVFLY5cCENit0Jnd9aXuxoNEXhP9PQ8tAVdPeXD26RZ6JZqF5NCJlrihrAv1%2FAOzuDPqWJLRVaRq461BpT4bcbzChAAHVg%2FHUaQAkeIkaZ8NqfcxWEQzK1AYJWczpy6sv6
format: PDF
ValidationMessageItem:
type: object
properties:
property:
type: string
description: The property that is affected by the validation message.
example: dimension.weight
validationMessage:
type: string
description: The validation message describing the error.
example: The weight is too high
validationState:
type: string
description: The validation state resulting from the error.
example: Error
description: Representation of a validation message of a shipment container containing the most important information.
GetManifestData:
type: object
properties:
b64:
type: array
description: The encoded byte stream
items:
type: string
description: The encoded byte stream
format: byte
zpl2:
type: string
description: The document in zpl encoding
url:
type: string
description: URL reference to download document
example: www.dhl.de/download/myobscurelink?label.png
fileFormat:
type: string
description: format of the encoded bytes
example: PDF
enum:
- ZPL2
- PDF
printFormat:
type: string
description: The print format used
example: 910-300-700
enum:
- A4-PT
- A4
- 910-300-700
- 910-300-700-oZ/oz
- 910-300-300
- 910-300-300-oz
- 910-300-710
- 910-300-600/610
- 910-300-400/410
- 100x70mm
SingleManifestResponse:
type: object
properties:
status:
$ref: '#/components/schemas/RequestStatus'
manifestDate:
type: string
manifest:
$ref: '#/components/schemas/GetManifestData'
MultipleManifestResponse:
type: object
properties:
status:
$ref: '#/components/schemas/RequestStatus'
items:
type: array
items:
$ref: '#/components/schemas/ShortResponseItem'
description: Response of the POST /manifests endpoint containing an overall request status and detailed shipment status.
ShortResponseItem:
required:
- sstatus
type: object
properties:
shipmentNo:
maxLength: 50
minLength: 0
type: string
example: '340434310428091700'
sstatus:
$ref: '#/components/schemas/RequestStatus'
description: Response for a single shipment element not containing labels.
ShipmentManifestingRequest:
required:
- profile
type: object
properties:
profile:
maxLength: 35
minLength: 0
type: string
shipmentNumbers:
maxItems: 30
minItems: 1
type: array
description: List of shipment IDs for manifesting.
items:
type: string
billingNumber:
type: string
description: Customer billingNumber number.
description: List of shipments which shall be manifested.
BankAccount:
required:
- accountHolder
- iban
type: object
properties:
accountHolder:
maxLength: 80
minLength: 0
type: string
example: John D. Rockefeller
bankName:
maxLength: 80
minLength: 0
type: string
example: The Iron Bank, Braavos
iban:
pattern: '[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}'
type: string
example: DE02100100100006820101
bic:
pattern: '[a-zA-Z0-9]{8,11}'
type: string
example: DEUTDEFFXXX
description: Bank account data used for CoD (Cash on Delivery).
Commodity:
required:
- itemDescription
- itemValue
- itemWeight
- packagedQuantity
type: object
properties:
itemDescription:
maxLength: 256
minLength: 1
type: string
example: T-Shirt Boys size 164 yellow
description: A text that describes the commodity item. Only the first 50 characters of the description text is printed on the customs declaration form CN23.
countryOfOrigin:
$ref: '#/components/schemas/Country'
hsCode:
maxLength: 11
minLength: 6
type: string
description: Harmonized System Code aka Customs tariff number.
example: '61099090'
packagedQuantity:
type: integer
description: How many items of that type are in the package
format: int32
example: 1
itemValue:
$ref: '#/components/schemas/Value'
itemWeight:
$ref: '#/components/schemas/Weight'
description: |-
Commodity line item (e.g. a t-shirt) for international shipments which require individual listing of goods. Each good must contain a description of the item, the amount of the item, the net weight of one single item and the value of one single item. If you ship 5 t-shirts, you need to include the weight and value of one single shirt. The correct final weight and value will be calculated automatically.
The HS Code and the country of origin are optional.
example:
- itemDescription: T-Shirt
hscode: '61099090'
countryOfOrigin: DE
packagedQuantity: 3
- itemDescription: Book
hscode: '49019900'
packagedQuantity: 1
Consignee:
type: object
description: Consignee address information. Either a doorstep address (contact address) including contact information or a droppoint address. One of packstation (parcel locker), or post office (postfiliale/retail shop).
oneOf:
- $ref: '#/components/schemas/ContactAddress'
- $ref: '#/components/schemas/Locker'
- $ref: '#/components/schemas/PostOffice'
- $ref: '#/components/schemas/POBox'
ContactAddress:
required:
- addressStreet
- city
- country
- name1
type: object
properties:
name1:
maxLength: 50
minLength: 1
type: string
description: Name1. Line 1 of name information
example: Blumen Krause
name2:
maxLength: 50
minLength: 1
type: string
description: An optional, additional line of name information
example: To the attention of Erna.
name3:
maxLength: 50
minLength: 1
type: string
description: An optional, additional line of name information
example: Backdrawer all the way back.
dispatchingInformation:
maxLength: 35
minLength: 1
type: string
description: An optional, additional line of address. It's only usable for a few countries, e.g. Belgium. It is positioned below name3 on the label.
example: PO Box, bpack 24/7
addressStreet:
maxLength: 50
minLength: 1
type: string
description: Line 1 of the street address. This is just the street name. Can also include house number.
example: Hauptstrasse
addressHouse:
maxLength: 10
minLength: 1
type: string
description: Line 1 of the street address. This is just the house number. Can be added to street name instead.
example: 1a
additionalAddressInformation1:
maxLength: 60
minLength: 1
type: string
description: Additional information that is positioned either behind or below addressStreet on the label. If it is printed and where exactly depends on the country.
example: 3. Etage
additionalAddressInformation2:
maxLength: 60
minLength: 1
type: string
description: Additional information that is positioned either behind or below addressStreet on the label. If it is printed and where exactly depends on the country.
example: Apartment 12
postalCode:
maxLength: 10
minLength: 3
pattern: ^[0-9A-Za-z]+([ -]?[0-9A-Za-z]+)*$
type: string
description: Mandatory for all countries but Ireland that use a postal code system.
example: '53113'
city:
maxLength: 40
minLength: 1
type: string
description: city
example: Berlin
state:
maxLength: 20
minLength: 1
type: string
description: State, province or territory. For the USA please use the official regional ISO-Codes, e.g. US-AL.
example: NRW
country:
$ref: '#/components/schemas/Country'
contactName:
maxLength: 80
minLength: 3
type: string
description: optional contact name. (this is not the primary name printed on label)
example: Konrad Kontaktmann
phone:
maxLength: 20
minLength: 1
type: string
description: Please note that, in accordance with Art. 4 No. 11 GDPR, you must obtain the recipient's consent to forward their phone number to Deutsche Post DHL Group. For shipments within Germany, the phone number cannot be transmitted. In some countries the provision of a telephone number and/or e-mail address is mandatory for a delivery to a droppoint. If your recipient has objected to the disclosure of their telephone number and/or e-mail address, the shipment can only be delivered in these countries using the service Premium.
example: +49 170 1234567
email:
maxLength: 80
minLength: 3
type: string
description: "Please note that, in accordance with Art. 4 No. 11 GDPR, you must obtain the recipient's consent to forward their e-mail address to Deutsche Post DHL Group.\_For shipments within Germany, the e-mail address is used to send a DHL Parcel Notification to the recipient. The e-mail address is not mandatory for shipments within Germany. In some countries the provision of a telephone number and/or e-mail address is mandatory for a delivery to a droppoint. If your recipient has objected to the disclosure of their telephone number and/or e-mail address, the shipment can only be delivered in these countries using the service Premium."
example: [email protected]
description: Combines name, address, contact information. The recommended way is to use the mandatory attribute addressStreet and submit the streetname and housenumber together – alternatively addressHouse + addressStreet can be used. For many international addresses there is no house number, please do not set a period or any other sign to indicate that the address does not have a housenumber.
CustomsDetails:
required:
- exportType
- postalCharges
- items
type: object