Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Integration des WebservicesWelche Daten können über den ZSR-Webservice bezogen werden?Die über den Webservice gelieferten Daten entsprechen grundsätzlich den Daten die in den RK-Abos geliefert werden. Welche Daten abgefragt werden können ist also abhängig von den Modulen die der Kunde abonniert hat. Siehe Abo-Optionen Daten können abgefragt werden zu ZSR-Nummern / K-Nummern, bei welchen die Sistierung nicht länger als 10 Jahre zurückliegt. Werden die Daten in gleicher Struktur geliefert wie in den Abo-Files?Mit dem Webservice hat sich das Datenmodell (im Vergleich zu den Abo-Files) geändert. Siehe auch Mapping Abo Files - Webservice. Die wichtigsten Entitäten sind
Weshalb wurde das Datenmodell (im Vergleich zu den Abo-Files) verändert?Gründe für die Änderung des Datenmodells:
Mit welchem Response-Format gibt der ZSR-Webservice Antwort?Die Daten werden in JSON Format geliefert (XML wird nicht unterstützt). Können Referenzdaten (=Stammdaten) separat geladen werden?Stammdaten/Basisdaten zu ZSR-/K-Nummern Werten (Methoden, Qualifikationen, Banken, usf.) müssen grundsätzlich nicht separat geladen werden. Alle notwendigen Daten werden direkt in der Detail-Response zur einzelnen Nummer mitgeliefert. Bei Bedarf können Stammdaten/Basisdaten dennoch separat wie folgt eingelesen werden:
Die eindeutige Identifikation der Stammdaten ist über das Element "key" (string) möglich. Siehe Werden technische Id's geliefert? Wo finde ich die technische Dokumentation des Webservice?Es steht eine Open API Specification zur Verfügung. Nebst Swagger kann beispielsweise ReDoc zur Darstellung OpenAPI Specification genutzt werden. Gibt es eine Versionierung des ZSR-Webservice?Der ZSR-Webservice liegt in der Version v1.x vor. Alle Änderungen am Webservice werden bis auf Weiteres nicht über neue Versionen im Parallelbetrieb umgesetzt, sondern alle Anpassungen erfolgen direkt auf der Version v1.x. Jegliche Änderungen werden jedoch rechtzeitig als Release-Notes publiziert und per Stage-System zur Verfügung gestellt. Es gelten die https://www.sasis.ch/sharepoint/public/service-level-agreement.pdf. Weil eine Versionierung des ZSR-Webservice bis auf Weiteres fehlen wird, empfiehlt die SASIS AG ihren Integratoren ein Adapterpattern zu verfolgen, das über eine releaseunabhängige Parametrierung eine Anpassung der Client-System Schnittstellen zum Webservice erlaubt. Wie lauten die aktuellen IT-SLA der SASIS AGFür den Webservice kommt das Service Level Agreement der SASIS IT Services zur Anwendung. Anfragen und SupportWo kann der Zugang zum ZSR-Webservice beantragt werden?Bitte nehmen Sie Kontakt mit uns auf um den Zugang zum ZSR-Webservice zu beantragen. An wen kann man sich bei Supportanfragen zum ZSR-Webservice wenden?Bitte nehmen Sie Kontakt mit uns auf. Authentifizierung und Absetzen von AbfragenWie kann auf den ZSR-Webservice zugegriffen werden?Bitte nehmen Sie Kontakt mit uns auf um den Zugang zum ZSR-Webservice zu beantragen. Wie erfolgt die Authentifizierung?Die Authentifizierung basiert auf OpenID Connect bzw. OAuth 2.0 unter Verwendung von password grant.
Access token The access token response contains additional information:
The token itself is a JWT and can therefore be decoded on the JWT website. The expires_in field defines the validity period of the token in seconds. Afterwards, a new token must be retrieved. Code samples A complete c# sample shows how to access one specific API resource (numbers):
Authentication in other languages follows the same procedure. The following code snippets explain the procedure on a step-by-step basis:
Welche Limiten bestehen auf Batchabfragen?Als Batchabfragen gelten Abfragen mit mehr als 50 Requests pro Minute und Kunde. Abfragen aus Batch-Prozessen auf Online-Dienste der SASIS AG dürfen ausschliesslich zwischen 22.00 und 4.00 Uhr durchgeführt werden. Siehe auch Service Level Agreement der SASIS IT Services. Weshalb kann ich nur 500 Nummern bei der Detailansicht beziehen?Abfragen an die Endpoints ClearingNumbers und EmployeeNumbers sind aus Performance Gründen auf 500 Nummern limitiert. Der Abfrage-Prozess ist so zu planen, das jeweils maximal 500 Nummern in einem Request enthalten sind. Welche Statuscodes werden vom Webservice zurückgegeben?Der Webservice verwendet http status codes. Folgende Codes können zurückgegeben werden:
Wie können 503er-Fehler verhindert/vermieden werden?Wird der Webservice mit zu vielen parallelen Abfragen überlastet, werden 503er-Fehler zurückgegeben. Um 503er-Fehler zu vermeiden, müssen die Anweisungen für das Laden der Nummernliste wie auch das Laden der Nummerndetails unbedingt beachtet werden (siehe auch Wie können Daten zu ZSR- und K-Nr. über den Webservice abgefragt werden?). Die Anzahl Requests kann weiter reduziert werden, indem beispielsweise nur Mutationen als Tagesscheiben abgefragt werden (siehe auch Wie können Mutationen abgefragt werden?). Nach dem Auftreten eines 503er-Fehlers sollte zudem ein Zeitpuffer von 5 Minuten bis zur nächsten Abfrage implementiert werden. Allenfalls ist auch zu prüfen, ob Webservice-Abfragen auf einen anderen, nächtlichen Zeitslot verlegt werden können Wie können 400er-Fehler verhindert/vermieden werden?Wenn der Client einen ungültigen Request an den Webservice sendet, wird ein 400er-Fehler zurückgegeben. Um 400er-Fehler zu vermeiden, müssen die Anweisungen für das Laden der Nummernliste wie auch das Laden der Nummerndetails unbedingt beachtet werden (siehe auch Wie können Daten zu ZSR- und K-Nr. über den Webservice abgefragt werden?). Der Abfrage-Prozess ist so zu planen, das jeweils maximal 500 Nummern in einem Request enthalten sind. Abfrage von ZSR- und K-NummernWie wird der Numbers Endpoint verwendet?Der Endpoint Numbers liefert ZSR- und K-Nummern zurück die den Filterkriterien entsprechen. Siehe auch Wie können Daten zu ZSR- und K-Nr. über den Webservice abgefragt werden? Was sind die möglichen Filterkriterien beim Numbers Endpoint?Filterkriterien:
Gibt es eine erweiterte Suche?Erweiterte Suchanfragen mit Filterkriterien auf Feldebene, beispielsweise nach Name oder Postleitzahl, werden über den ZSR-Webservice nicht angeboten. Für erweiterte Suchanfragen steht die ZSR-Vollversion zur Verfügung. Für die Filterkriterien des Webservice siehe Datenabfrage. Wie können Daten zu ZSR- und K-Nr. über den Webservice abgefragt werden?Die Abfrage der Daten erfolgt in zwei Schritten. Schritt 1 - Laden der Nummernliste: Abfrage aller gewünschten ZSR-/K-Nummern über den Endpoint "Numbers". Angewendete Filterkriterien und die Benutzer-Berechtigungen beeinflussen das Suchresultat. Der Endpoint "Numbers" liefert sämtliche ZSR-/K-Nummern aus, die den Filterkriterien entsprechen und auf welche der Kunde berechtigt ist. Nicht geliefert werden ZSR-/K-Nummern die länger als 10 Jahre sistiert sind. Filterkriterien:
Schritt 2 - Laden der Nummerndetails: Mit dem Resultat von Schritt 1 ist für jeweils 500 Nummern ein Request über den jeweiligen Detail-Endpoint abzusetzen. Die Response der Detail-Endpoints beinhaltet die kompletten Nummern-Details, auf die der User berechtigt ist. Auf gehäufte, parallele Einzelrequest ist aus performancegründen unbedingt zu verzichten. Endpoints:
Was sind Subscription Options?Die über den Webservice gelieferten Daten entsprechen grundsätzlich den Daten die in den RK-Abos geliefert werden. Die Subscription Options sind abhängig von den Modulen die der Kunde abonniert hat. Siehe Abo-Optionen Wie können die Subscription Options geändert werden?Bitte nehmen Sie Kontakt mit uns auf. Wie wird der ClearingNumbers Endpoint verwendet?Der Endpoint ClearingNumbers liefert Details zu ZSR-Nummern zurück. Siehe Wie können Daten zu ZSR- und K-Nr. über den Webservice abgefragt werden? Wie wird der EmployeeNumbers Endpoint verwendet?Der Endpoint EmployeeNumbers liefert Details zu K-Nummern zurück. Siehe Wie können Daten zu ZSR- und K-Nr. über den Webservice abgefragt werden? Wie können gelöschte Nummern identifiziert werden?Wenn ein fachlicher Wert einmal geliefert wurde (mit einer bestimmten ID bzw. ZSR-/K-Nummer) und zu einem späteren Zeitpunkt nicht mehr in der Response enthalten ist, dann handelt es sich um einen gelöschten/stornierten Wert. Wie können Mutationen abgefragt werden?Über den Endpoint "Numbers" kann als Parameter ein "Modified-Stichdatum" festgelegt werden. In der Response enthalten sind dann nur Nummern, die seit diesem Datum modifiziert wurden. Solche Modifikationen können fachlicher Natur sein, aber auch nur rein technische Werte der Nummer betreffen. Länger als 10 Jahre sistierte und stornierte Nummern werden über den Numbers-Endpoint nicht geliefert. Um herausfinden zu können, welche Nummern betroffen sind, müssen zuerst alle aktiven Nummern über den Numbers-Endpoint geladen werden. Fehlen Nummern in diesem Resultat, die im Client-System jedoch noch aktiv geführt werden, sind diese im Client-System zu beenden bzw. zu löschen. Nach dem Laden aller modifizierten Nummern können die Details zu diesen Nummern wie üblich über die Detail-Endpoints abgefragt werden. Die Response dieser Endpoints liefert immer alle verfügbaren Daten zu einer ZSR-/K-Nummer und nicht nur die effektiv geänderten Werte. Mutationen können vom Client-System z.B. mittels Vergleich des JSON-Resultats der letzten Abfrage mit dem JSON-Resultat der neuen Abfrage verarbeitet werden. Hierzu gäbe es folgende Fälle zu beachten:
Die Integration des Webservice sollte immer so erfolgen, dass diese unabhängig von der Anzahl der gemeldeten Mutationen funktioniert, z.B. sollen selbst gewählte Thresholds nicht zum Abbruch des Daten-Imports führen. Können auch nur geänderte ZSR-/K-Nummern geladen werden?Ja, das Filterkriterium "modifiedFrom" erlaubt die Abfrage von Mutationen per Stichdatum. Siehe auch Wie können Mutationen abgefragt werden? Wie sind Mutationen zu verarbeiten?
Es gibt somit zwei Varianten wie eine Veränderung eines bestehenden Wertes geliefert werden kann:
Im Endausbau des Webservice wird nur noch Variante 1 zur Anwendung kommen. Aktuell muss die Integration so erfolgen, dass die Client-Systeme mit beiden Varianten umgehen können. Weshalb sind einzelne Einträge plötzlich nicht mehr in der Response enthalten?Wurde ein Element bisher im JSON-Resultat geliefert und nun nicht mehr, dann handelt es sich um einen Storno (Falsche Erfassung von Daten bzw. nachträgliche Korrektur). Wir empfehlen dieses Element im Client-System zu löschen. Siehe auch Wie sind Mutationen zu verarbeiten? Interpretation der DatenWie werden ZSR-Nummern Beziehungen im Webservice geliefert?
Um die Gesamtheit der ZSR-Nummern Beziehungen zu erhalten, müssen somit sowohl ClearingNumber.relatedClearingNumbers wie auch CareProvider.ClearingNumbers berücksichtigt werden.
Wie werden Angestelltenverhältnisse im Webservice geliefert?Angestelltenverhältnisse werden unter clearingNumber.relatedEmployees geliefert. Auf welchen Daten basiert die ausgewiesene Gültigkeit (validityPeriod) einer ZSR-/K-Nr?Die Gültigkeit einer ZSR-/K-Nummer besteht nicht mehr nur aus einem Start- und Endedatum (Zeitraum). Die Gültigkeit wird anhand verschiedener Zeiträume bestimmt und als eine Liste von Gültigkeitsperioden (ValidityPeriods) ausgeliefert. Darin werden auch Gültigkeitslücken klar ausgewiesen. Diese Gültigkeitsperioden werden wie folgt bestimmt: ClearingNumber
EmployeeNumber
Wenn mehrere validityPeriods vorhanden sind (z.B. clearingNumber.validityPeriods) welche muss dann berücksichtigt werden?Im Gegensatz zu den Abo-Files können über den Webservice mehrere Gültigkeitsbereiche (validityPeriods) zu einem Element ausgeliefert werden. Grundsätzlich sollten im Sinne einer fachlichen Historie alle vorhandenen Gültigkeitsperioden übernommen werden. Ist dies nicht möglich, empfehlen wir die aktuellste bzw. letzte gültige zu berücksichtigen. Wie kann ich feststellen, ob es sich um ein Bank- oder Postkonto handelt?Die Klassifizierung Bankkonto/Postkonto wird im ZSR-Webservice nicht mehr geführt. Ob ESR Zahlungen möglich sind, ist unter ClearingNumberAccount anhand vom Feld hasPaymentOrderReferenceNumber eruierbar. Endpoint: ClearingNumbers, Objekt: clearingNumberAccount Welche Bedeutung haben die Daten «0001-01-01» bzw. «9999-12-31»?Für fachliche Zeiträume liefert der ZSR-Webservice immer einen Wert für Start- und Ende-Datum, auch dort wo sich aus den Legacy-Daten oder aus anderen Gründen sinnvollerweise keine genauen Datumswerte bestimmen lassen. Dafür werden je einen Platzhalterwert für das Start- und das Ende-Datum verwendet. Die Interpretation dieser Werte ist wie folgt:
Ein fachlicher Wert mit fachlichem Startdatum «0001-01-01» und fachlichem Endedatum «9999-12-31» ist somit zu jedem Zeitpunkt gültig. Werden technische Id's geliefert?Element id Die in der Detail-Response gelieferten IDs haben keinerlei fachliche Bedeutung und sollten nicht zur fachlichen Interpretation von Werten herbeigezogen werden. Sie dienen ausschliesslich der technischen Identifikation der gelieferten Daten bzw. können zur Handhabung von Mutationen (siehe Wie können Mutationen abgefragt werden? bzw. Wie sind Mutationen zu verarbeiten?) genutzt werden. Auf der technischen IDs sollte nie eine Logik codiert werden. Für den Hauptrecord der ZSR-/K-Nummer wird ausserdem überhaupt keine technische ID geliefert. Eine Identifikation ist nur mittels ZSR-/K-Nummer möglich. Ein Ersatzwert zur vormaligen ZahlstellenId wird nicht ausgeliefert Element key "Stammdaten/Referenzdaten", z.B. wie Kanton, Land, Qualifikation usf., werden mit einer beständigen GUID als Identifikator ausgeliefert. Siehe auch Können Referenzdaten (=Stammdaten) separat geladen werden? Die eindeutige Identifikation ist über das Element "key" (string) möglich bei folgenden Entitäten:
Beispiel: Wie können Dummy-Nummern identifiziert werden?Die sogenannten Dummy-Nummern sind ein weiterhin verwendetes Legacy-Konstrukt, das weiterhin per ZSR-Webservice bezogen werden kann. Sobald auf dem ClearingNumber Objekt ein Wert für das Property "clearingNumberDummy" geliefert wird, handelt es sich um eine Dummy-Nummer. Beispiel-Struktur:
Wie werden Partnerart-Obergruppe/Partnerart-Untergruppe im Webservice ausgewiesen?Alle Leistungserbringer ausser Ärzte und Ärztinnen
Die Werte für BusinessScopes/ParentBusinessScopes können Sie via Webservice über den Endpoint «BusinessScopes» abfragen: /api/v1/businessscopes. Die Werte für businessActivity sind als Enum-Werte im swagger.json (JSON) ausgewiesen. Siehe auch Mapping Abo Files - Webservice,Tabs PAOG_BusinesssScope, PAOG_BusinesssScope, PAUG_BusinessActivities Allgemeine Informationen zum ZahlstellenregisterWie setzt sich eine gültige ZSR-Nummer zusammen?Die ZSR-Nummer setzt sich zusammen aus einem Prüfbuchstaben (1. Stelle), Laufnummer (Stellen 2-5) und dem Nummernkreis (Stellen 6-7). Prüfbuchstabe 1 Berechnung Prüfbuchstabe
(9*1)+(1*2)+(5*3)+(8*4)+(4*5)+(2*6)=90 Beispiel: Y274589 (9*1)+(8*2)+(5*3)+(4*4)+(7*5)+(2*6)=103 Wie setzt sich eine gültige K-Nummer zusammen?K-Nummern setzen sich zusammen aus einer Laufnummer (Stellen 1-6) und dem Buchstaben "K" (7.Stelle). |
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Web service integrationWhich data can be requested via the ZSR web service?The data delivered via the web service correspond in principle to the data delivered in the backwards-compatible subscriptions. The modules to which the customer has subscribed thus determine which data can be requested. See Subscription options Are the data delivered with the same structure as in the subscription files?The web service uses a different data model from that of the subscription files. See also Mapping Abo Files - Webservice. The key entities are as follows:
Why was the data model changed (compared with the subscription files)?The reasons for changing the data model are as follows:
Which response format does the ZSR web service use?Data are delivered in JSON format (XML is not supported). Can reference data (master data) be loaded separately?Reference/master data for ZSR/K number values (methods, qualifications, banks etc.) do not have to be loaded separately. All required data are delivered directly in the detailed response for the individual number. If needed, reference/master data can be entered separately as follows:
Unique identification of the reference data is possible using the element “key” (string). See Are technical IDs delivered? Example: "key": "3fa85f64-5717-4562-b3fc-2c963f66afa6" Where can I find the technical API documentation?An Open API Specification is available. In addition to Swagger, (for example) ReDoc can be used to display the open API specification. Is there a version history for the ZSR web service?The ZSR web service is currently at version v1.x. For the time being, all changes to the ZSR web service will not be implemented via new versions in parallel operation but will instead be made directly in version v1.x. However, all changes will be published in release notes at the appropriate time and made available via the stage system. The SASIS Service Level Agreement apply. As there will not be a version history for the ZSR web service for the time being, SASIS AG recommends that its integrators follow an adapter pattern that allows changes to the client-system interfaces to the ZSR web service via release-independent settings. What are the current SASIS AG IT SLAs?The SASIS IT Service Level Agreement applies to the web service. Questions and supportWhere can I request access to the ZSR web service?Please contact us to request access to the ZSR web service. Who can provide support if I have an issue with the ZSR web service?Please contact us. Authentication and submitting requestsHow do I access the ZSR web service?Please contact us to request access to the ZSR web service. How does authentication work?Authentication is based on OpenID Connect or OAuth 2.0 using password grant.
Access token The access token response contains additional information:
The token itself is a JWT and can therefore be decoded on the JWT website. The expires_in field defines the validity period of the token in seconds. Afterwards, a new token must be retrieved. Code samples A complete c# sample shows how to access one specific API resource (numbers):
Authentication in other languages follows the same procedure. The following code snippets explain the procedure on a step-by-step basis:
What are the limits on batch requests?Batch requests are defined as involving more than 50 requests per minute for a given customer. See also the SASIS IT Service Level Agreement. Why can I only call up 500 numbers in the detail view?Requests involving the endpoints ClearingNumbers and EmployeeNumbers are limited to 500 numbers for performance reasons. The request process must be planned such that no request contains more than 500 numbers. Which status codes does the web service return?The web service uses http status codes. The following codes may be returned:
How can 503 errors be avoided?If the API is overloaded with large numbers of parallel requests, it returns 503 errors. To avoid these, it is very important to follow the instructions for loading the number list and the number details (see also How can data on ZSR and K numbers be requested via the web service?). The number of requests can be reduced further, for example, by requesting only changes via a daily change batch request (see also How can changes be requested?). When a 503 error occurs, it is advisable to wait five minutes before making another request. If possible, customers should check whether API requests can be deferred to a time slot during the night. How can 400 errors be avoided?When the client sends an invalid request to the API, it returns a 400 error. To avoid these, it is very important to follow the instructions for loading the number list and the number details (see also How can data on ZSR and K numbers be requested via the web service?). The request process must be planned such that no request contains more than 500 numbers. ZSR and K number requestsHow is the Numbers endpoint used?The Numbers endpoint delivers ZSR and K numbers that match the filter criteria. See also How can data on ZSR and K numbers be requested via the web service? What are the possible filter criteria for the Numbers endpoint?Filter criteria:
Are extended search functions available?Extended search queries with filter criteria at field level, e.g. by name and postcode, are not offered via the web service. The full version of ZSR is available for advanced search queries. For the ZSR web service filter criteria, see the section on data requests. How can data on ZSR and K numbers be requested via the web service?Data are requested in two steps. Step 1 – Loading the number list: Request all the required ZSR/K numbers via the Numbers endpoint. The filter criteria employed and user authorisations affect the search results. The Numbers endpoint delivers all ZSR/K numbers that match the filter criteria and for which the customer is authorised. It does not deliver ZSR/K numbers that have been suspended for more than ten years. Filter criteria:
Step 2 – Loading the number details: The result from step 1 is used to make a request via the appropriate detail endpoint for 500 numbers at a time. The response from the detail endpoint contains the complete number details for which the user is authorised. For performance reasons, it is important to avoid making large numbers of parallel individual requests. Endpoints:
What are subscription options?The data delivered via the web service correspond in principle to the data delivered in the backwards-compatible subscriptions. The subscription options depend on the modules to which the customer has subscribed. See Subscription options. How can the subscription options be changed?Please contact us. How is the ClearingNumbers endpoint used?The ClearingNumbers endpoint delivers details of ZSR numbers. See How can data on ZSR and K numbers be requested via the web service? How is the EmployeeNumbers endpoint used?The EmployeeNumbers endpoint delivers details of K numbers. See How can data on ZSR and K numbers be requested via the web service? How can deleted numbers be identified?If a specialist value has been delivered (with a specific ID/ZSR/K number) but is no longer contained in the response at a later point in time, it is a deleted/cancelled value. How can changes be requested?A “modified from” date can be set as a parameter via the Numbers endpoint. The response then contains only numbers that have been changed since that date. Modifications can be specialist in nature or concern purely technical values. Numbers that have been suspended or cancelled for more than ten years are not delivered via the Numbers endpoint. To find out which numbers are affected, all active numbers must first be loaded via the Numbers endpoint. Any numbers that are still active in the client system but are not contained in the results should be cancelled or deleted from the client system. Once all modified numbers have been loaded, their details can be requested in the usual way via the detail endpoints. The response from these endpoints always contains all available data on a ZSR/K number, not just the values that have been changed.
The API should always be integrated such that it works regardless of the number of changes reported, i.e. threshold values set by the customer should not cause the data import to fail. Is it possible to load only ZSR/K numbers that have been changed?Yes. The filter criterion “modifiedFrom” makes it possible to request changes by date. See also How can changes be requested? How are changes handled?
There are thus two different ways in which a change to an existing value can be delivered:
The final version of the web service will only use Option 1. For the time being, however, integration must ensure that the client systems can handle both options. Why are some entries suddenly no longer contained in the response?If an element that was previously delivered in the JSON result no longer appears, this means that is has been cancelled (incorrect data entry/correction after the fact). We recommend deleting the element from the client system. Interpreting the dataHow are ZSR number relationships delivered in the web service?
To receive all ZSR number relationships, therefore, it is essential to take account of both ClearingNumber.relatedClearingNumbers and CareProvider.ClearingNumbers
Employee relationships are delivered under clearingNumber.relatedEmployees or in the EmployeeNumbers endpoint under employeeNumber.relatedEmployers. On which data is the displayed validity period of a ZSR/K number based?The validity of a ZSR/K number is no longer defined only as a time period with a start date and an end date. It is now defined using multiple time periods (ValidityPeriods), which are delivered as a list. The list clearly shows gaps in validity. Validity periods are defined as follows:: ClearingNumber
EmployeeNumber
What must be borne in mind when multiple validity periods exist (e.g. clearingNumber.validityPeriods)?Unlike the subscription files, the web service can deliver multiple validity periods for the same element. In principle, all available validity periods should be carried over in order to maintain a complete history. If this is not possible, we recommend using the most up-to-date or most recent validity period. How can I tell the difference between a bank account and a post office account?The ZSR web service no longer distinguishes between bank and post office accounts. The field “hasPaymentOrderReferenceNumber” under ClearingNumberAccount shows whether payments using a standard Swiss payment slip are possible. Endpoint: ClearingNumbers; object: ClearingNumberAccount What do the data items “0001-01-01” and “9999-12-31” mean?The ZSR web service always delivers a start date and an end date for time periods, even if it is not possible to determine the exact dates due to the legacy data or for other reasons. Placeholder values for the start and end date are therefore used. These are to be interpreted as follows:
A time period with the start date “0001-01-01” and the end date “9999-12-31” is thus valid for any given point in time. Are technical IDs delivered?Element id The IDs delivered in the detailed response have no specialist meaning and should not be used to interpret values. They are purely technical identifiers of the delivered data and can serve to process changes (see How can changes be requested? and How are changes handled?). No logic should ever be coded to technical IDs. In addition, no technical IDs whatsoever are delivered for the main ZSR/K number record. Identification is only possible using the ZSR/K number itself. A replacement for the old paying agent ID is not delivered. Element key Master/reference data, e.g. canton, country, qualification etc., are delivered with a permanent GUID as identifier. See also Can reference data (master data) be loaded separately? Unique identification is possible using the element “key” (string) for the following entities:
Example: "key": "3fa85f64-5717-4562-b3fc-2c963f66afa6" How can dummy numbers be identified?So-called “dummy” numbers are a legacy construct. They are still in use and can be retrieved via the ZSR web service. If a value for the property "clearingNumberDummy" is delivered on the ClearingNumber object, the number in question is a dummy number. Example of structure:
How are partner type groups/sub-groups displayed in the web service?All service providers apart from doctors
Doctors The “businessScope”/”parentBusinessScope” values can be queried in the web service via the BusinessScopes endpoint: /api/v1/businessscopes. The “businessActivity” values appear as enum values in swagger.json (JSON). General information on the paying agent registerHow is a valid number constructed?The clearing number has the following structure:
The leading char of the clearing number is created and validated as follows:
Example L248519: How is a valid K number constructed?K numbers consist of a six-digit serial number followed by the letter K. |
Sv translation | ||
---|---|---|
| ||
...
The Care Provider Register API is the public API to connect customer specific solutions to the SASIS care provider register in a well structured an secured manner.
The reader of this documentation will find the API description in detail as well as further information about the access and authorization mechanisms.
Panel | ||
---|---|---|
| ||
|
Introduction
The Care Provider Register (CPR) API provides a possibility to connect enterprise systems to SASIS internal data structures to maintain and interrogate care providers and their clearing numbers.
The API is designed to replace existing file based data exchange with a high performance and secure online interface. The API itself is REST based and supports tenant specific requests which is handled based on the authentication of the API client.
The main functionality is:
- Interrogation of clearing number (ZSR/RCC/CPR number) or employee number (K-Nummer/Numéro C/Numero di controllo) overviews and details.
- Interrogation of comments on health services.
- Interrogation of filtered clearing numbers and/or employee numbers based on subscription search options.
- Maintenance of care provider certification periods (mainly used by health service certifiers).
- Interrogation of status information of asynchronous processes.
HTML |
---|
<div class="references"> |
Panel | ||
---|---|---|
| ||
HTML |
---|
</div> |
API Specification
...
title | Open API Specification |
---|
...
Open API (Swagger) Integration for Confluence | ||
---|---|---|
| ||
{"swagger":"2.0","info":{"version":"1.0","title":"Sasis Register API v1.0","description":"This is the Sasis Register API documentation.","contact":{"name":"API Support","email":"support@sasis.ch"}},"basePath":"/ApiGateway","paths":{"/api/v1/careprovidercertification":{"post":{"tags":["CareProviderCertification"],"summary":"Creates or updates care provider certification periods and health services of one specific care provider. The request must always contain the full set historicised data.","operationId":"CreateOrUpdateCareProviderCertification","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"","required":false,"schema":{"$ref":"#/definitions/CareProviderCertificationRequest"}}],"responses":{"202":{"description":"Success. The provided data has been accepted and is scheduled to be applied asynchronously."},"400":{"description":"Bad Request","schema":{"type":"object","additionalProperties":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}},"403":{"description":"Forbidden","schema":{"type":"object","additionalProperties":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/clearingnumbers":{"get":{"tags":["ClearingNumbers"],"summary":"Returns details for specific clearing numbers (ZSR/RCC/CPR). The returned data is to be specified as a list of plain clearing numbers as parameters.","operationId":"GetClearingNumbers","consumes":[],"produces":["application/json"],"parameters":[{"name":"clearingnumbers","in":"query","description":"A list of plain clearing numbers. <br />Validations:<ul><li>Max. 500 clearing numbers per request.</li></ul>","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":null,"uniqueItems":false}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberDetailViewItem"}}},"400":{"description":"Bad Request","schema":{"type":"object","additionalProperties":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/employeenumbers":{"get":{"tags":["EmployeeNumbers"],"summary":"Returns details for specific employees. The returned data is to be specified as a list of plain employee numbers (K-Nummer / Numéro C / Numero di controllo) as parameters.","operationId":"GetEmployeeNumbers","consumes":[],"produces":["application/json"],"parameters":[{"name":"employeenumbers","in":"query","description":"A list of plain employee numbers. <br />Validations:<ul><li>Max. 500 employee numbers per request.</li></ul>","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":null,"uniqueItems":false}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/EmployeeNumberDetailViewItem"}}},"400":{"description":"Bad Request","schema":{"type":"object","additionalProperties":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/healthservices/comments":{"get":{"tags":["HealthServices"],"summary":"Get all comments available on health services.","operationId":"GetHealthServiceComments","consumes":[],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/HealthServiceCommentViewItem"}}},"401":{"description":"Unauthorized"}}}},"/api/v1/numbers":{"get":{"tags":["Numbers"],"summary":"Returns a paged list of clearing numbers (ZSR/RCC/CPR) and/or employee numbers (K-Nummer / Numéro C / Numero di controllo) by subscription search options.","operationId":"SearchNumbers","consumes":[],"produces":["application/json"],"parameters":[{"name":"searchoptions","in":"query","description":"The subscription search options. <br />Validations:<ul><li>Must be at least one of the listed search options.</li></ul>","required":true,"type":"array","items":{"type":"string","enum":["Okp","Ortho","Pharma","Lea","Comp","Fit","Asca","Spak","Aptn","Emr","EmFit","Qtop","Fsafe","FGuide","FGuideK"]},"collectionFormat":"multi","default":null,"uniqueItems":false},{"name":"offset","in":"query","description":"The number of entries used as offset to retrieve the next page. The next offset it must be calculated as sum of the previously used offset and the page size (limit).<br />Validations:<ul><li>-</li></ul>","required":true,"type":"integer","format":"int32","default":null},{"name":"limit","in":"query","description":"The maximal number of entries in the next returned page. Receiving a recordCount smaller than the limit indicates that the last page has been reached.<br />Validations:<ul><li>-</li></ul>","required":true,"type":"integer","format":"int32","default":null}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/StringBulkResponse"}},"401":{"description":"Unauthorized"}}}},"/api/v1/numbers/list":{"get":{"tags":["Numbers"],"summary":"Returns basic information about clearing and/or employee numbers. The returned data is to be specified as a list of plain clearing (ZSR/RCC/CPR) and/or employee numbers (K-Nummer / Numéro C / Numero di controllo) as parameters.","operationId":"GetNumberListViewItems","consumes":[],"produces":["application/json"],"parameters":[{"name":"numbers","in":"query","description":"A list of clearing (ZSR/RCC/CPR) and/or employee numbers (K-Nummer / Numéro C / Numero di controllo). <br />Validations:<ul><li>Max. 500 employee numbers per request.</li></ul>","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":null,"uniqueItems":false}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/NumberListViewItem"}}},"400":{"description":"Bad Request","schema":{"type":"object","additionalProperties":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/processes/{proposalid}":{"get":{"tags":["Processes"],"summary":"Gets business process instance information by business process key","operationId":"GetProposal","consumes":[],"produces":["application/json"],"parameters":[{"name":"proposalid","in":"path","description":"The proposal id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ProposalProcessResponse"}},"401":{"description":"Unauthorized"}}}},"/api/v1/subscribers":{"get":{"tags":["Subscribers"],"summary":"Returns all available subscriber names.","operationId":"GetSubscribers","consumes":[],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"type":"string"}}},"401":{"description":"Unauthorized"}}}}},"definitions":{"CareProviderCertificationRequest":{"description":"The payload of a CareProviderCertification request.","required":["externalId","label"],"type":"object","properties":{"clearingNumber":{"description":"The clearing number (=ZSR-Nummer) identifying the care provider uniquely. <br />Validations:<ul><li>Clearing number check digit accoring to the documentation.</li></ul>","type":"string"},"externalId":{"description":"The identification of the care provider in the system of the API consumer. <br />Validations:<ul><li>Must contain numbers only.</li></ul>","type":"string"},"label":{"description":"Certification label.","enum":["ASCA","APTN","NVS_SPAK","ESKAMED_EMR"],"type":"string"},"careProviderHealthServices":{"description":"Health services for the care provider.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/HealthServicePeriodRequest"}},"careProviderCertificationPeriods":{"description":"Certification periods for the care provider.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CertificationPeriodRequest"}},"subscriberHealthServices":{"description":"Health services per subscriber.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/HealthServicePeriodSubscriberRequest"}},"subscriberCertificationPeriods":{"description":"Certification periods per subscriber.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CertificationPeriodSubscriberRequest"}}}},"HealthServicePeriodRequest":{"type":"object","properties":{"externalId":{"description":"The identification of the health service in the system of the API consumer. <br />Validations:<ul><li>Must contain numbers only.</li></ul>","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' must be provided.","type":"string"}}},"CertificationPeriodRequest":{"type":"object","properties":{"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' must be provided.","type":"string"}}},"HealthServicePeriodSubscriberRequest":{"required":["subscriber"],"type":"object","properties":{"subscriber":{"description":"Identification of the subscriber according to the subscribers-Endpoint.","type":"string"},"externalId":{"description":"The identification of the health service in the system of the API consumer. <br />Validations:<ul><li>Must contain numbers only.</li></ul>","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' must be provided.","type":"string"}}},"CertificationPeriodSubscriberRequest":{"type":"object","properties":{"subscriber":{"description":"Identification of the subscriber according to the subscribers-Endpoint.","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' must be provided.","type":"string"}}},"ClearingNumberDetailViewItem":{"description":"A container for one specific clearing number and its context information.","type":"object","properties":{"syncDate":{"format":"date-time","description":"Contains the clearing number modification date.","type":"string"},"version":{"type":"string"},"clearingNumber":{"$ref":"#/definitions/ClearingNumber","description":"Contains a complete data set of a single clearing number (=Zahlstelle)."}}},"ClearingNumber":{"description":"The clearing number (=ZSR-Nummer) and its full context information. Every business of a care provider has a clearing number.","type":"object","properties":{"number":{"description":"The clearing number (=ZSR-Nummer) as plain text value.","type":"string"},"clearingNumberSuffix":{"$ref":"#/definitions/ClearingNumberSuffix","description":"The ClearingNumberSuffix (=StammKanton). This can be a swiss canton or any other regional entity."},"clearingNumberCompensations":{"description":"The list of clearing number compensation types (=Entschädigungscode) valid for this clearing number.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberCompensation"}},"clearingNumberLaws":{"description":"The list of clearing number law types (=Zulassung) applicable for this clearing number.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberLaw"}},"careProviderBusiness":{"$ref":"#/definitions/CareProviderBusiness","description":"The care provider business (=Zahlstelle) this clearing number belongs to."},"clearingNumberAccounts":{"description":"The account mapping details (=Konto). Despite multiple records for each moment in time only one active account exists.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberAccount"}},"clearingNumberDummy":{"$ref":"#/definitions/ClearingNumberDummy","description":"Marks the current clearing number as a special multi-purpose number, unrelated to any care provider."},"businessScope":{"$ref":"#/definitions/BusinessScope","description":"The business scope (=PartnerartObergruppe/-Untergruppe)."},"relatedClearingNumbers":{"description":"A mapping list of related clearing numbers. For every related clearing number, the type of relation is specified.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberRelation"}},"relatedEmployees":{"description":"A mapping list of employees of the care provider business, this clearing number belongs to.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/EmployeeRelation"}},"licenses":{"description":"A list of licenses (=Zulassung KVG/VVG/UVG) provided to this clearing number.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/License"}},"tariffSystems":{"description":"A mapping list of tariff systems (=Tarif-Verträge).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberTariffSystem"}},"comments":{"description":"A list of comments regarding this clearing number.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberComment"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberSuffix":{"description":"The clearing number suffix (=StammKanton). This can be a swiss canton or any other grouping entity.","type":"object","properties":{"name":{"description":"The region name","type":"string"},"canton":{"description":"When available the name of the swiss canton.","enum":["AG","AI","AR","BS","BL","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TG","TI","UR","VS","VD","ZG","ZH"],"type":"string"},"cantonTranslations":{"$ref":"#/definitions/Translation"},"suffixNumber":{"type":"string"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberCompensation":{"description":"The mapping details for the clearing number compensation (Entschädigungscode).","type":"object","properties":{"clearingNumberCompensationType":{"description":"The clearing number compensation type.","enum":["UNKNOWN","AMB_T_GSTAT_TP","TIERS_GARANT","TIERS_PAYANT","CONTRACT_BASED_TIERS_PAYANT_OR_GARANT"],"type":"string"},"clearingNumberCompensationTypeTranslations":{"$ref":"#/definitions/Translation"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberLaw":{"description":"The clearing number law (=Zulassung).","type":"object","properties":{"clearingNumberLawType":{"description":"The clearing number law type.","enum":["KVG_VVG","PARTIAL_KVG_VVG","VVG","UVG_MV_IV"],"type":"string"},"clearingNumberLawTypeTranslations":{"$ref":"#/definitions/Translation"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderBusiness":{"description":"The care provider business (=Zahlstelle).","type":"object","properties":{"comment":{"description":"An optional comment value.","type":"string"},"isNotListedHospital":{"description":"The is not listed hospital flag (=Finanzierungsform)","type":"boolean"},"isInstitution36aKVG":{"description":"The KVG institution flag (=Einrichtung gemäss Art. 36a KVG)","type":"boolean"},"careProvider":{"$ref":"#/definitions/CareProvider","description":"The care provider (=Leistungserbringer) managing the business (=Zahlstelle)."},"careProviderBusinessParties":{"description":"The business party (=Personendaten). Despite multiple records for each moment in time only one active party exists.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderBusinessParty"}},"affiliatedCareProviderBusiness":{"$ref":"#/definitions/CareProviderBusiness","description":"Another busisness with a relation to this particular business."},"facilities":{"description":"A list of business facilities (=Einrichtung).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderBusinessFacility"}},"healthServices":{"description":"A list of health services (=Zertifizierer Methoden) mapped to this particular business. For VVG businesses of complementary medicine only.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderHealthService"}},"affiliations":{"description":"A list of affiliations (=Mitgliedschaften) mapped to this particular business.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderAffiliation"}},"clearingNumbers":{"description":"A list of clearing numbers (=ZSR-Nummern).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumber"}},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberAccount":{"description":"The mapping details for the clearing number bank account (=Konto).","type":"object","properties":{"account":{"$ref":"#/definitions/Account","description":"The bank account."},"hasPaymentOrderReferenceNumber":{"description":"Marks the current account mapping available for ESR payments.","type":"boolean"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberDummy":{"description":"The clearing number dummy (=ZSR-Nummer).","type":"object","properties":{"name":{"description":"The clearing number dummy name.","type":"string"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"BusinessScope":{"description":"The business scope devided into parent business scope (=PartnerartObergruppe) and sub business scope (=PartnerartUntergruppe).","type":"object","properties":{"name":{"description":"The business scope's name.","type":"string"},"parentBusinessScope":{"$ref":"#/definitions/BusinessScope","description":"The optional parent business scope (=PartnerartObergruppe). Available for sub business scopes only (=PartnerartUntergruppe)."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberRelation":{"description":"The mapping details for the clearing number relation (=Zugeordnete Zahlstellen, Zusätzliche Zahlstellen).","type":"object","properties":{"clearingNumber":{"description":"The related clearing number.","type":"string"},"isPublished":{"description":"The is active flag.","type":"boolean"},"clearingNumberRelationType":{"description":"The relation type (=Beziehungsart).","enum":["CHANGE_OF_REGION","CHANGE_OF_PRIMARY_BUSINESS_SCOPE","MERGER","TERMINATION_OF_ACTIVITY","CHANGE_OF_ACTIVITY","CHANGE_OF_HANDS","SECOND_CLEARING_NUMBER_INCLUSIVE_SUSPENSIONS","CHANGE_OF_SECONDARY_BUSINESS_SCOPE","COMPLEMENTARY_CARE_PROVIDER_MERGER","FITNESS_CARE_PROVIDER_MERGER","INVALID_MAPPING","MULTIPLE_LOCATIONS","MAIN_CLEARING_NUMBER","UNKNOWN"],"type":"string"},"clearingNumberRelationTypeTranslations":{"$ref":"#/definitions/Translation"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"EmployeeRelation":{"description":"The mapping details for the employee mapping (=Arbeitnehmer/Angestellte).","type":"object","properties":{"employeeNumber":{"description":"The employee number (=KNummer).","type":"string"},"isPublished":{"description":"The is active flag.","type":"boolean"},"employmentType":{"description":"The employment type (=Anstellungstyp)","enum":["REGULAR","EXECUTIVE"],"type":"string"},"license":{"$ref":"#/definitions/License","description":"The canton based license (=Zulassung)."},"employmentTypeTranslations":{"$ref":"#/definitions/Translation"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"License":{"description":"The canton based license (=Zulassung) including restrictions for this license.","type":"object","properties":{"licenseState":{"description":"The licensing state.","enum":["PENDING","APPROVED","DECLINED"],"type":"string"},"licenseStateTranslations":{"$ref":"#/definitions/Translation"},"canton":{"description":"When available the name of the swiss canton.","enum":["AG","AI","AR","BS","BL","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TG","TI","UR","VS","VD","ZG","ZH"],"type":"string"},"cantonTranslations":{"$ref":"#/definitions/Translation"},"country":{"$ref":"#/definitions/Country","description":"The country."},"licenseRestrictions":{"description":"License restrictions (=Beschränkung, Sistierung, Sperrung, Ausstand).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/LicenseRestriction"}},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberTariffSystem":{"description":"The mapping details for the tarifs system (=Tarif-Verträge, Spitallaboratorium etc.).","type":"object","properties":{"tariffSystem":{"$ref":"#/definitions/TariffSystem","description":"The tarif system."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberComment":{"description":"The clearing number specific comment.","type":"object","properties":{"commentTranslations":{"$ref":"#/definitions/Translation","description":"Comment translations."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Translation":{"type":"object","properties":{"de":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"}}},"CareProvider":{"description":"The careprovider (=Leistungserbringer).","type":"object","properties":{"comment":{"description":"An optional comment value.","type":"string"},"careProviderParties":{"description":"The care provider party (=Personendaten). Despite multiple records for each moment in time only one active party exists.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderParty"}},"healthServices":{"description":"The care provider health service mappings (=Zertifizierer Methoden). For VVG care providers of complementary medicine only. When provided by external certifiers this list might contain multiple health service mappings for the same health service, but with diverging validity periods.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderHealthService"}},"qualifications":{"description":"The care provider qualification mappings (=Qualifikationen).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderQualification"}},"affiliations":{"description":"The care provider affiliation mappings (=Mitgliedschaften)","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderAffiliation"}},"careProviderBusinesses":{"description":"The care provider businesses (=Zahlstellen). A care provider can manage multiple businesses.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderBusiness"}},"employeeNumbers":{"description":"The care provider employee number (=KNummer). For all employed OKP care providers.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/EmployeeNumber"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderBusinessParty":{"description":"The mapping details for a business party (=Personendaten). For each point in time only one active mapping should exist.","type":"object","properties":{"party":{"$ref":"#/definitions/PartyBusiness","description":"The party (=Zahlstellen-Adresse)"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderBusinessFacility":{"description":"The mapping details for a business facilities (=Einrichtungen).","type":"object","properties":{"details":{"description":"Additional information for the assigned facility, e.g. bed count (=Anzahl Betten).","type":"string"},"facility":{"$ref":"#/definitions/Facility","description":"The facility (=Einrichtung)."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderHealthService":{"description":"The mapping details for care provider health services (=Zertifizierer Methoden).","type":"object","properties":{"healthService":{"$ref":"#/definitions/HealthService","description":"The health service (=Zertifzierer Methode)."},"healthServiceCantonMandate":{"$ref":"#/definitions/HealthServiceCantonMandate"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderAffiliation":{"description":"The care provider affiliation.","type":"object","properties":{"externalId":{"description":"The care provider membership id (=Mitgliedernummer).","type":"string"},"affiliationBroker":{"description":"The affiliation broker. The institution providing the affiliation to the care provider.","enum":["TARIF_SUISSE","ASPI","PHYSIO_SWISS"],"type":"string"},"affiliationBrokerTranslations":{"$ref":"#/definitions/Translation"},"affiliation":{"$ref":"#/definitions/Affiliation","description":"The affiliation (=Verband etc.)."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Account":{"description":"The bank account.","type":"object","properties":{"ibanNumber":{"description":"The IBAN number.","type":"string"},"accountNumber":{"description":"The account number (=Kontonummer).","type":"string"},"party":{"$ref":"#/definitions/PartyBeneficiary","description":"Optionally contains the account holder (=Begünstigter) when not identical to the care provider (=Leistungserbringer)."},"bank":{"$ref":"#/definitions/Bank","description":"The account's bank."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Country":{"description":"The country (=Land).","type":"object","properties":{"name":{"description":"The country name.","type":"string"},"twoLetterCountryCode":{"description":"The ISO 3166-1 alpha-2 two letter country code.","type":"string"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"LicenseRestriction":{"description":"License restrictions (=Beschränkung, Sistierung, Sperrung, Ausstand).","type":"object","properties":{"licenseRestrictionType":{"description":"License restriction type (=Beschränkungstyp).","enum":["UNKNOWN","NINETY_DAY_REGULATION","REGION","ACTIVITY","SUSPENSION","ADMISSION_MUTATION_LOCK","OKP_EXCLUSION"],"type":"string"},"licenseRestrictionTypeTranslations":{"$ref":"#/definitions/Translation"},"licenseRestrictionReasonType":{"description":"License restriction reason type (=Beschränkungsgrund).","enum":["UNKNOWN","TERMINATION_OF_ACTIVITY","REVOCATION_OF_BA_B_LICENSE","CHANGE_OF_LOCATION","TERMINATION_BY_DEATH","CARE_PROVIDER_MERGER","CHANGE_OF_HANDS","OUT_OF_CONTRACT","CHANGE_OF_REGION","CHANGE_OF_BUSINESS_SCOPE","MISSING_CERTIFICATION","COMPLEMENTARY_CARE_PROVIDER_MERGER","UNPAYED_SERVICE_FEE"],"type":"string"},"licenseRestrictionReasonTypeTranslations":{"$ref":"#/definitions/Translation"},"reason":{"description":"Licsense restriction reason (=Beschränkungstext).","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"TariffSystem":{"description":"The tarif system.","type":"object","properties":{"tariffSystemType":{"description":"The tariff system type.","enum":["LOA","NURSING_HOME_FLAT_RATE"],"type":"string"},"tariffSystemTypeTranslations":{"$ref":"#/definitions/Translation"},"name":{"description":"The tariff name.","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderParty":{"description":"The mapping details for a care provider party (=Personendaten). For each point in time only one active mapping should exist.","type":"object","properties":{"party":{"$ref":"#/definitions/PartyCareProvider","description":"The care provider party (=Privatadresse)."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderQualification":{"description":"The mapping details for care provider qualifications (=Qualifikationen).","type":"object","properties":{"country":{"$ref":"#/definitions/Country","description":"The country (=Land) where the qualification has been attained."},"qualification":{"$ref":"#/definitions/Qualification","description":"The qualification (=Qualifikation)."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"EmployeeNumber":{"description":"The employee number (=KNummer).","type":"object","properties":{"number":{"description":"The employee number (=KNummer).","type":"string"},"careProvider":{"$ref":"#/definitions/CareProvider","description":"The care provider (=Leistungserbringer)."},"businessScope":{"$ref":"#/definitions/BusinessScope","description":"The business scope (=PartnerartObergruppe/-Untergruppe)."},"relatedEmployers":{"description":"A mapping list of employers.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/EmployerRelation"}},"licenses":{"description":"A list of licenses (=Zulassung KVG/VVG/UVG).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/License"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"PartyBusiness":{"type":"object","properties":{"globalLocationNumber":{"type":"string"},"branch":{"type":"string"},"contact":{"$ref":"#/definitions/Contact","description":"The party contact details."},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Facility":{"description":"The business facility (=Einrichtung).","type":"object","properties":{"facilityType":{"description":"The facility type.","enum":["HOSPITAL_LAB_TYPE","HOSPITAL_LAB_INFRASTRUCTURE","FITNESS_CLASSIFICATION","FITNESS_QUALITOP_FIT_SAFE","DOCTOR_FACILITY","HOSPITAL_FACILITY","NURSING_HOME_FACILITY","FITNESS_CARE_LEVEL"],"type":"string"},"facilityTypeTranslation":{"$ref":"#/definitions/Translation"},"name":{"description":"The facility name.","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"HealthService":{"description":"The certifier health service (=Zertifizierer-Methode).","type":"object","properties":{"name":{"description":"The health service name.","type":"string"},"nameTranslations":{"$ref":"#/definitions/Translation","description":"Name translations"},"externalId":{"description":"The certifier / lea health service identifier.","type":"string"},"affiliation":{"$ref":"#/definitions/Affiliation","description":"The health service affiliation, e.g. EMR, ASCA etc."},"comments":{"description":"Health service comments","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/HealthServiceComment"}},"healthServiceGroup":{"$ref":"#/definitions/HealthServiceGroup","description":"Health service group (LEA Leistungsbereich, Leistungsgruppe)"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"HealthServiceCantonMandate":{"description":"The hospital health service canton mandat (=LeaDatModellKantonEinschraenkung).","type":"object","properties":{"canton":{"enum":["AG","AI","AR","BS","BL","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TG","TI","UR","VS","VD","ZG","ZH"],"type":"string"},"name":{"type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Affiliation":{"description":"An affiliation in an organisation (=Mitgliedschaft).","type":"object","properties":{"name":{"description":"The affiliation name (=Verbandscode usf.). E.g. an organization code.","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"PartyBeneficiary":{"type":"object","properties":{"globalLocationNumber":{"type":"string"},"firm":{"type":"string"},"branch":{"type":"string"},"abbreviation":{"type":"string"},"contact":{"$ref":"#/definitions/Contact","description":"The party contact details."},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Bank":{"description":"The SIX bank details.","type":"object","properties":{"bankGroup":{"description":"The banks/financial institutions are divided into bank groups.","enum":["SNB","UBSAG","RESERVE","CREDIT_SUISSE_GROUP_AG_1","CREDIT_SUISSE_GROUP_AG_2","REGIONALBANKEN_RBA_HOLDING_AG","KANTONALBANKEN","RAIFFEISENBANKEN_EINZELINSTITUTE","POST_FINANCE"],"type":"string"},"bankGroupTranslation":{"$ref":"#/definitions/Translation"},"bankClearingType":{"description":"The bank type, e.g. head office, main branch or branch.","enum":["HEAD_QUARTERS","MAIN_BRANCH","BRANCH"],"type":"string"},"bankClearingTypeTranslations":{"$ref":"#/definitions/Translation"},"bankingClearingNumber":{"description":"Each bank/financial institution is identified by the BankingClearingNumber made up of 3 to 5 digits.","type":"string"},"bankingClearingNumberNew":{"description":"Any value here replaces the BankingClearingNumber.","type":"string"},"branchId":{"description":"Together with the BankingClearingNumber number the BranchId provides a conclusive key for each bank or financial institution record.","type":"string"},"sicNumber":{"description":"A 6-digit number only to be used by SIC and euroSIC participants.","type":"string"},"headquarterClearingNumber":{"description":"The BankingClearingNumber of the head office.","type":"string"},"shortName":{"description":"The short name of the bank or financial institution.","type":"string"},"name":{"description":"The name of the bank or financial institution","type":"string"},"postalAccountNumber":{"description":"The bank's or financial institution's postal account number.","type":"string"},"swift":{"description":"The SWIFT directory entry value.","type":"string"},"contact":{"$ref":"#/definitions/Contact","description":"The bank's or financial institution's contact details."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"PartyCareProvider":{"type":"object","properties":{"legalFormType":{"enum":["UNKNOWN","SOLE_PROPRIETORSHIP","GENERAL_PARTNERSHIP","CORPORATION","LIMITED_LIABILITY_COMPANY","COOPERATIVE","ASSOCIATION","FOUNDATION","PUBLIC_SECTOR_INSTITUTION","BRANCH","LIMITED_PARTNERSHIP","FOREIGN_BRANCH","CORPORATION_WITH_UNLIMITED_PARTNERS","AFFILIATION","LIMITED_COMPANY","NON_PROFIT_LIMITED_LIABILITY_COMPANY"],"type":"string"},"legalFormTypeTranslations":{"$ref":"#/definitions/Translation"},"organizationIdentificationNumber":{"type":"string"},"contact":{"$ref":"#/definitions/Contact","description":"The party contact details."},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Qualification":{"description":"The qualification (=Qualifikation).","type":"object","properties":{"qualificationType":{"description":"The qualification type.","enum":["DIPLOMA","CERTIFICATE","CONTINUING_EDUCATION_CERTIFICATE","EXPERTISE_AREA","SKILLS","ADMISSION","ADDITIONAL_CERTIFICATE","PROFICIENCY_TEST"],"type":"string"},"qualificationTypeTranslations":{"$ref":"#/definitions/Translation"},"name":{"description":"The qualification name.","type":"string"},"affiliation":{"$ref":"#/definitions/Affiliation","description":"The health service affiliation, e.g. FMH etc."},"businessScope":{"$ref":"#/definitions/BusinessScope","description":"The business scope (=PartnerartObergruppe/-Untergruppe)."},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"EmployerRelation":{"description":"The mapping details for the employer mapping (=Arbeitgeber).","type":"object","properties":{"clearingNumber":{"description":"The clearing number (=ZSR-Nummer).","type":"string"},"isPublished":{"description":"The is active flag.","type":"boolean"},"employmentType":{"description":"The employment type (=Anstellungstyp)","enum":["REGULAR","EXECUTIVE"],"type":"string"},"license":{"$ref":"#/definitions/License","description":"The canton based license (=Zulassung)."},"employmentTypeTranslations":{"$ref":"#/definitions/Translation"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"Contact":{"description":"The person's contact details.","type":"object","properties":{"language":{"description":"The language to be used when communicating with this person.","enum":["DE","FR","IT"],"type":"string"},"languageTranslations":{"$ref":"#/definitions/Translation"},"url":{"description":"A pointer to a relevant url, e.g. business homepage.","type":"string"},"postalAddress":{"$ref":"#/definitions/PostalAddress","description":"The postal address."},"phoneNumbers":{"description":"The phone numbers.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/PhoneNumber"}},"emailAddresses":{"description":"The email addresses.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/EmailAddress"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"HealthServiceComment":{"description":"The health service specific comment.","type":"object","properties":{"commentTranslations":{"$ref":"#/definitions/Translation","description":"Comment translations."},"isExcluded":{"description":"Whether the health service is excluded.","type":"boolean"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"HealthServiceGroup":{"description":"The health service group (=LEA-Leistungsbereich/-Leistungsgruppe).","type":"object","properties":{"externalId":{"description":"Health service group external id (LEA-Leistungsbereich/-Leistungsgruppe abbreviation)","type":"string"},"parentExternalId":{"description":"The parent health service group external id (LEA-Leistungsbereich abbreviation)","type":"string"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"PostalAddress":{"description":"The postal address (=Postadresse).","type":"object","properties":{"postOfficeBoxText":{"description":"Post office box text.","type":"string"},"postOfficeBoxNumber":{"format":"int32","description":"Post office box number.","type":"integer"},"street":{"description":"The street with street number (=Strasse).","type":"string"},"addressAddition":{"description":"The address addition (=Adresszusatz).","type":"string"},"place":{"description":"The place/city (=Ort).","type":"string"},"postalCode":{"description":"The postal code, national and international (=PLZ).","type":"string"},"country":{"$ref":"#/definitions/Country","description":"The country."},"canton":{"description":"When available the name of the swiss canton.","enum":["AG","AI","AR","BS","BL","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TG","TI","UR","VS","VD","ZG","ZH"],"type":"string"},"cantonTranslations":{"$ref":"#/definitions/Translation"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"PhoneNumber":{"description":"The phone number.","type":"object","properties":{"phoneNumberType":{"description":"The phone number type.","enum":["LANDLINE","MOBILE","FAX"],"type":"string"},"phoneNumberTypeTranslations":{"$ref":"#/definitions/Translation"},"number":{"description":"The phone number, formatted as E.164.","type":"string"},"country":{"$ref":"#/definitions/Country","description":"The phone number country."},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"EmailAddress":{"description":"The email address.","type":"object","properties":{"email":{"description":"The email address.","type":"string"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"EmployeeNumberDetailViewItem":{"description":"A container for one specific employee number and its context information.","type":"object","properties":{"syncDate":{"format":"date-time","description":"Contains the employee number modification date.","type":"string"},"version":{"type":"string"},"employeeNumber":{"$ref":"#/definitions/EmployeeNumber","description":"Contains a complete data set of a single employee number (=KNummer)."}}},"HealthServiceCommentViewItem":{"description":"One specific comment entry on a health service.","type":"object","properties":{"healthServiceId":{"format":"int64","description":"The internal health service id.","type":"integer"},"healthServiceExternalId":{"description":"The identification of the health service in the system of the API consumer as provided with the CareProviderCertification endpoint.","type":"string"},"certifier":{"description":"The certifier name.","type":"string"},"healthServiceTranslations":{"$ref":"#/definitions/Translation","description":"The health service name in different languages."},"commentTranslations":{"$ref":"#/definitions/Translation","description":"The health service comment in different languages."},"isExcluded":{"description":"Marks a health service as excluded/unsupported by an insurer.","type":"boolean"},"startDate":{"format":"date-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is used.","type":"string"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"StringBulkResponse":{"description":"A response container for a list of string values.","type":"object","properties":{"tookInMs":{"format":"int32","description":"Request processing time in milliseconds.","type":"integer"},"totalCount":{"format":"int32","description":"Overall, paging-independently count of entries according to the specified parameters.","type":"integer"},"recordCount":{"format":"int32","description":"Number of records in the current page.","type":"integer","readOnly":true},"offset":{"format":"int32","description":"The applied offset value.","type":"integer"},"limit":{"format":"int32","description":"The applied limit value.","type":"integer"},"records":{"description":"The records of the current page.","uniqueItems":false,"type":"array","items":{"type":"string"}}}},"NumberListViewItem":{"description":"A response container for a list of consolidated basic number (clearing or employee number) information.","type":"object","properties":{"syncDate":{"format":"date-time","description":"Contains the employee number modification date.","type":"string"},"number":{"description":"The number (clearing or employee number) itself.","type":"string"},"globalLocationNumber":{"description":"Global location number (=EANNummer).","type":"string"},"organizationIdentificationNumber":{"description":"Organization identification number (=UID-Nummer/IDE/IDI).","type":"string"},"firm":{"description":"The firm (=Firma).","type":"string"},"branch":{"description":"The branch name (=Zweigstelle).","type":"string"},"givenName":{"description":"Given name / first name (=Vorname).","type":"string"},"callName":{"description":"Call name (=Rufname).","type":"string"},"familyName":{"description":"Family name / last name (=Nachname).","type":"string"},"originalName":{"description":"Orginal name (=Ledigenname).","type":"string"},"postalCode":{"description":"The postal code, national and international (=PLZ).","type":"string"},"place":{"description":"The place/city (=Ort).","type":"string"},"street":{"description":"The street with street number (=Strasse).","type":"string"},"phoneNumber":{"description":"An E.164 phone number.","type":"string"},"isValid":{"description":"Is true, if the instance was valid at the requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"boolean"},"detailViewItemUrl":{"description":"Resource URL to retrieve further details regarding this number.","type":"string"},"clearingNumberSuffixTwoLetterCantonCode":{"type":"string"},"clearingNumberSuffixTranslations":{"$ref":"#/definitions/Translation"}}},"ProposalProcessResponse":{"type":"object","properties":{"id":{"format":"int64","type":"integer"},"businessKey":{"type":"string"},"typeName":{"type":"string"},"version":{"type":"string"},"processInstanceId":{"type":"string"},"processState":{"type":"string"},"processInformation":{"type":"string"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"proposalResponse":{"$ref":"#/definitions/ProposalResponse","description":"The proposal"},"errors":{"description":"The proposal errors","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ProposalError"}}}},"ProposalResponse":{"type":"object","properties":{}},"ProposalError":{"type":"object","properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"}}}},"securityDefinitions":{"Bearer":{"name":"Authorization","in":"header","type":"apiKey","description":"JWT Authorization header using the Bearer scheme. Example:\"Authorization:Bearer {token}\""}},"security":[{"Bearer":[]}]}
|
Status codes
The SASIS Register API uses standard http status codes.
The following status codes will generally be used by the API:
...
Referenced Algorithms
Clearing number check digit
Panel |
---|
The clearing number has the following structure:
The leading char of the clearing number is created and validated as follows:
Example L248519: |
UID ECH0097 check digit
Panel |
---|
The ECH0097 enterprise identification number (Unternehmensidentifikationsnummer UID, Numéro d’identification des entreprises IDE, Numero d’identificazione delle imprese IDI) has the following structure:
The check digit is created and validated as follows:
Example CHE-114.617.288: |
Authentication / Autorisation
The authentication is based on OpenID Connect, an identity layer on top of OAuth 2.0 and its corresponding flows/grants. For application integration, the resource owner password flow using the OAuth 2.0 password grant is to be used.
The SASIS IAM infrastructure acts a OpenID provider / authorization server.
- The API Client requests the token endpoint from the auth server.
- The token endpoint is returned to the API Client.
- Request an access token from the auth server by providing the following post request parameters:
- grant_type: set to 'password'
- client_id: provided individually by SASIS
- client_secret: provided individually by SASIS
- username: provided individually by SASIS
- password: provided individually by SASIS
- scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
- The access token as well as the refresh token is returned to the API Client.
- The specific API resource is called providing the access token in as bearer in the Authorization http header:
'Authorization: Bearer <access token>'
- The API responds to the request.
- Once the access token expired, the previously received refresh token is used to request a new access token from the auth server by providing the following parameters:
- grant_type: set to 'refresh_token'
- client_id: provided individually by SASIS
- client_secret: provided individually by SASIS
- scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
- refresh_token: The refresh token received with the last access token.
- A new access token as well as a new refresh token is returned to the API Client.
- The specific API resource is called providing the new access token in as bearer in the Authorization http header:
'Authorization: Bearer <access token>'
- The API responds to the request.
...
- The API Client requests the token endpoint from the auth server.
- The token endpoint is returned to the API Client.
- Request an access token from the auth server by providing the following post request parameters:
- grant_type: set to 'password'
- client_id: provided individually by SASIS
- client_secret: provided individually by SASIS
- username: provided individually by SASIS
- password: provided individually by SASIS
- scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
- The access token as well as the refresh token is returned to the API Client.
- The specific API resource is called providing the access token in as bearer in the Authorization http header:
'Authorization: Bearer <access token>'
- The API responds to the request.
- Once the access token expired, the previously received refresh token is used to request a new access token from the auth server by providing the following parameters:
- grant_type: set to 'refresh_token'
- client_id: provided individually by SASIS
- client_secret: provided individually by SASIS
- scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
- refresh_token: The refresh token received with the last access token.
- A new access token as well as a new refresh token is returned to the API Client.
- The specific API resource is called providing the new access token in as bearer in the Authorization http header:
'Authorization: Bearer <access token>'
- The API responds to the request.
Access token
The access token response contains additional information:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"access_token": "MTQ0NjOkZmQ5OTM5NDE9ZTZjNGZmZjI3",
"refresh_token": "GEbRxBNZmQOTM0NjOkZ5NDE9ZedjnXbL",
"token_type": "bearer",
"expires_in": 300,
"scope": "openid profile email offline_access roles c1s_profile cpr"
} |
The token itself is a JWT and can therefore be decoded on the JWT website.
The expires_in field defines the validity period of the token in seconds. Afterwards, a new token must be retrieved.
Code samples
A complete c# sample shows how to access one specific API resource (numbers):
HTML |
---|
<div class="references"> |
HTML |
---|
</div> |
Authentication in other languages follows the same procedure.
The following code snippets explain the procedure on a step-by-step basis:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
/// <summary>
/// Loads the IAM configuration.
/// </summary>
private async Task<DiscoveryResponse> GetDiscoveryDocumentAsync(CancellationToken ct)
{
using (var client = new HttpClient())
{
var discoveryResponse = await client.GetDiscoveryDocumentAsync(new DiscoveryDocumentRequest
{
Address = "[AuthorityUrl]"
}, ct).ConfigureAwait(false);
if (discoveryResponse.IsError)
throw new Exception(discoveryResponse.Error);
return discoveryResponse;
}
} |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
/// <summary>
/// Gets a new token response with a username and password.
/// </summary>
private async Task<TokenResponse> RequestTokenAsync(CancellationToken ct)
{
using (var client = new HttpClient())
{
var discoveryResponse = await GetDiscoveryDocumentAsync(ct).ConfigureAwait(false);
var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest
{
ClientId = "[ClientId]",
ClientSecret = "[ClientSecret]",
UserName = "[UserName]",
Password = "[Password]",
Address = discoveryResponse.TokenEndpoint,
GrantType = OidcConstants.GrantTypes.Password,
Scope = string.Join(" ", _scopes),
}, ct).ConfigureAwait(false);
if (tokenResponse.IsError)
throw new Exception(tokenResponse.Error);
return tokenResponse;
}
} |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
/// <summary>
/// Gets the access token by either requesting a new token or by using the refresh token of an already existing token.
/// </summary>
private async Task<string> GetAccessTokenAsync(CancellationToken ct)
{
if (_tokenResponse == null)
{
// Creates a new token response
_tokenResponse = await RequestTokenAsync(ct).ConfigureAwait(false);
}
else
{
var jwtSecurityTokenHandler = new JwtSecurityTokenHandler();
// Parses JWT access token
var jwtSecurityToken = jwtSecurityTokenHandler.ReadToken(_tokenResponse.AccessToken) as JwtSecurityToken;
// The access token might be valid now, but expired the very next millisecond.
// Thus, add a reasonable reserve in minutes for the validity time comparison below.
var comparisionCorrectionInMinutes = 1;
// Compares the access token life time with the current time, modified by the comparison correction value.
if (jwtSecurityToken.ValidTo < DateTime.UtcNow.AddMinutes(comparisionCorrectionInMinutes))
{
// Updates the existing token response
_tokenResponse = await RefreshTokenAsync(_tokenResponse.RefreshToken, ct).ConfigureAwait(false);
}
}
return _tokenResponse.AccessToken;
}
/// <summary>
/// Gets an updated token response by using a refresh token.
/// </summary>
private async Task<TokenResponse> RefreshTokenAsync(string refreshToken, CancellationToken ct)
{
using (var client = new HttpClient())
{
var discoveryResponse = await GetDiscoveryDocumentAsync(ct).ConfigureAwait(false);
var tokenResponse = await client.RequestTokenAsync(new TokenRequest
{
ClientId = "[ClientId]",
ClientSecret = "[ClientSecret]",
Address = discoveryResponse.TokenEndpoint,
ClientCredentialStyle = ClientCredentialStyle.AuthorizationHeader,
GrantType = OidcConstants.GrantTypes.RefreshToken,
Parameters =
{
{ "refresh_token", refreshToken },
{ "scope", string.Join(" ", _scopes) }
}
});
if (tokenResponse.IsError)
throw new Exception(tokenResponse.Error);
return tokenResponse;
}
}
|
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
/// <summary>
/// A simple CPR API number search request.
/// </summary>
private async Task<BulkResponse> CprApiSampleRequestAsync(string accessToken, CancellationToken ct)
{
BulkResponse bulkResponse = new BulkResponse();
using (var client = new HttpClient())
{
client.SetBearerToken(accessToken);
var response = await client.GetAsync($"https://[CprBaseUrl]/ApiGateway/api/v1/numbers?searchOptions=Okp&offset=0&limit=10", ct).ConfigureAwait(false);
if (!response.IsSuccessStatusCode)
throw new Exception("There was a problem with the request");
string content = await response.Content.ReadAsStringAsync();
if (content != null && content.Length > 0)
{
bulkResponse = JsonConvert.DeserializeObject<BulkResponse>(content);
}
}
return bulkResponse;
} |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
var accessToken = await GetAccessTokenAsync(ct).ConfigureAwait(false);
var cprApiResponse = await CprApiSampleRequestAsync(accessToken, ct).ConfigureAwait(false); |
Connection Settings
...