-
Notifications
You must be signed in to change notification settings - Fork 1
/
B2B-ZSKService-1.4.0.yaml
2322 lines (2137 loc) · 74.5 KB
/
B2B-ZSKService-1.4.0.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.3
info:
version: 1.4.0
title: B2B-ZSKService
servers:
- url: http://localhost:8080/restservices/ZSKService/v1
description: Development server
- url: https://b2b-test.postaonline.cz:444/restservices/ZSKService/v1
description: Testing server
- url: https://b2b.postaonline.cz:444/restservices/ZSKService/v1
description: Production server
tags:
- name: sendParcels
- name: parcelData
- name: parcelDataDetail
- name: letter
- name: location
paths:
/sendParcels:
post:
description: Post data of sended parcels.
Operation is used for send of parcels data to the processing. In case of successful process result, datas are atomatically obtainded to submitters post office. This accepted parcels are displayed on POL application website.
In case of unsuccessful proces with some data mistakes, all the parcels are refused/unaccepted.
Response of this operation is object AsncResponse with the uniqe ID (idTransaction), which is necessary for get the result of the processing. /
Operace slouží k předání dat k zásilkám do dalšího zpracování. V případě, že zpracování proběhlo úspěšně, jsou data automaticky
předána na podací poštu. Takto přijatá data k zásilkám je možno zobrazit prostřednictvím web aplikace POL. V případě, že
při zpracování byla zaznamenána chyba v datech, není do dalšího zpracování přijata ani jedna zásilka.
Výstupem této operace je objekt AsyncResponse, který obsahuje jednoznačné ID (idTransaction) potřebné pro zjištění výsledku zpracování
operace.
summary: Send Parcels.
tags:
- sendParcels
operationId: postSendParcels
security:
- Api-Token: []
HMAC_SHA256_Auth: []
Authorization-Timestamp: []
Authorization-content-SHA256: []
parameters:
- name: idContract
in: query
required: false
description: ID CCK of submitter. In case of non-completion, the submitter is the caller./ ID CČK složky podavatele. V případě nevyplnění, je podavatelem volající.
schema:
$ref: '#/components/schemas/IdContract'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SendParcelsRequest'
responses:
'202':
description: Accepted - ready for processing. / Přijato ke zpracování.
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
default:
$ref: '#/components/responses/defaultResponse'
/sendParcels/idTransaction/{idTransaction}:
get:
description: Get the result of processing the submitted sendParcels information./
Operace slouží ke zjištění výsledku zpracování dat předaných prostřednictvím sendParcels.
summary: Get result of sendParcesls
tags:
- sendParcels
operationId: getSendParcels
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
parameters:
- name: idTransaction
in: path
required: true
description: Transaction ID assigned by the B2B module (asynchronous call). / ID transakce přidělené modulem B2B (asynchronní volání).
schema:
$ref: '#/components/schemas/IdTransaction'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/ResultSendParcels'
'202':
description: Accepted - still being processed . / Stále ve zpracování.
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/sendParcels/stats:
get:
description: Get statistic informations about sendParcels datas. /
Operace slouží ke zjištění statistických informací o datech předaných prostřednictvím operace sendParcels.
summary: Get stats of sendParcesls
tags:
- sendParcels
operationId: getStatsSendParcels
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
parameters:
- name: idContract
in: query
required: false
description: ID CCK of submitter. In case of non-completion, the submitter is the caller./ ID CČK složky podavatele. V případě nevyplnění, je podavatelem volající.
schema:
$ref: '#/components/schemas/IdContract'
- name: dateFrom
in: query
required: true
description: Date from. / Datum od.
schema:
$ref: '#/components/schemas/DateType'
- name: dateTo
in: query
required: true
description: Date from. / Datum od.
schema:
$ref: '#/components/schemas/DateType'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/StatsSendParcelsResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/parcelStatus:
post:
description: Get informations about Parcel status. /
Operace slouží k získání seznamu stavů zásilek.
summary: Get status of Parcels
tags:
- parcelDataDetail
operationId: getParcelStatus
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
Authorization-content-SHA256: [ ]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelStatusRequest'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelStatusResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/parcelDataHistory/parcelID/{parcelID}:
get:
description: Get informations of parcel history. /
Získani historie zásilky.
summary: Get Parcel Data History.
tags:
- parcelDataDetail
operationId: getParcelDataHistory
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
parameters:
- name: parcelID
in: path
required: true
description: ID of parcel. / Čárový kód zásilky.
schema:
$ref: '#/components/schemas/ParcelCode'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelDataHistoryResult'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/parcelPrinting:
post:
description: Get informations for printing of Address labels. /
Operace slouží k získání adresních štítků.
summary: Get info of Address labels.
tags:
- parcelData
operationId: getParcelPrinting
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
Authorization-content-SHA256: [ ]
parameters:
- name: idContract
in: query
required: false
description: ID CCK of submitter. In case of non-completion, the submitter is the caller./ ID CČK složky podavatele. V případě nevyplnění, je podavatelem volající.
schema:
$ref: '#/components/schemas/IdContract'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelPrintingRequest'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelPrintingResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/letterWithCN22:
post:
description: Post data of sended parcels for OLZ. Asynchronous. /
Zajišťuje předání dat podaných zásilek pro OLZ. Asynchronní.
summary: Send Letter with CN22
tags:
- letter
operationId: postLetter
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
Authorization-content-SHA256: [ ]
parameters:
- name: idContract
in: query
required: false
description: ID CCK of submitter. In case of non-completion, the submitter is the caller./ ID CČK složky podavatele. V případě nevyplnění, je podavatelem volající.
schema:
$ref: '#/components/schemas/IdContract'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LetterRequest'
responses:
'202':
description: Accepted - ready for processing. /
Přijato ke zpracování.
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
default:
$ref: '#/components/responses/defaultResponse'
/letterWithCN22/idTransaction/{idTransaction}:
get:
description: Get the result of processing the submitted letterWithCN22 information. /
Operace slouží ke zjistění výsledku zpracování dat předaných prostřednictvim operace letterWithCN22.
summary: Get result of letterWithCN22
tags:
- letter
operationId: getLetter
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
parameters:
- name: idTransaction
in: path
required: true
description: Transaction ID assigned by the B2B module (asynchronous call). / ID transakce (pro asynchronní volání).
schema:
$ref: '#/components/schemas/IdTransaction'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/ResultLetter'
'202':
description: Accepted - still being processed . / Stále ve zpracování.
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/letterWithCN22Printing:
post:
description: Get informations for printing of LetterWithCN22. /
Operace slouží k získání dat pro tisk LetterWithCN22.
summary: Get info for printing of LetterWithCN22.
tags:
- letter
operationId: getLetterWithCN22Printing
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
Authorization-content-SHA256: [ ]
parameters:
- name: idContract
in: query
required: false
description: ID CCK of submitter. In case of non-completion, the submitter is the caller./ ID CČK složky podavatele. V případě nevyplnění, je podavatelem volající.
schema:
$ref: '#/components/schemas/IdContract'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LetterPrintingRequest'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/LetterPrintingResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/location/idContract/{idContract}:
get:
description: Get the list transmitter places, addresses, bank informations and contacts. /
Seznam podacích míst, adres, bankovních spojení a kontaktů.
summary: Get list of location
tags:
- location
operationId: getLocation
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
parameters:
- name: idContract
in: path
required: true
description: ID CCK of submitter. / ID CČK složky podavatele.
schema:
$ref: '#/components/schemas/IdContract'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/LocationList'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
delete:
description: Delete the transmitter place, address, bank informations and contatct. /
Zruší podací místo včetně adres, bankovních spojení a kontaktů.
summary: Delete the location
tags:
- location
operationId: deleteLocation
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
parameters:
- name: idContract
in: path
required: true
description: ID CCK of submitter. / ID CČK složky podavatele.
schema:
$ref: '#/components/schemas/IdContract'
- name: locationNumber
in: query
required: true
description: Number of transmitter place. / Číslo podacího místa.
schema:
$ref: '#/components/schemas/LocationNumber'
responses:
'204':
description: Successful call - deleted. / Úspěšné volání - smazáno.
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
post:
description: Create and save the transmitter place, address, bank informations and contatct. /
Uloží podací místo včetně adres, bankovních spojení a kontaktů.
summary: Create the location
tags:
- location
operationId: createLocation
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
Authorization-content-SHA256: [ ]
parameters:
- name: idContract
in: path
required: true
description: ID CCK of submitter. / ID CČK složky podavatele.
schema:
$ref: '#/components/schemas/IdContract'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Location'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/LocationCreateResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
/parcelService:
post:
description: Make validation and data insert, eventual printing of Address labels./
Provede validaci a zápis dat, případně generování adresního štítku k zásilce.
summary: Post Parcel Service Data.
tags:
- parcelData
operationId: sendParcelService
security:
- Api-Token: [ ]
HMAC_SHA256_Auth: [ ]
Authorization-Timestamp: [ ]
Authorization-content-SHA256: [ ]
parameters:
- name: idContract
in: query
required: false
description: ID CCK of submitter. In case of non-completion, the submitter is the caller./ ID CČK složky podavatele. V případě nevyplnění, je podavatelem volající.
schema:
$ref: '#/components/schemas/IdContract'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelServiceRequest'
responses:
'200':
description: Successful call. / Úspěšné volání.
content:
application/json:
schema:
$ref: '#/components/schemas/ParcelServiceResponse'
'400':
$ref: '#/components/responses/400Response'
'401':
$ref: '#/components/responses/401Response'
'403':
$ref: '#/components/responses/403Response'
'404':
$ref: '#/components/responses/404Response'
default:
$ref: '#/components/responses/defaultResponse'
components:
securitySchemes:
Api-Token:
type: apiKey
in: header
name: Api-Token
description: |
Authorization and authentication by API key. This key is generated in User application.
In the User application is able to delete and generate a new key.
Autorizace a autentizace pomocí klíče API. Tento klíč je generován v uživatelské aplikaci.
V uživatelské aplikaci je možné smazat a vygenerovat nový klíč.
Example /Příklad:
```
Api-Token: 123e4567-e89b-12d3-a456-426614174000
```
HMAC_SHA256_Auth:
type: apiKey
in: header
name: Authorization
description: |
HMAC_SHA256_Auth is create of nonce (random string) and signature.
For the requests, the authorization by sercret key is neccessary. This secret key is generated in User application, secretKey is not part of the request.
The system of external partner generates 'nonce' - in form UUIDv4.
Signature is created as hash HMAC256 of this items:
```
Authorization-Content-SHA256;Authorization-Timestamp;nonce
```
as first parameter of HMAC function and
```
secretKey
```
as the second one. The secretKey is in Base64 format.
In case, that the request doesn't contain any body, the first parameter of HMAC function is created by this items:
```
;Authorization-Timestamp;nonce
```
/
HMAC_SHA256_Auth je tvořen pomocí nonce (náhodný řežezec) a signature.
Pro požadavky je nutná autorizace tajného klíče. Tento tajný klíč je generován v uživatelské aplikaci, tajný klíč není součástí požadavku.
Systém externího partnera generuje 'nonce' - ve formátu UUIDv4.
Signature se vytvoří jako hash HMAC256 těchto položek:
```
Authorization-Content-SHA256;Authorization-Timestamp;nonce
```
jako první parametr HMAC funkce a
```
secretKey
```
jako druhý. SecretKey je ve formátu Base64.
V případě, že požadavek nemá tělo, je první parametr HMAC funkce tvořen z položek:
```
;Authorization-Timestamp;nonce
```
Example /Příklad:
```
Authorization: CP-HMAC-SHA256
nonce="74b03ffb-34e1-419e-8c6f-f8275bad9a41",
signature="QGBaYeY8loQZXbJRmj91JV2yTwsuBTME6wQhUrEm7mI="
```
Authorization-Timestamp:
name: Authorization-Timestamp
in: header
type: apiKey
description: |
Authorization-Timestamp is used for count of HMAC_SHA256_Auth.The system of external partner generates the timestamp in form 'UTC UNIX Timestamp'.
This item must be connected to header as 'Authorization-Timestamp'.
This timestamp must be no longer time for 60 second, can't be in the future. The request with invalid timestamp will be refused with response code 401. /
Authorization-Timestamp je použito pro výpočet HMAC_SHA256_Auth. Systém externího partnera vygeneruje časové razítko ve formátu 'UTC UNIX Timestamp'.
Tato položka musí být připojena k hlavičce jako 'Authorization-Timestamp'.
Toto časové razítko nesmí být delší než čas 60 sekund, nemůže být v budoucnosti. Požadavek s neplatným časovým razítkem bude odmítnut s kódem odpovědi 401.
Example: /Příklad:
```
Authorization-Timestamp: 1593561601
```
Authorization-content-SHA256:
name: Authorization-Content-SHA256
in: header
type: apiKey
description: |
SHA256 of body of request. The system of external partner counts the hash SHA256 of 'requestBody' of JSON's body of request.
This hash must be connected to header as 'Authorization-Content-SHA256'.
In case that the conted hash doesn't agree with the hash of body in the request, request will be refused with response code 401.
SHA256 těla požadavku. Systém externího partnera počítá hash SHA256 'requestBody' těla požadavku JSON.
Tento hash musí být připojen k hlavičce jako 'Authorization-Content-SHA256'.
V případě, že tento hash nesouhlasí s hashem těla v požadavku, bude požadavek odmítnut s kódem odpovědi 401.
Example: / Příklad:
```
Authorization-Content-SHA256:
f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
```
parameters:
xApiToken:
name: Api-Token
description: Api-Token - public part of the token, it is generated in User application./ Api-Token - veřejná část tokenu, je generována v Uživatelské aplikaci.
in: header
required: true
schema:
type: string
example: "123e4567-e89b-12d3-a456-426614174000"
# HMAC-SHA256 Signing Headers (documentation purpose only)
xHMACAuthorization:
name: Authorization
description: HMAC SHA256 Autorization. / Autorizace HMAC SHA256.
in: header
required: true
schema:
type: string
minLength: 100
maxLength: 255
nullable: false
example: 'CP-HMAC-SHA256 nonce="74b03ffb-34e1-419e-8c6f-f8275bad9a41",signature="QGBaYeY8loQZXbJRmj91JV2yTwsuBTME6wQhUrEm7mI="'
xHMACAuthorizationTime:
name: Authorization-Timestamp
description: UTC Timestamp which is used for count. / UTC Časová značka použitá ve výpočtu.
in: header
required: true
schema:
type: integer
format: int64
minimum: 1593561600
maximum: 7952342400
nullable: false
example: 1593561601
xHMACAuthorizationContentSHA256:
name: Authorization-Content-SHA256
description: SHA256 of request body. / SHA256 těla požadavku.
in: header
required: true
schema:
type: string
minLength: 64
maxLength: 64
nullable: false
example: "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"
responses:
400Response:
description: Incorrect input values, eg blank mandatory parameters.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
maxItems: 10
401Response:
description: Unauthorized.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
maxItems: 10
403Response:
description: Forbidden.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
maxItems: 10
404Response:
description: Not found.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
maxItems: 10
defaultResponse:
description: An unexpected error, such as one of the services in use unavailable.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
maxItems: 10
schemas:
SendParcelsRequest:
type: object
additionalProperties: false
required:
- parcelHeader
properties:
parcelHeader:
$ref: '#/components/schemas/ParcelHeader'
parcelDataList:
type: array
items:
$ref: '#/components/schemas/ParcelData'
maxItems: 1000
description: Parcels datas. / Data zásilek.
ParcelStatusRequest:
type: object
additionalProperties: false
properties:
parcelIds:
type: array
maxItems: 10
items:
$ref: '#/components/schemas/ParcelCode'
language:
type: string
description: Prefered language answer. / Jazyk zobrazovaných událostí.
example: 'CZ'
default: 'CZ'
ParcelPrintingRequest:
type: object
additionalProperties: false
required:
- printingHeader
- printingData
properties:
printingHeader:
$ref: '#/components/schemas/PrintingHeader'
printingData:
$ref: '#/components/schemas/PrintingData'
LetterPrintingRequest:
type: object
additionalProperties: false
required:
- printingHeader
- printingData
properties:
printingHeader:
$ref: '#/components/schemas/PrintingHeader'
printingData:
$ref: '#/components/schemas/PrintingData'
LetterRequest:
type: object
required:
- letterHeader
- letterData
additionalProperties: false
properties:
letterHeader:
$ref: '#/components/schemas/LetterHeader'
letterData:
$ref: '#/components/schemas/LetterDataList'
Location:
type: object
additionalProperties: false
properties:
locationName:
$ref: '#/components/schemas/LocationName'
locationNameAddOn:
$ref: '#/components/schemas/LocationNameAddOn'
senderAddress:
$ref: '#/components/schemas/Address'
codAddress:
$ref: '#/components/schemas/Address'
codBank:
$ref: '#/components/schemas/Bank'
senderContacts:
$ref: '#/components/schemas/Contact'
LocationList:
type: array
items:
$ref: '#/components/schemas/LocationItem'
LocationItem:
type: object
additionalProperties: false
properties:
locationNumber:
$ref: '#/components/schemas/LocationNumber'
location:
$ref: '#/components/schemas/Location'
ParcelServiceRequest:
type: object
required:
- parcelServiceHeader
additionalProperties: false
properties:
parcelServiceHeader:
$ref: '#/components/schemas/ParcelServiceHeader'
parcelServiceData:
$ref: '#/components/schemas/ParcelData'
multipartParcelData:
$ref: '#/components/schemas/AdditionalParcelData'
parcelCustomsDocuments:
type: array
items:
$ref: '#/components/schemas/ParcelCustomsDocuments'
maxItems: 3
AdditionalParcelData:
type: array
minItems: 1
maxItems: 4
items:
$ref: '#/components/schemas/AddParcelData'
description: It uses for multipart parcel, resp. for 2.-5.part of multipart parcel . / Používá se pro vícekusovou zásilku, resp. pro 2.-5.kus vícekusové zásilky.
AddParcelData:
type: object
properties:
addParcelData:
$ref: '#/components/schemas/ParcelParams'
addParcelDataServices:
$ref: '#/components/schemas/Services'
ParcelCustomsDocuments:
type: object
additionalProperties: false
properties:
recordID:
$ref: '#/components/schemas/RecordID'
code:
type: string
description: Type. / Typ.
name:
type: string
description: Name. / Název.
id:
type: string
description: ID. / Id.
ParcelServiceHeader:
type: object
additionalProperties: false
properties:
parcelServiceHeaderCom:
$ref: '#/components/schemas/LetterHeader'
transmissionEnd:
$ref: '#/components/schemas/TransmissionEnd'
printParams:
$ref: '#/components/schemas/PrintParams'
position:
$ref: '#/components/schemas/Position'
PrintParams:
type: object
additionalProperties: false
properties:
idForm:
$ref: '#/components/schemas/IdForm'
shiftHorizontal:
$ref: '#/components/schemas/ShiftHorizontal'
shiftVertical:
$ref: '#/components/schemas/ShiftVertical'
ParcelStatusResponse:
type: object
additionalProperties: false
description: Parcel Status response. / Výsledek operace Parcel Status.
properties:
detail:
type: array
items:
$ref: '#/components/schemas/ParcelStatusDetail'
ParcelStatusDetail:
type: object
additionalProperties: false
properties:
idParcel:
$ref: '#/components/schemas/ParcelCode'
parcelType:
$ref: '#/components/schemas/PrefixParcelCode'
weight:
$ref: '#/components/schemas/Weight'
amount:
$ref: '#/components/schemas/Amount'
currency:
$ref: '#/components/schemas/Currency'
parcelsQuantity:
$ref: '#/components/schemas/Quantity'
depositTo:
type: string
format: date
description: Date format ISO8601. / Datum ve formátu ISO8601.
timeDeposit:
type: integer
description: Deposit time. / Úložní doba.