-
Notifications
You must be signed in to change notification settings - Fork 0
/
partner-openapi.yaml
1540 lines (1494 loc) · 56 KB
/
partner-openapi.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
tags:
- name: Partner
- name: Rechte
info:
title: partner-api
version: v2.0
description: Europaces partner management allows organizations to map their own structure to give each partner or employee access and set rights.
contact:
name: Europace AG
url: 'https://docs.api.europace.de'
email: [email protected]
termsOfService: 'https://docs.api.europace.de/nutzungsbedingungen/'
servers:
- url: 'https://api.europace.de/v2'
description: Produktion Server
externalDocs:
url: 'https://docs.api.europace.de/baufinanzierung/partner/partner-api/'
paths:
'/partner/{partnerId}':
parameters:
- schema:
type: string
name: partnerId
in: path
required: true
description: unique identifier of the partner
get:
summary: get partner data
operationId: getPartner
description: |
Provides the data of a partner.
Requirements:
* OAuth token has scope `partner:plakette:lesen`.
* To access a partner, the caller basically needs permission to see it. This right exists if the retrieved partner is below the authenticated partner in the hierarchy or the Einstellungsrecht is assigned to the authenticated partner.
security:
- europace_oauth2:
- 'partner:plakette:lesen'
responses:
'200':
description: |
Different data structures are supplied depending on the type (person, organization).
**Inherited values are therefore not delivered.** The inheritance of values of certain attributes along thehierarchy, which is known from the settings-frontend, is not reflected in the API.
content:
application/json:
schema:
$ref: '#/components/schemas/Partner'
examples:
Partner:
value:
partnerId: SZY92
vorname: Max
nachname: Musterman
typ: PERSON
email: [email protected]
webseite: 'https://www.europace2.de'
avatar: 'https://www.europace2.de/partnermanagement/984094aa488a4dd8e3273c4b898fe63e.avatar?id=4ff189174ad2e9f19178073b'
gesperrt: false
parent:
partnerId: WER03
telefonnummer: (030) 12345678
firmenname: Firma
anschrift:
strasse: Heidestraße
hausnummer: '8'
plz: '10557'
ort: Berlin
bankverbindung:
kontoinhaber: Immofin GmbH
bic: PBNKDEFFXXX
iban: DE94370100500040661506
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not found - partner is not present or may not be accessed.
tags:
- Partner
parameters: []
patch:
summary: update partner data
operationId: updatePartner
description: |
update partner data
This overwrites **only** those attributes that are included in the PATCH request. All other attributes are not changed.
Requirements:
* OAuth token has the scope `partner:plakette:schreiben`.
* Caller has Einstellungsrechte on the partner
### Attributes that can be changed via PATCH
- anrede
- anschrift
- aufsichtsbehoerde
- bankverbindung
- email
- externePartnerId
- faxnummer
- firmenname
- firmennameZusatz
- geburtsdatum
- kreditsachbearbeiter
- mobilnummer
- name
- vorname
- nachname
- registrierungsnummer
- telefonnummer
- titelFunktion
- webseite
responses:
'200':
description: |-
Partner has been updated.
The body of the response contains the current partner data in JSON format. This can be used for success control. Attributes that are set on the server side or for which there are default values are always included.
content:
application/json:
schema:
$ref: '#/components/schemas/Partner'
examples:
example-1:
value:
partnerId: ABC12
vorname: Max
nachname: Mustermann
typ: PERSON
email: [email protected]
avatar: 'https://ep2.mtp.rz-hypoport.local/partnermanagement/d71c58aeaed4022384b169f83e0d8842.avatar?anonymousAvatar=BENUTZER'
gesperrt: false
kreditsachbearbeiter: true
parent:
partnerId: ABC12
externePartnerId: '123456'
titelFunktion: Softwareentwickler
anrede: HERR
geburtsdatum: '1970-01-01'
telefonnummer: 030 123456
mobilnummer: 030 123456
faxnummer: 030 123456
firmenname: Europace AG
firmennameZusatz: Aktiengesellschaft
webseite: 'https://github.com/europace/partner-api'
anschrift:
strasse: Musterstraße
hausnummer: '5'
plz: '12345'
ort: Musterstadt
bankverbindung:
referenzFeld: Test Ref
kontoinhaber: Max Musterman
bic: BYLADEM1001
iban: DE02120300000000202051
aufsichtsbehoerde: Musterbehoerde
registrierungsnummer: '987654'
'400':
description: Bad Request - Validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Beispiel:
value:
message: 'Enum literal für ''anrede'' muss FRAU oder HERR sein.: abc'
traceId: ' ff-request-2014-10-01-07-55'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found - partner is not present or may not be accessed.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Partner'
examples:
example-1:
value:
anrede: HERR
vorname: Max
nachname: Mustermann
email: [email protected]
gesperrt: false
kreditsachbearbeiter: true
externePartnerId: '123456'
titelFunktion: Softwareentwickler
geburtsdatum: '1970-01-01'
telefonnummer: 030 123456
mobilnummer: 030 123456
faxnummer: 030 123456
firmenname: Europace AG
firmennameZusatz: Aktiengesellschaft
webseite: 'https://github.com/europace/partner-api'
anschrift:
strasse: Musterstraße
hausnummer: '5'
plz: '12345'
ort: Musterstadt
bankverbindung:
kontoinhaber: Max Musterman
bic: BYLADEM1001
iban: DE02120300000000202051
referenzFeld: Test Ref
aufsichtsbehoerde: Musterbehoerde
registrierungsnummer: '987654'
description: |-
You only need to give the attributes, who have to change.
The following rules apply to server-side evaluation:
- empty attributes for strings ("") delete the existing value.
- unknown attributes are ignored.
- `partnerId` cannot be changed and will be ignored.
- `type` is not changeable and will be ignored.
- if a field expects an ENUM, a value must be specified (Anrede)
security:
- europace_oauth2:
- 'partner:plakette:schreiben'
tags:
- Partner
'/partner/{partnerId}/kontaktdaten':
get:
summary: get contact details
operationId: getKontaktdaten
description: |
Provides the contact details of a partner if you have access to him or a trade relationship.
The contact details of partners are provided in order to be able to work together.
Requirements:
* the caller has a trading relationship with the partner
and/or
* the caller has an [Zugriffsrecht](https://docs.api.europace.de/common/glossary/) to the partner
and/or
* the caller has a [Einstellungsrecht](https://docs.api.europace.de/common/glossary/) to the partner
and/or
* the caller is above the partner in the hierarchy
tags:
- Partner
responses:
'200':
description: Retrieve the contact details.
content:
application/json:
schema:
$ref: '#/components/schemas/Kontaktdaten'
examples:
Person:
value:
person:
anrede: FRAU
vorname: Maxi
nachname: Musterfrau
titelFunktion: Baufi-Beraterin
geburtsdatum: '1995-05-05'
firmenName: Immofin AG
telefon: 030-12345-0
mobiltelefon: 0151-12345678
email: [email protected]
anschrift:
strasse: Teststr.
hausnummer: '69'
plz: '10557'
ort: Berlin
Paragraph34c:
registrierungsNummer: D-W-7943497238942
aufsichtsBehörde: 'IHK Berlin, Fasanenstr. 85, 10623 Berlin'
'401':
description: Unauthorized - Not signed in
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden - No access right or trading relationship with the partner
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found - partner does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
- schema:
type: string
name: partnerId
in: path
required: true
description: unique identifier of the partner
'/partner/{partnerId}/rechte':
parameters:
- schema:
type: string
name: partnerId
in: path
required: true
description: unique identifier of the partner
get:
summary: get user permissions
operationId: getPartnerRechte
description: |-
Provides the permissions of a user.
Requirements:
* OAuth token has scope partner:plakette:lesen
* To access a partner, the caller basically needs permission to see it. This right exists if the retrieved partner is below the authenticated partner in the hierarchy or the Einstellungsrecht is assigned to the authenticated partner.
security:
- europace_oauth2:
- 'partner:rechte:lesen'
tags:
- Partner
- Rechte
responses:
'200':
description: You will get the permissions of the partner.
content:
application/json:
schema:
$ref: '#/components/schemas/Rechte'
examples:
example-1:
value:
partnermanagement:
apiClientEinstellungenVornehmen: false
einstellungenOeffnen: false
baufiSmartEinstellungenVornehmen: false
partnerAnlegen: false
baufismart:
baufiSmartNutzen: true
echtgeschaeft: false
vorgaengeUeberOberflaecheAnlegen: true
ergebnisListeNutzen: false
loeschen: false
kreditsmart:
echtgeschaeft: false
kreditSmartSichtbar: false
versicherungAnbieten: false
vorgaengeUeberOberflaecheAnlegen: false
'401':
description: Unauthorized - not signed in
'403':
description: Forbidden - no access
'404':
description: Not found - partner does not exist
patch:
summary: set user permissions
operationId: setPartnerRecht
description: |-
Update permissions of a user.
Requirements:
* OAuth token has the scope `partner:rechte:schreiben`.
* Caller has a [Einstellungsrecht](https://docs.api.europace.de/common/glossary/) on the partner
security:
- europace_oauth2:
- 'partner:rechte:schreiben'
tags:
- Partner
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Rechte'
examples:
example-1:
value:
baufismart:
baufiSmartNutzen: true
echtgeschaeft: true
description: |
This overwrites **only** those attributes that are included in the PATCH request. All other attributes are notchanged.
responses:
'200':
description: |-
The changed permissions of a partner are returned.
The body of the response contains the current partner data in JSON format.
This can be used for success control. Attributes that were already set or for which there are default values are always included.
content:
application/json:
schema:
$ref: '#/components/schemas/Rechte'
examples:
example-1:
value:
partnermanagement:
apiClientEinstellungenVornehmen: true
einstellungenOeffnen: true
baufiSmartEinstellungenVornehmen: true
partnerAnlegen: true
baufismart:
baufiSmartNutzen: true
echtgeschaeft: true
vorgaengeUeberOberflaecheAnlegen: true
ergebnisListeNutzen: true
loeschen: false
kreditsmart:
echtgeschaeft: true
kreditSmartSichtbar: true
versicherungAnbieten: true
vorgaengeUeberOberflaecheAnlegen: true
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Partner ist nicht vorhanden oder es darf nicht auf ihn zugegriffen werden.
'/partner/{partnerId}/untergeordnete':
parameters:
- schema:
type: string
name: partnerId
in: path
required: true
description: ID des Partners
post:
summary: create partner
operationId: createPartner
description: |-
Creates a new partner as an organization or person, depending on the type.
Creating a new partner is always done below an existing partner:
`https://api.europace.de/v2/partner/{PartnerId}/untergeordnete`
Requirements:
* OAuth token has scope `partner:plakette:anlegen`.
* Caller is a partner of type Person
* Caller has the `may create organizational units` permission.
* Caller has [Einstellungsrechte](https://docs.api.europace.de/common/glossary/) on the partner under which the new partner is to be created
The following rules apply to server-side evaluation:
- unknown attributes are ignored.
- For organizations, person-specific attributes are ignored.
- For persons, organization-specific attributes are ignored.
- Empty attributes for strings ("") are ignored.
- "partnerId" cannot be set and will be ignored.
- Rights are set to false for persons if not specified.
> **Note**
>
> For a successful offer acceptance in BaufiSmart it is necessary for the following processes that the following attributes are maintained in the partner management for the account manager of the transaction:
> - anrede
> - vorname
> - nachname
> - anschrift
> - bankverbindung
> - email
security:
- europace_oauth2:
- 'partner:plakette:anlegen'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Partner'
examples:
Person:
value:
anrede: HERR
vorname: Max
nachname: Mustermann
email: [email protected]
gesperrt: false
kreditsachbearbeiter: true
externePartnerId: '123456'
titelFunktion: Softwareentwickler
geburtsdatum: '1970-01-01'
telefonnummer: 030 123456
mobilnummer: 030 123456
faxnummer: 030 123456
firmenname: Europace AG
firmennameZusatz: Aktiengesellschaft
webseite: 'https://github.com/europace/partner-api'
anschrift:
strasse: Musterstraße
hausnummer: '5'
plz: '12345'
ort: Musterstadt
bankverbindung:
kontoinhaber: Max Musterman
bic: BYLADEM1001
iban: DE02120300000000202051
referenzFeld: Test Ref
aufsichtsbehoerde: Musterbehoerde
registrierungsnummer: '987654'
description: |-
The following rules apply to server-side evaluation:
- unknown attributes are ignored.
- For organizations, person-specific attributes are ignored.
- For persons, organization-specific attributes are ignored.
- Empty attributes for strings ("") are ignored.
- "partnerId" cannot be set and will be ignored.
- Rights are set to false for persons if not specified.
tags:
- Partner
responses:
'201':
description: |-
Partner created.
The body of the response contains the current master data in JSON format.
This can be used for success control. Attributes that are set on the server side or for which there are default values are always included.
The HTTP header "Location" contains the url of the newly created partner.
content:
application/json:
schema:
$ref: '#/components/schemas/Partner'
examples:
Person:
value:
partnerId: SZY92
typ: PERSON
avatar: 'https://www.europace2.de/partnermanagement/984094aa488a4dd8e3273c4b898fe63e.avatar?id=4ff189174ad2e9f19178073b'
parent:
partnerId: WER03
anrede: HERR
vorname: Max
nachname: Mustermann
email: [email protected]
gesperrt: false
kreditsachbearbeiter: true
externePartnerId: '123456'
titelFunktion: Softwareentwickler
geburtsdatum: '1970-01-01'
telefonnummer: 030 123456
mobilnummer: 030 123456
faxnummer: 030 123456
firmenname: Europace AG
firmennameZusatz: Aktiengesellschaft
webseite: 'https://github.com/europace/partner-api'
anschrift:
strasse: Musterstraße
hausnummer: '5'
plz: '12345'
ort: Musterstadt
bankverbindung:
kontoinhaber: Max Musterman
bic: BYLADEM1001
iban: DE02120300000000202051
referenzFeld: Test Ref
aufsichtsbehoerde: Musterbehoerde
registrierungsnummer: '987654'
headers:
Location:
schema:
type: string
description: 'Link auf den neu angelegten Partner '
'205':
description: Partner could be found by PartnerId or external PartnerId and was updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Partner'
headers:
Location:
schema:
type: string
description: Link auf den gefundenen und aktualsierten Partner
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden - see requirements
get:
summary: get subordinate partners
operationId: getChildren
description: Returns a list of child partners.
security:
- europace_oauth2:
- 'partner:plakette:lesen'
responses:
'200':
description: List of subordinate partners.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Plakette'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
tags:
- Partner
- Rechte
'/partner/{partnerId}/partnerkennzeichen':
parameters:
- schema:
type: string
name: partnerId
in: path
required: true
description: ID des Partners
get:
summary: get partner code
operationId: getPartnerkennzeichen
description: |-
The partner codes identify a sales organisation at a loan provider. The recorded values can be read out with this endpoint. The specific value for a loan provider will be delivered in the Antraege-API to him. This endpoint is for managing purpose.
Requirements:
* OAuth token has scope `partner:plakette:lesen `
* To access a partner, the caller basically needs permission to see it. This right exists if the retrieved partner is below the authenticated partner in the hierarchy or the Einstellungsrecht is assigned to the authenticated partner.
security:
- europace_oauth2:
- 'partner:plakette:lesen'
tags:
- Partner
responses:
'200':
description: |-
List with partner codes.
**Inherited values are therefore not delivered.** The inheritance of values of certain attributes along the hierarchy, which is known from the settings, is not reflected in the API.
content:
application/json:
schema:
$ref: '#/components/schemas/Partnerkennzeichen'
examples:
Beispiel:
value:
dslSapGeschaeftspartnerNummerFuerRatenkredit: cdts-dsl-sap-vo
dslVertriebsWegSchluesselFuerRatenkredit: '1899026629'
dkbVertriebsIdFuerRatenkredit: cdts-dkb-vertrieb
kennzeichenIngDiba:
vermittlerNummer: '9800002186'
vermittlerVorname: wer
vermittlerNachname: wer
vermittlerNummerFuerRatenkredit: cdts-ing-diba-vermittler
kennzeichenErgo: {}
kennzeichenBhw:
vgeNummer: 6248/205585.0
orgaNummer: ORGA123
zurIdentifikationsPruefungLegitimiert: 'false'
lbsOstVermittlerNummer: lbsost-werwer-vermittler
lbsShhVermittlerNummer: lbs-ssh-ldapvermittler
lbsSuedwestVermittlerNummer: lbs-südwest-ldapvermittler
lbsWestVermittlerNummer: lbs-west-ldapvermittler
allianzVertreterNummer: 01/012/0123
axaGeschaeftsPartnerNummer: MA 00352
dslVermittlerGruppenSchluessel: '1200'
bshVoNummer: abcdefghijklmnopqrstuvwxyz
bshAkquisitionsWeg: AW1
bshBlzVertriebsbank: '1234567890'
dzHypVermittlerNummer: '1234'
alteLeipzigerVerbundVermittlerNummer: '42'
rundvBankAgenturNummer: RV_BAN
rundvBlzVertriebsbank: RV_BLZ
vertriebsOrganisation:
name: "Vertriebsorganisation Name"
firma: "Vertriebsorganisation Firma"
vertriebsOrganisationsId: "VORGAID"
partnerId: "ABC12"
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'/partner/{partnerId}/administrierbare':
parameters:
- in: path
name: partnerId
schema:
type: string
required: true
description: ID des Partners
get:
summary: get setting right
operationId: getAdministrierbare
tags:
- Partner
- Rechte
description: |-
Returns all partners for which this partner is allowed to change the data and authorizations or retrieve the reporting.
At least the partner itself is returned, since everyone may at least set itself or retrieve its own reporting.
In order to achieve a better performance, the implicitly administrable partners have been omitted in the partner-api. To determine these, it is necessary to iterate over the subordinates of the result list.
Requirements:
* OAuth token has scope `partner:plakette:lesen`.
* Each partner may make changes to himself or other partners if he has the [Einstellungsrecht](https://docs.api.europace.de/common/glossary/). This means that partner data or authorizations can be adjusted. Authorizations can only be assigned if the executing partner has them himself.
security:
- europace_oauth2:
- 'partner:beziehungen:lesen'
responses:
'200':
description: List of all partners where this partner is allowed to change the data and authorizations or to retrieve the reporting.
content:
application/json:
schema:
$ref: '#/components/schemas/ContentPartnerIds'
examples:
example-1:
value:
content:
- partnerId: XYZ15
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'/partner/{partnerId}/uebernehmbare':
parameters:
- name: partnerId
description: ID des Partners
in: path
required: true
schema:
type: string
get:
summary: get access rights
operationId: getUebernehmbare
tags:
- Partner
- Rechte
description: |-
The [Zugriffrecht](https://docs.api.europace.de/common/glossary/) entitles partners to read and write access to all [Vorgänge](https://docs.api.europace.de/common/glossary/) of another partner.
In order to achieve better performance, the partner-api does not output the implicitly acceptable ones. To determine these, it is necessary to iterate over the subordinates of the result list.
* OAuth token has scope `partner:rechte:lesen `
* To access a partner, the caller basically needs permission to see it. This right exists if the retrieved partner is below the authenticated partner in the hierarchy or the Einstellungsrecht is assigned to the authenticated partner.
security:
- europace_oauth2:
- 'partner:beziehungen:lesen'
responses:
'200':
description: 'List of all partners whose cases can be seen, opened and edited by the partner (access). '
content:
application/json:
schema:
$ref: '#/components/schemas/ContentPartnerIds'
examples:
example-1:
value:
content:
- partnerId: XYZ15
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'/partner/{partnerId}/uebernahmeRechtFuer/{target}':
parameters:
- schema:
type: string
name: partnerId
in: path
required: true
description: 'Partner, dessen Zugriffrechte ermittelt werden sollen'
- schema:
type: string
name: target
in: path
required: true
description: 'Partner, auf den zugegriffenen werden soll'
get:
summary: check access right
operationId: getUebernahmeRechtFuer
tags:
- Partner
- Rechte
description: |-
Determines whether the partner is allowed to access the operations of another partner.
Do I have access to Partner XYZ15?
The [Zugriffrecht](https://docs.api.europace.de/common/glossary/) entitles partners to read and write access to all [Vorgänge](https://docs.api.europace.de/common/glossary/) of another partner.
security:
- europace_oauth2:
- 'partner:beziehungen:lesen'
responses:
'200':
description: OK
content:
application/json:
schema:
title: Target
type: object
properties:
partner:
$ref: '#/components/schemas/Plakette'
uebernehmbar:
type: boolean
description: 'Kann auf die Vorgänge des Partner zugegriffen werden? '
examples:
Beispiel:
value:
partner:
partnerId: AAV43
gesperrt: false
uebernehmbar: true
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
post:
summary: add access right
operationId: setUebernahmeRechtFuer
tags:
- Partner
- Rechte
description: |
Creates an access right to a partner.
Example: partner ABC12 is getting the [Zugriffsrecht](https://docs.api.europace.de/common/glossary/) from XYZ56. ABC12 can then access the [Vorgänge](https://docs.api.europace.de/common/glossary/) of XYZ56.
Requirements:
* OAuth token has scope `partner:beziehung:schreiben`.
* Caller has Einstellungsrecht on the partner to which the Zugriffsrecht is added
* Caller has Einstellungsrecht on the partner to which the access is granted
security:
- europace_oauth2:
- 'partner:beziehungen:schreiben'
responses:
'201':
description: Created
'401':
description: Unauthorized - AccessToken invalid
'403':
description: 'Forbidden - Einstellungsrecht on partner-id or scope ''partner:beziehung:schreiben'' not available'
'404':
description: Not Found - PartnerId or target were not found
'/partner/{partnerId}/zugang':
parameters:
- in: path
name: partnerId
schema:
type: string
required: true
description: ID des Partners
get:
summary: get user access
tags:
- Partner
security:
- europace_oauth2:
- 'partner:plakette:lesen'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Zugang'
examples:
'Example response, for a partner authenticating to the Europace identity ':
value:
partnerId: ABC12
status: ZUGANG_REGISTRIERT
benutzername: [email protected]
'Example response, for a partner authenticating with its own identity provider (e.g. Actice Directory)':
value:
partnerId: ABC12
status: ZUGANG_REGISTRIERT
identityProviderBenutzername: maxi.muster
identityProviderConfigURL: 'https://auth.deineOrganisation.de/adfs/.well-known/openid-configuration'
'401':
description: Unauthorized
'403':
description: Forbidden - no access
'404':
description: Not Found - partner does not exists
operationId: getZugang
description: |-
Delivers the user access of a partner.
In the case of a person, the usernames are supplied.
In the case of an organization, the identity provider configuration are supplied.
Requirements:
* OAuth token has scope `partner:plakette:lesen`
* To access a partner, the caller basically needs permission to see it. This right exists if the retrieved partner is below the authenticated partner in the hierarchy or the Einstellungsrecht is assigned to the authenticated partner.
post:
summary: create user access
tags:
- Partner
operationId: createZugang
security:
- europace_oauth2:
- 'partner:plakette:schreiben'
parameters:
- in: query
name: sendEmail
schema:
type: boolean
default: false
required: false
example: true
description: 'If the benutzername is set, an email will be sent to the benutzername instructing him/her to assign a password.'
responses:
'201':
description: |-
User access has been created.
The body of the response contains the current access data in JSON format. This can be used for success control. Attributes that are set on the server side are always included.
content:
application/json:
schema:
$ref: '#/components/schemas/Zugang'
examples:
'Use case 1:':
value:
partnerId: ABC12
status: ZUGANG_UNBESTAETIGT
benutzername: [email protected]
'Use case 2:':
value:
partnerId: ABC12
status: ZUGANG_REGISTRIERT
benutzername: [email protected]
identityProviderConfigURL: 'https://idp.deineOrganisation.de/auth/realms/.well-known/openid-configuration'
'Use case 3:':
value:
partnerId: ABC12
status: ZUGANG_REGISTRIERT
identityProviderBenutzername: maxi.mustermann01
identityProviderConfigURL: 'https://idp.deineOrganisation.de/auth/realms/.well-known/openid-configuration'
'400':
description: Bad Request - Request invalid
'401':
description: Unauthorized
'406':
description: Not Acceptable
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
usernameNotAllowed:
value:
message: Username not allowed
statusCode: 406
statusMessage: Dieser Benutzername existiert bereits in Europace
timestamp: '2021-01-20T10:03:29.02'
traceId: XABC-2333...
alreadyExists:
value:
message: Already Exists
statusCode: 406
statusMessage: Es existiert bereits ein Zugang
timestamp: '2021-01-20T10:03:29.02'
traceId: XABC-2333...
wrongPartnerType:
value:
message: wrongPartnerType
statusCode: 406
statusMessage: Ein Zugang kann nur an einer Person nicht einer Organisation angelegt werden.
timestamp: '2021-01-20T10:03:29.02'
traceId: XABC-122...
'409':
description: Conflict - benutzername already exists
requestBody:
required: true
content:
application/json:
schema:
type: object
title: CreateZugang
properties:
benutzername:
type: string
example: [email protected]
format: email
description: 'Eine in Europace eindeutige Emailadresse, die als Identifikation des Benutzers verwendet wird. '
identityProviderBenutzername:
type: string
description: Benutzername für den IdentityProvider. Die Eindeutigkeit ist nicht relevant. Ist das Feld <null> wird der Benutzername für den Identity Provider verwendet.
examples:
'Use case 1: Create Europace user':
value:
benutzername: [email protected]
'Use case 2: Create user for own identity provider':
value:
benutzername: [email protected]
'Use case 3: Username is not unique Europace-wide or no email address ':
value:
identityProviderBenutzername: maxi.mustermann01
description: ''
description: |-
Creates an user access for a person.