Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Release Information1.0.2
Target audienceThis documentation is intended for developers and system integrators which enable customer systems for interaction with the SASIS CPR API.
Summary

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
titleContent

Table of Contents

Authentication / Authorisation

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.

draw.io DiagrambordertrueviewerToolbartruefitWindowfalsediagramNameapi_access_sequencesimpleViewerfalsewidth400diagramWidth676revision2
  1. The API Client requests the token endpoint from the auth server.
  2. The token endpoint is returned to the API Client.
  3. Request an access token from the auth server by providing the following post request parameters:
    1. grant_type: set to 'password'
    2. client_id: provided individually by SASIS
    3. client_secret: provided individually by SASIS
    4. username: provided individually by SASIS
    5. password: provided individually by SASIS
    6. scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
  4. The access token as well as the refresh token is returned to the API Client.
  5. The specific API resource is called providing the access token in as bearer in the Authorization http header:
    'Authorization: Bearer <access token>'
  6. The API responds to the request.
  7. 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:
    1. grant_type: set to 'refresh_token'
    2. client_id: provided individually by SASIS
    3. client_secret: provided individually by SASIS
    4. scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
    5. refresh_token: The refresh token received with the last access token.
  8. A new access token as well as a new refresh token is returned to the API Client.
  9. The specific API resource is called providing the new access token in as bearer in the Authorization http header:
    'Authorization: Bearer <access token>'
  10. The API responds to the request.
HTML
<div class="references">
Panel
titleLinks

https://www.zsrnext.ch/ApiGateway/swagger/index.html

https://openid.net/connect/

https://oauth.net/2/

HTML
</div>


Introduction

The Care Provider Register (CPR) API provides a possibility to connect enterprise systems to SASIS internal data structures regarding 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.

API Specification

Expand
titleOpen API Specification


Panel


Open API (Swagger) Integration for Confluence
docExpansionfull
{"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.","

Access token

The access token response contains additional information:

Code Block
languagejava
titleAccess token response
{
  "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">

CprApiAccessSample.zip

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
languagec#
themeConfluence
title1./2. Retrieve the auth servers token endpoint
collapsetrue
        /// <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
languagec#
themeConfluence
title3./4. Request access and refresh token
collapsetrue
        /// <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
languagec#
themeConfluence
title7./8. Token refresh strategy based validity of cached token response and request new access token
collapsetrue
        /// <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
languagec#
themeConfluence
title5./6./9./10. API resource call using the access token in the Authorization http header
collapsetrue
        /// <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
languagec#
themeConfluence
titlePlain API Call (putting everything together)
collapsetrue
        var accessToken = await GetAccessTokenAsync(ct).ConfigureAwait(false);

        var cprApiResponse = await CprApiSampleRequestAsync(accessToken, ct).ConfigureAwait(false);

Connection Settings

SettingTest EnvironmentLive EnvironmentAuthorityUrlhttps://sas-auth.itsense.chhttps://openid.santesuisse.comCprBaseUrlhttps://stagecurrent.zsrnext.ch/https://www.zsrnext.chClientId1)1)ClientSecret1)1)UserName1)1)Password1)1)

1) To be provided individually by SASIS. Please contact: support@sasis.ch

API Specification

Expand
titleOpen API Specification
Panel
Open API (Swagger) Integration for Confluence
docExpansionfull
{"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/HealthServiceCommentViewItemCareProviderBusinessParty"}}},"401affiliatedCareProviderBusiness":{"description$ref":"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#/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":{"type$ref":"string"#/definitions/CareProviderHealthService"}},"enumaffiliations":[{"Okpdescription","Ortho:"A list of affiliations (=Mitgliedschaften) mapped to this particular business.","PharmauniqueItems":false,"Leatype",:"Comparray","Fititems",:{"Asca$ref","Spak":"#/definitions/CareProviderAffiliation"}},"AptnclearingNumbers",:{"Emrdescription","EmFit:"A list of clearing numbers (=ZSR-Nummern).","QtopuniqueItems":false,"Fsafetype",:"FGuidearray","FGuideK"]},"collectionFormat":"multi","default":null,"uniqueItems":false},{"name":"offset","in":"queryitems":{"$ref":"#/definitions/ClearingNumber"}},"startDate":{"format":"date-time","description":"TheDate number of entriesthe usedvalidity asstart 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"(=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":{"format":"date-time","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>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"},"externalIdisValid":{"description":"TheIs identificationtrue, ofif the instance carewas providervalid inat the system of the API consumer. <br />Validations:<ul><li>Must contain numbers only.</li></ul>requested validityDate. If no specific validityDate was specified, then the current date (now) is evaluated (=fachliche Gültigkeit zum Zeitpunkt des übergebenen Stichdatums).","type":"stringboolean"},"labelid":{"descriptionformat":"Certification label.int64","enumdescription":["ASCA"Unique identifier of the instance.","APTN","NVS_SPAK","ESKAMED_EMR"],"type":"stringinteger"}}},"careProviderHealthServicesClearingNumberRelation":{"description":"HealthThe servicesmapping details for the care provider clearing number relation (=Zugeordnete Zahlstellen, Zusätzliche Zahlstellen).","uniqueItems":false,"type":"arrayobject","itemsproperties":{"$ref":"#/definitions/HealthServicePeriodRequest"}},"careProviderCertificationPeriodsclearingNumber":{"description":"CertificationThe periodsrelated for the care providerclearing number.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CertificationPeriodRequest"}},"subscriberHealthServicesstring"},"isPublished":{"description":"HealthThe servicesis peractive subscriberflag.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/HealthServicePeriodSubscriberRequest"}},"subscriberCertificationPeriodsboolean"},"clearingNumberRelationType":{"description":"CertificationThe periodsrelation per subscribertype (=Beziehungsart).","uniqueItemsenum":false,"type":"array["CHANGE_OF_REGION","CHANGE_OF_PRIMARY_BUSINESS_SCOPE","itemsMERGER":{"$ref":"#/definitions/CertificationPeriodSubscriberRequest"}}}},"HealthServicePeriodRequest":{"type":"object","properties":{"externalId":{,"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":"TheUnique identificationidentifier of the health service in the system of the API consumer. <br />Validations:<ul><li>Must contain numbers only.</li></ul>instance.","type":"stringinteger"}}},"startDateEmployeeRelation":{"format":"date-time","description":"Date ofThe mapping details for the validityemployee startmapping (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified dayArbeitnehmer/Angestellte).","type":"stringobject"},"endDateproperties":{"formatemployeeNumber":"date-time","{"description":"DateThe ofemployee the validitynumber 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 providedKNummer).","type":"string"}}},"CertificationPeriodRequestisPublished":{"typedescription":"objectThe is active flag.","propertiestype":{"startDate"boolean"},"employmentType":{"formatdescription":"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' mustis be providedused.","type":"string"}}},"HealthServicePeriodSubscriberRequestisValid":{"requireddescription":["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>"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":"stringboolean"},"startDateid":{"format":"date-timeint64","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning Unique identifier of the specified dayinstance.","type":"stringinteger"}}},"endDateLicense":{"format":"date-time","description":"DateThe ofcanton thebased validity endlicense (=fachliches EnddatumZulassung). Timeincluding informationrestrictions willfor bethis 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."license.","type":"object","properties":{"licenseState":{"description":"The licensing state.","enum":["PENDING","APPROVED","DECLINED"],"type":"string"}}},"CertificationPeriodSubscriberRequestlicenseStateTranslations":{"type$ref":"object#/definitions/Translation"},"properties":{"subscriber"canton":{"description":"IdentificationWhen ofavailable the subscribername accordingof tothe theswiss subscribers-Endpointcanton.","typeenum":"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."["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"},"endDate"cantonTranslations":{"$ref":"#/definitions/Translation"},"country":{"format$ref":"date-time#/definitions/Country","description":"Date of the validity end (=fachliches Enddatum). Time information 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' mustis be providedused.","type":"string"}}},"ClearingNumberDetailViewItemisValid":{"description":"AIs containertrue, forif one specific clearing number and its context informationthe 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":"objectboolean"},"propertiesid":{"syncDate":{"format":"date-timeint64","description":"ContainsUnique theidentifier clearingof numberthe modification dateinstance.","type":"stringinteger"}}},"versionClearingNumberTariffSystem":{"description":"The mapping details for the tarifs system (=Tarif-Verträge, Spitallaboratorium etc.).","type":"stringobject"},"properties":{"clearingNumbertariffSystem":{"$ref":"#/definitions/ClearingNumberTariffSystem","description":"ContainsThe a complete data set of a single clearing number (=Zahlstelle)tarif system."}}},"ClearingNumberstartDate":{"descriptionformat":"The clearing number (=ZSR-Nummer) and its full context information. Every business of a care provider has a clearing numberdate-time","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"objectstring"},"propertiesendDate":{"numberformat":{"date-time","description":"The clearing numberDate of the validity end (=ZSR-Nummer) as plain text valuefachliches 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"},"clearingNumberSuffixisValid":{"$ref":"#/definitions/ClearingNumberSuffix","description":"TheIs 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"}},"clearingNumberLawstrue, 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 list of clearing number law types (=Zulassung) applicable for this clearing numberspecific comment.","uniqueItemstype":false"object","typeproperties":{"arraycommentTranslations","items":{"$ref":"#/definitions/ClearingNumberLawTranslation"}},"careProviderBusinessdescription":{"$ref":"#/definitions/CareProviderBusiness","description":"The care provider business (=Zahlstelle) this clearing number belongs to."},"clearingNumberAccounts":{Comment translations."},"startDate":{"format":"date-time","description":"TheDate of accountthe mappingvalidity detailsstart (=Kontofachliches Startdatum). DespiteTime information multiplewill recordsbe forignored. eachValidity momentstarts inat timethe onlybeginning oneof activethe accountspecified existsday.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumberAccount"}},"clearingNumberDummystring"},"endDate":{"$refformat":"#/definitions/ClearingNumberDummydate-time","description":"MarksDate of 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)."},"relatedClearingNumbersvalidity 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":"A mapping list of related clearing numbers. For every related clearing number, the type of relation is specified.","uniqueItems":falseIs 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":"arrayboolean"},"itemsid":{"$refformat":"#/definitions/ClearingNumberRelation"}}int64","relatedEmployees":{"description":"AUnique mappingidentifier list of employees of the care provider business, this clearing number belongs tothe instance.","uniqueItems":false,"type":"arrayinteger"}}},"itemsTranslation":{"$reftype":"#/definitions/EmployeeRelation"}},"licensesobject","properties":{"de":{"descriptiontype":"A list of licenses (=Zulassung KVG/VVG/UVG) provided to this clearing number.","uniqueItems":false,string"},"fr":{"type":"arraystring"},"itemsit":{"$reftype":"#/definitions/Licensestring"}}},"tariffSystemsCareProvider":{"description":"A mapping list of tariff systems (=Tarif-Verträge).","uniqueItems":falseThe careprovider (=Leistungserbringer).","type":"arrayobject","itemsproperties":{"$ref":"#/definitions/ClearingNumberTariffSystem"}},"comments"comment":{"description":"AAn listoptional of comments regarding this clearing number.","uniqueItems":falsecomment value.","type":"arraystring","items":{"$ref":"#/definitions/ClearingNumberComment"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberSuffix"},"careProviderParties":{"description":"The clearingcare numberprovider suffixparty (=StammKantonPersonendaten). This can be a swiss canton or any other grouping entityDespite multiple records for each moment in time only one active party exists.","typeuniqueItems":"object"false,"propertiestype":{"namearray":{,"descriptionitems":{"The region name","type":"string"$ref":"#/definitions/CareProviderParty"}},"cantonhealthServices":{"description":"When available the nameThe care provider health service mappings (=Zertifizierer Methoden). For VVG care providers of thecomplementary swissmedicine 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"},"cantonTranslationsonly. 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/TranslationCareProviderBusiness"}},"suffixNumberemployeeNumbers":{"description":"The care provider employee number (=KNummer). For all employed OKP care providers.","uniqueItems":false,"type":"stringarray","items":{"$ref":"#/definitions/EmployeeNumber"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"ClearingNumberCompensationCareProviderBusinessParty":{"description":"The mapping details for thea clearingbusiness number compensationparty (Entschädigungscode).=Personendaten). For each point in time only one active mapping should exist.","type":"object","properties":{"clearingNumberCompensationTypeparty":{"description$ref":"The clearing number compensation type.#/definitions/PartyBusiness","enumdescription":["UNKNOWN","AMB_T_GSTAT_TP","TIERS_GARANT","TIERS_PAYANT","CONTRACT_BASED_TIERS_PAYANT_OR_GARANT"],"type":"string"},"clearingNumberCompensationTypeTranslations":{"$ref":"#/definitions/Translation"},""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"}}},"ClearingNumberLawCareProviderBusinessFacility":{"description":"The clearing number law mapping details for a business facilities (=ZulassungEinrichtungen).","type":"object","properties":{"clearingNumberLawTypedetails":{"description":"The clearing number law type.","enum":["KVG_VVG","PARTIAL_KVG_VVG","VVG","UVG_MV_IV"],"Additional information for the assigned facility, e.g. bed count (=Anzahl Betten).","type":"string"},"clearingNumberLawTypeTranslationsfacility":{"$ref":"#/definitions/TranslationFacility"},"startDatedescription":{"format":""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"}}},"CareProviderBusinessCareProviderHealthService":{"description":"The mapping details for care provider businesshealth services (=ZahlstelleZertifizierer Methoden).","type":"object","properties":{"commenthealthService":{"description$ref":"An optional comment value.","type":"string"},"isNotListedHospital":{"#/definitions/HealthService","description":"The ishealth not listed hospital flag service (=FinanzierungsformZertifzierer Methode)."},"healthServiceCantonMandate":{"type$ref":"boolean#/definitions/HealthServiceCantonMandate"},"isInstitution36aKVGstartDate":{"format":"date-time","description":"TheDate of KVGthe institutionvalidity flagstart (=Einrichtung gemäss Art. 36a KVG)fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"booleanstring"},"careProviderendDate":{"$refformat":"#/definitions/CareProviderdate-time","description":"TheDate careof providerthe validity end (=Leistungserbringer) managing the business (=Zahlstelle)."},"careProviderBusinessPartiesfachliches 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":"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."},"facilitiesIs 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":"AThe listcare ofprovider businessmembership facilitiesid (=EinrichtungMitgliedernummer).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderBusinessFacility"}string"},"healthServicesaffiliationBroker":{"description":"AThe listaffiliation ofbroker. healthThe servicesinstitution (=Zertifizierer Methoden) mappedproviding the affiliation to thisthe particularcare business. For VVG businesses of complementary medicine only.provider.","uniqueItemsenum":false,"type":"array["TARIF_SUISSE","ASPI","items":{"$refPHYSIO_SWISS"],"type":"#/definitions/CareProviderHealthServicestring"}},"affiliationsaffiliationBrokerTranslations":{"description$ref":"A list of affiliations (=Mitgliedschaften) mapped to this particular business.","uniqueItems":false,"type":"array","items":#/definitions/Translation"},"affiliation":{"$ref":"#/definitions/CareProviderAffiliationAffiliation"}},"clearingNumbers":{"description":"AThe list of clearing numbers (=ZSR-Nummern).","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ClearingNumber"}}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"}}},"ClearingNumberAccountAccount":{"description":"The mapping details for the clearing number bank account (=Konto).","type":"object","properties":{"accountibanNumber":{"$refdescription":"#/definitions/AccountThe IBAN number.","descriptiontype":"The bank account.string"},"hasPaymentOrderReferenceNumberaccountNumber":{"description":"MarksThe theaccount current account mapping available for ESR payments.","type":"booleannumber (=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"}}},"ClearingNumberDummyCountry":{"description":"The clearingcountry number dummy (=ZSR-NummerLand).","type":"object","properties":{"name":{"description":"The country name.","type":"string"},"twoLetterCountryCode":{"description":"The clearing number dummy name ISO 3166-1 alpha-2 two letter country code.","type":"string"},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"BusinessScopeLicenseRestriction":{"description":"TheLicense business scope devided into parent business scope (=PartnerartObergruppe) and sub business scope (=PartnerartUntergruppe)restrictions (=Beschränkung, Sistierung, Sperrung, Ausstand).","type":"object","properties":{"namelicenseRestrictionType":{"description":"TheLicense businessrestriction scope's name.","type (=Beschränkungstyp).","enum":["UNKNOWN","NINETY_DAY_REGULATION","REGION","ACTIVITY","SUSPENSION","ADMISSION_MUTATION_LOCK","OKP_EXCLUSION"],"type":"string"},"parentBusinessScopelicenseRestrictionTypeTranslations":{"$ref":"#/definitions/BusinessScopeTranslation"},"licenseRestrictionReasonType":{"description":"TheLicense optionalrestriction parentreason businesstype scope (=PartnerartObergruppeBeschränkungsgrund). Available for sub business scopes only (=PartnerartUntergruppe)."},"startDateenum":{"format":"date-time","description":"Date of the validity start ["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"}}},"ClearingNumberRelationTariffSystem":{"description":"The mapping details for the clearing number relation (=Zugeordnete Zahlstellen, Zusätzliche Zahlstellen).","tarif system.","type":"object","properties":{"clearingNumbertariffSystemType":{"description":"The relatedtariff clearingsystem number."type.","enum":["LOA","NURSING_HOME_FLAT_RATE"],"type":"string"},"isPublished"tariffSystemTypeTranslations":{"$ref":"#/definitions/Translation"},"name":{"description":"The istariff active flagname.","type":"booleanstring"},"clearingNumberRelationTypestartDate":{"format":"date-time","description":"The relation typeDate of the validity start (=Beziehungsart)fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","enumtype":["CHANGE_OF_REGIONstring"},"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"],"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"},"clearingNumberRelationTypeTranslationsisValid":{"$ref":"#/definitions/Translationdescription":"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"}}},"EmployeeRelationCareProviderParty":{"description":"The mapping details for a thecare employeeprovider mappingparty (=Arbeitnehmer/Angestellte).Personendaten). For each point in time only one active mapping should exist.","type":"object","properties":{"employeeNumberparty":{"$ref":"#/definitions/PartyCareProvider","description":"The care employeeprovider numberparty (=KNummerPrivatadresse)."},"typestartDate":{"stringformat"},"isPublished":{:"date-time","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). 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"}}},"LicenseCareProviderQualification":{"description":"The canton based license mapping details for care provider qualifications (=Zulassung) including restrictions for this license.Qualifikationen).","type":"object","properties":{"licenseStatecountry":{"$ref":"#/definitions/Country","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"]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"},"cantonTranslationsisValid":{"$refdescription":"#/definitions/Translation"},"country":{"$ref":"#/definitions/CountryIs 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":"The country."Unique identifier of the instance.","type":"integer"}}},"licenseRestrictionsEmployeeNumber":{"description":"LicenseThe employee restrictionsnumber (=Beschränkung, Sistierung, Sperrung, AusstandKNummer).","uniqueItemstype":false"object","typeproperties":{"arraynumber",:{"itemsdescription":{"$ref"The employee number (=KNummer).","type":"#/definitions/LicenseRestrictionstring"}},"startDatecareProvider":{"format$ref":"date-time#/definitions/CareProvider","description":"DateThe ofcare theprovider validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"Leistungserbringer)."},"endDatebusinessScope":{"format$ref":"date-time#/definitions/BusinessScope","description":"DateThe ofbusiness thescope 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."PartnerartObergruppe/-Untergruppe)."},"relatedEmployers":{"description":"A mapping list of employers.","uniqueItems":false,"type":"stringarray"},"isValiditems":{"description$ref":"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"}#/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"}}},"ClearingNumberTariffSystemPartyBusiness":{"descriptiontype":"The mapping details for the tarifs system (=Tarif-Verträge, Spitallaboratorium etc.).",object","properties":{"globalLocationNumber":{"type":"objectstring"},"propertiesbranch":{"tariffSystemtype":"string"},"contact":{"$ref":"#/definitions/TariffSystemContact","description":"The party tarifcontact systemdetails."},"startDateid":{"format":"date-timeint64","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning Unique identifier of the specified dayinstance.","type":"stringinteger"}}},"endDateFacility":{"format":"date-time","description":"DateThe of the validity endbusiness facility (=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.Einrichtung).","type":"stringobject"},"isValidproperties":{"facilityType":{"description":"IsThe 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."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":"integerstring"}}},"ClearingNumberComment,"facilityTypeTranslation":{"$ref":"#/definitions/Translation"},"name":{"description":"The clearing number specific commentfacility name.","type":"objectstring"},"propertiesstartDate":{"commentTranslationsformat":{"$ref":"#/definitions/Translation","description":"Comment translations."},"startDate":{"format":"date"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"}}},"TranslationHealthService":{"description":"The certifier health service (=Zertifizierer-Methode).","type":"object","properties":{"dename":{"description":"The health service name.","type":"string"},"frnameTranslations":{"type$ref":"string#/definitions/Translation"},"itdescription":{"type":"string"}}},"CareProvider"Name translations"},"externalId":{"description":"The careprovider (=Leistungserbringer)certifier / lea health service identifier.","type":"objectstring"},"propertiesaffiliation":{"comment$ref":{"#/definitions/Affiliation","description":"AnThe health optionalservice comment value.","type":"string"affiliation, e.g. EMR, ASCA etc."},"careProviderPartiescomments":{"description":"TheHealth care provider party (=Personendaten). Despite multiple records for each moment in time only one active party exists.","service comments","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderPartyHealthServiceComment"}},"healthServiceshealthServiceGroup":{"$ref":"#/definitions/HealthServiceGroup","description":"The care provider health Health service mappingsgroup (=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"}},"affiliationsLEA 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":"The care provider affiliation mappings (=Mitgliedschaften)","uniqueItems":falseIs 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":"arrayboolean"},"itemsid":{"$refformat":"#/definitions/CareProviderAffiliation"}},"careProviderBusinesses":{int64","description":"TheUnique careidentifier providerof businesses (=Zahlstellen). A care provider can manage multiple businesses.the instance.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/CareProviderBusiness"integer"}}},"employeeNumbersHealthServiceCantonMandate":{"description":"The carehospital health providerservice employeecanton numbermandat (=KNummerLeaDatModellKantonEinschraenkung). For all employed OKP care providers.","uniqueItemstype":false"object","typeproperties":{"array","itemscanton":{"$refenum":["#/definitions/EmployeeNumber"}}AG","idAI":{,"formatAR":,"int64BS","descriptionBL",":"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)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"}}},"CareProviderBusinessFacilityAffiliation":{"description":"TheAn mappingaffiliation detailsin foran aorganisation business facilities (=EinrichtungenMitgliedschaft).","type":"object","properties":{"detailsname":{"description":"AdditionalThe informationaffiliation forname the assigned facility, e(=Verbandscode usf.). E.g. bedan count (=Anzahl Betten)organization code.","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"}}},"CareProviderHealthServicePartyBeneficiary":{"descriptiontype":"The mapping details for care provider health services (=Zertifizierer Methoden).","object","properties":{"globalLocationNumber":{"type":"objectstring"},"propertiesfirm":{"healthServicetype":{"$refstring":"#/definitions/HealthService","description":"The health service (=Zertifzierer Methode).},"branch":{"type":"string"},"healthServiceCantonMandateabbreviation":{"$reftype":"#/definitions/HealthServiceCantonMandatestring"},"startDatecontact":{"format$ref":"date-time#/definitions/Contact","description":"DateThe ofparty the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDatecontact details."},"id":{"format":"date-timeint64","description":"Date of the validity end (=fachliches Enddatum). Time information will be ignored. Validity ends at the end Unique identifier of the specified day. If the period lasts indefinitely, the max date '9999-12-31 23:59:59.9999999' is usedinstance.","type":"integer"}}},"Bank":{"description":"The SIX bank details.","type":"stringobject"},"isValidproperties":{"bankGroup":{"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)The banks/financial institutions are divided into bank groups.","typeenum":["booleanSNB"},"idUBSAG":{,"formatRESERVE":"int64,"CREDIT_SUISSE_GROUP_AG_1","description":"Unique identifier of the instance.CREDIT_SUISSE_GROUP_AG_2","REGIONALBANKEN_RBA_HOLDING_AG","typeKANTONALBANKEN":,"integer"}}}RAIFFEISENBANKEN_EINZELINSTITUTE","CareProviderAffiliation":{"descriptionPOST_FINANCE"],"type":"The care provider affiliation."string"},"typebankGroupTranslation":{"object$ref","properties":{"externalId:"#/definitions/Translation"},"bankClearingType":{"description":"The care provider membership id (=Mitgliedernummer).","type":"string"},"affiliationBroker":{"description":"The affiliation broker. The institution providing the affiliation to the care providerbank type, e.g. head office, main branch or branch.","enum":["TARIFHEAD_SUISSEQUARTERS","ASPIMAIN_BRANCH","PHYSIO_SWISSBRANCH"],"type":"string"},"affiliationBrokerTranslationsbankClearingTypeTranslations":{"$ref":"#/definitions/Translation"},"affiliationbankingClearingNumber":{"$refdescription":"#/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.Each bank/financial institution is identified by the BankingClearingNumber made up of 3 to 5 digits.","type":"string"},"endDatebankingClearingNumberNew":{"formatdescription":"date-time","Any value here replaces the BankingClearingNumber.","type":"string"},"branchId":{"description":"DateTogether ofwith the validityBankingClearingNumber endnumber (=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 usedthe 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"},"isValidheadquarterClearingNumber":{"description":"IsThe true,BankingClearingNumber ifof 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).","head office.","type":"booleanstring"},"idshortName":{"format":"int64","description":"UniqueThe short identifiername of the instance bank or financial institution.","type":"integerstring"}}},"Accountname":{"description":"The name of the bank account.or financial institution","type":"objectstring"},"properties":{"ibanNumber"postalAccountNumber":{"description":"The IBAN bank's or financial institution's postal account number.","type":"string"},"accountNumberswift":{"description":"The SWIFT accountdirectory number (=Kontonummer)entry value.","type":"string"},"partycontact":{"$ref":"#/definitions/PartyBeneficiaryContact","description":"OptionallyThe containsbank's theor accountfinancial holder (=Begünstigter) when not identical to the care provider (=Leistungserbringer)institution's contact details."},"bankstartDate":{"$refformat":"#/definitions/Bankdate-time","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"}}},"CountryPartyCareProvider":{"description":"The country (=Land).","type":"object","properties":{"namelegalFormType":{"descriptionenum":"The country name.["UNKNOWN","typeSOLE_PROPRIETORSHIP":,"stringGENERAL_PARTNERSHIP"},"twoLetterCountryCodeCORPORATION":{"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,"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":"License restriction reason typeThe qualification (=BeschränkungsgrundQualifikation).","enumtype":["UNKNOWNobject","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_FEEproperties":{"qualificationType":{"description":"The qualification type.","enum":["DIPLOMA","CERTIFICATE","CONTINUING_EDUCATION_CERTIFICATE","EXPERTISE_AREA","SKILLS","ADMISSION","ADDITIONAL_CERTIFICATE","PROFICIENCY_TEST"],"type":"string"},"licenseRestrictionReasonTypeTranslationsqualificationTypeTranslations":{"$ref":"#/definitions/Translation"},"reasonname":{"description":"LicsenseThe restriction reason (=Beschränkungstext)qualification name.","type":"string"},"startDateaffiliation":{"format$ref":"date-time#/definitions/Affiliation","description":"DateThe ofhealth theservice validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","type":"string"},"endDate":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"}}},"TariffSystemEmployerRelation":{"description":"The tarif systemmapping details for the employer mapping (=Arbeitgeber).","type":"object","properties":{"tariffSystemTypeclearingNumber":{"description":"The tariffclearing system typenumber (=ZSR-Nummer).","enum":["LOA","NURSING_HOME_FLAT_RATE"],"type":"string"},"tariffSystemTypeTranslationsisPublished":{"$refdescription":"#/definitions/TranslationThe is active flag.","type":"boolean"},"nameemploymentType":{"description":"The tariff name."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"}}},"CareProviderPartyContact":{"description":"The person's mapping details for a care provider party (=Personendaten). For each point in time only one active mapping should existcontact details.","type":"object","properties":{"partylanguage":{"$ref":"#/definitions/PartyCareProvider","description":"The care provider party (=Privatadresse)."},"startDatelanguage to be used when communicating with this person.","enum":["DE","FR","IT"],"type":"string"},"languageTranslations":{"format$ref":"date-time","#/definitions/Translation"},"url":{"description":"DateA ofpointer theto validitya start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified dayrelevant url, e.g. business homepage.","type":"string"},"endDatepostalAddress":{"format$ref":"date-time#/definitions/PostalAddress","description":"DateThe 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"},"isValidpostal address."},"phoneNumbers":{"description":"The phone numbers.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/PhoneNumber"}},"emailAddresses":{"description":"IsThe 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"}email addresses.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/EmailAddress"}},"id":{"format":"int64","description":"Unique identifier of the instance.","type":"integer"}}},"CareProviderQualificationHealthServiceComment":{"description":"The mappinghealth detailsservice for care provider qualifications (=Qualifikationen).","specific comment.","type":"object","properties":{"countrycommentTranslations":{"$ref":"#/definitions/CountryTranslation","description":"The country (=Land) where the qualification has been attainedComment translations."},"qualificationisExcluded":{"$refdescription":"#/definitions/QualificationWhether the health service is excluded.","descriptiontype":"The qualification (=Qualifikation).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"}}},"EmployeeNumberHealthServiceGroup":{"description":"The employeehealth service numbergroup (=KNummerLEA-Leistungsbereich/-Leistungsgruppe).","type":"object","properties":{"numberexternalId":{"description":"The employee number (=KNummer).Health service group external id (LEA-Leistungsbereich/-Leistungsgruppe abbreviation)","type":"string"},"careProviderparentExternalId":{"$ref":"#/definitions/CareProvider","description":"The care provider (=Leistungserbringer). parent health service group external id (LEA-Leistungsbereich abbreviation)","type":"string"},"businessScopestartDate":{"$refformat":"#/definitions/BusinessScopedate-time","description":"The business scopeDate of the validity start (=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":falsefachliches 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":"arraystring"},"itemsisValid":{"$ref":"#/definitions/License"}}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"}}},"PartyBusinessPostalAddress":{"description":"The postal address (=Postadresse).","type":"object","properties":{"globalLocationNumberpostOfficeBoxText":{"typedescription":"string"},"branch":{"Post office box text.","type":"string"},"contactpostOfficeBoxNumber":{"$refformat":"#/definitions/Contactint32","description":"ThePost partyoffice contactbox detailsnumber."},"idtype":{"formatinteger":},"int64street",:{"description":"UniqueThe street identifierwith ofstreet the instancenumber (=Strasse).","type":"integerstring"}}},,"FacilityaddressAddition":{"description":"The businessaddress facilityaddition (=EinrichtungAdresszusatz).","type":"objectstring"},"propertiesplace":{"facilityType":{"description":"The facility typeplace/city (=Ort).","enumtype":["HOSPITAL_LAB_TYPEstring"},"HOSPITAL_LAB_INFRASTRUCTURE","FITNESS_CLASSIFICATION","FITNESS_QUALITOP_FIT_SAFE","DOCTOR_FACILITY","HOSPITAL_FACILITY","NURSING_HOME_FACILITY","FITNESS_CARE_LEVEL"],"postalCode":{"description":"The postal code, national and international (=PLZ).","type":"string"},"facilityTypeTranslationcountry":{"$ref":"#/definitions/TranslationCountry","description":"The country."},"namecanton":{"description":"TheWhen available facilitythe name of the swiss canton.","typeenum":["AG","stringAI"},"startDateAR":{,"formatBS":,"date-timeBL","descriptionBE",":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day."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"},"endDateid":{"format":"date-timeint64","description":"DateUnique identifier 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"},"isValidinstance.","type":"integer"}}},"PhoneNumber":{"description":"IsThe 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)phone number.","type":"booleanobject"},"idproperties":{"formatphoneNumberType":{"int64","description":"UniqueThe identifierphone ofnumber the instancetype.","typeenum":["integer"}}}LANDLINE","MOBILE","HealthServiceFAX":{],"descriptiontype":"The certifier health service (=Zertifizierer-Methode).","type":"object","properties":{"namestring"},"phoneNumberTypeTranslations":{"$ref":"#/definitions/Translation"},"number":{"description":"The phone number, healthformatted serviceas nameE.164.","type":"string"},"nameTranslationscountry":{"$ref":"#/definitions/TranslationCountry","description":"Name translationsThe phone number country."},"externalIdid":{"format":"int64","description":"TheUnique certifieridentifier /of lea health service identifierthe instance.","type":"stringinteger"}}},"affiliationEmailAddress":{"$refdescription":"#/definitions/AffiliationThe email address.","descriptiontype":"The health service affiliation, e.g. EMR, ASCA etc."},"commentsobject","properties":{"email":{"description":"HealthThe serviceemail commentsaddress.","uniqueItems":false,"type":"arraystring"},"itemsid":{"$refformat":"#/definitions/HealthServiceComment"}}int64","healthServiceGroupdescription":{"$ref"Unique identifier of the instance.","type":"#/definitions/HealthServiceGroup","integer"}}},"EmployeeNumberDetailViewItem":{"description":"Health service group (LEA Leistungsbereich, Leistungsgruppe)"},"startDateA container for one specific employee number and its context information.","type":"object","properties":{"syncDate":{"format":"date-time","description":"DateContains of the validityemployee startnumber (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.","modification date.","type":"string"},"version":{"type":"string"},"endDateemployeeNumber":{"format$ref":"date-time#/definitions/EmployeeNumber","description":"DateContains a complete data set of thea single validityemployee endnumber (=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"},"isValidKNummer)."}}},"HealthServiceCommentViewItem":{"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)One specific comment entry on a health service.","type":"booleanobject"},"id"properties":{"healthServiceId":{"format":"int64","description":"UniqueThe identifierinternal ofhealth theservice instanceid.","type":"integer"}}},"HealthServiceCantonMandatehealthServiceExternalId":{"description":"The identification of hospitalthe health service canton mandat (=LeaDatModellKantonEinschraenkung) in the system of the API consumer as provided with the CareProviderCertification endpoint.","type":"objectstring"},"propertiescertifier":{"cantondescription":{"enum":["AG"The certifier name.","AItype",:"ARstring"},"BShealthServiceTranslations",:{"BL$ref","BE:"#/definitions/Translation","FRdescription","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":"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"},"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"}}},"AffiliationStringBulkResponse":{"description":"An affiliation in an organisation (=Mitgliedschaft)A response container for a list of string values.","type":"object","properties":{"nametookInMs":{"format":"int32","description":"TheRequest affiliationprocessing nametime (=Verbandscodein usf.). E.g. an organization code.milliseconds.","type":"stringinteger"},"startDatetotalCount":{"format":"date-timeint32","description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning ofOverall, paging-independently count of entries according to the specified dayparameters.","type":"stringinteger"},"endDaterecordCount":{"format":"date-timeint32","description":"DateNumber of therecords validityin endthe (=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)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":"booleaninteger"},"idrecords":{"format":"int64","description":"UniqueThe identifierrecords of the current instancepage.","uniqueItems":false,"type":"integerarray"}}},"PartyBeneficiaryitems":{"type":"objectstring"}}}},"propertiesNumberListViewItem":{"globalLocationNumber":{description":"A response container for a list of consolidated basic number (clearing or employee number) information.","type":"stringobject"},"firmproperties":{"typesyncDate":{"stringformat"},"branch":{"type":"string"},"abbreviation":{":"date-time","description":"Contains the employee number modification date.","type":"string"},"contactnumber":{"$ref":"#/definitions/Contact","description":"The party contact details."},"id":{"format":"int64", number (clearing or employee number) itself.","type":"string"},"globalLocationNumber":{"description":"UniqueGlobal identifierlocation of the instancenumber (=EANNummer).","type":"integerstring"}}},"BankorganizationIdentificationNumber":{"description":"TheOrganization SIXidentification bank detailsnumber (=UID-Nummer/IDE/IDI).","type":"objectstring"},"propertiesfirm":{"bankGroup":{"description":"The banks/financial institutions are divided into bank groupsfirm (=Firma).","enumtype":["SNBstring"},"UBSAGbranch",:{"RESERVEdescription","CREDIT_SUISSE_GROUP_AG_1","CREDIT_SUISSE_GROUP_AG_2","REGIONALBANKEN_RBA_HOLDING_AG","KANTONALBANKEN","RAIFFEISENBANKEN_EINZELINSTITUTE","POST_FINANCE"]:"The branch name (=Zweigstelle).","type":"string"},"givenName":{"description":"Given name / first name (=Vorname).","type":"string"},"bankGroupTranslationcallName":{"$refdescription":"Call name (=Rufname).","type":"#/definitions/Translationstring"},"bankClearingTypefamilyName":{"description":"TheFamily bankname type, e.g. head office, main branch or branch/ last name (=Nachname).","enumtype":["HEAD_QUARTERSstring"},"MAIN_BRANCH","BRANCH"]originalName":{"description":"Orginal name (=Ledigenname).","type":"string"},"bankClearingTypeTranslationspostalCode":{"$ref":"#/definitions/Translation"},"bankingClearingNumber":{"description":"EachThe bank/financial institution is identified by the BankingClearingNumber made up of 3 to 5 digitspostal code, national and international (=PLZ).","type":"string"},"bankingClearingNumberNewplace":{"description":"AnyThe value here replaces the BankingClearingNumberplace/city (=Ort).","type":"string"},"branchIdstreet":{"description":"TogetherThe street with thestreet BankingClearingNumber number the BranchId provides a conclusive key for each bank or financial institution recordnumber (=Strasse).","type":"string"},"sicNumberphoneNumber":{"description":"A 6-digit number only to be used by SIC and euroSIC participantsAn E.164 phone number.","type":"string"},"headquarterClearingNumberisValid":{"description":"TheIs BankingClearingNumbertrue, ofif the head officeinstance 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":"stringboolean"},"shortNamedetailViewItemUrl":{"description":"TheResource shortURL nameto ofretrieve thefurther bankdetails orregarding financialthis institutionnumber.","type":"string"},"nameclearingNumberSuffixTwoLetterCantonCode":{"descriptiontype":"The name of the bank or financial institution","type":"string"},"postalAccountNumberstring"},"clearingNumberSuffixTranslations":{"$ref":"#/definitions/Translation"}}},"ProposalProcessResponse":{"descriptiontype":"The bank's or financial institution's postal account number.object","typeproperties":{"stringid"},"swift":{"descriptionformat":"The SWIFT directory entry value.int64","type":"stringinteger"},"contactbusinessKey":{"$ref":"#/definitions/Contact","description":"The bank's or financial institution's contact details."},"startDatetype":"string"},"typeName":{"type":"string"},"version":{"type":"string"},"processInstanceId":{"type":"string"},"processState":{"type":"string"},"processInformation":{"type":"string"},"startTime":{"format":"date-time","type":"string"},"description":"Date of the validity start (=fachliches Startdatum). Time information will be ignored. Validity starts at the beginning of the specified day.endTime":{"format":"date-time","type":"string"},"endDateproposalResponse":{"format$ref":"date-time#/definitions/ProposalResponse","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."The proposal"},"errors":{"description":"The proposal errors","uniqueItems":false,"type":"string"},"isValid"array","items":{"$ref":"#/definitions/ProposalError"}}}},"ProposalResponse":{"descriptiontype":"object"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).",,"properties":{}},"ProposalError":{"type":"booleanobject"},"idproperties":{"formaterrorCode":"int64","description":"Unique identifier of the instance.","{"type":"integerstring"}}},"PartyCareProvidererrorMessage":{"type":"objectstring"}}}},"propertiessecurityDefinitions":{"legalFormTypeBearer":{"enumname":["UNKNOWNAuthorization","SOLE_PROPRIETORSHIPin",:"GENERAL_PARTNERSHIPheader","CORPORATIONtype","LIMITED_LIABILITY_COMPANY:"apiKey","COOPERATIVEdescription","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: 

:"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: 

Status CodeDescription
200Success
202Accepted; Request is valid and business process could be triggered successfully.
400Bad Request; The request data is invalid.
401Unauthorized; The caller does not have sufficient privileges to perform the call.
403Forbidden;  The server is refusing the action.
500Internal Server Error; Any unexpected internal failure.


Referenced Algorithms

Clearing number check digit

Panel

The clearing number has the following structure:

  • A leading char as check digit
  • A four digit sequential number
  • A two digit number circle / canton number

The leading char of the clearing number is created and validated as follows:

  • Each number is multiplied with its position (calculate from the right end).
  • All products are summarized into one sum.
  • Modulo 26 of the sum denotes the char in the alphabet (result 0 results in char 'Z'). 

Example L248519:
(9*1)+(1*2)+(5*3)+(8*4)+(4*5)+(2*6) = 90
90 mod 26 = 12
12th char in the alphabet = L


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:

  • ISO-Alpha-3 Code (ISO 3166-1) of Switzerland (CHE)
  • 8 digit pseudo random number
  • check digit

The check digit is created and validated as follows:

  • Each digit of the pseudo-random number is multiplied with a predefined multiplier: 54327654
  • All products are summarized into one sum.
  • 11 minus Modulo 11 of the sum defines the check digit.

Example CHE-114.617.288:
(1*5)+(1*4)+(4*3)+(6*2)+(1*7)+(7*6)+(2*5)+(8*4) = 124
124 mod 11 = 3
11 - 3 = 8


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.


  1. The API Client requests the token endpoint from the auth server.
  2. The token endpoint is returned to the API Client.
  3. Request an access token from the auth server by providing the following post request parameters:
    1. grant_type: set to 'password'
    2. client_id: provided individually by SASIS
    3. client_secret: provided individually by SASIS
    4. username: provided individually by SASIS
    5. password: provided individually by SASIS
    6. scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
  4. The access token as well as the refresh token is returned to the API Client.
  5. The specific API resource is called providing the access token in as bearer in the Authorization http header:
    'Authorization: Bearer <access token>'
  6. The API responds to the request.
  7. 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:
    1. grant_type: set to 'refresh_token'
    2. client_id: provided individually by SASIS
    3. client_secret: provided individually by SASIS
    4. scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
    5. refresh_token: The refresh token received with the last access token.
  8. A new access token as well as a new refresh token is returned to the API Client.
  9. The specific API resource is called providing the new access token in as bearer in the Authorization http header:
    'Authorization: Bearer <access token>'
  10. The API responds to the request.

draw.io Diagram
bordertrue
viewerToolbartrue
fitWindowfalse
diagramNameapi_access_sequence
simpleViewerfalse
width600
diagramWidth676
revision2

  1. The API Client requests the token endpoint from the auth server.
  2. The token endpoint is returned to the API Client.
  3. Request an access token from the auth server by providing the following post request parameters:
    1. grant_type: set to 'password'
    2. client_id: provided individually by SASIS
    3. client_secret: provided individually by SASIS
    4. username: provided individually by SASIS
    5. password: provided individually by SASIS
    6. scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
  4. The access token as well as the refresh token is returned to the API Client.
  5. The specific API resource is called providing the access token in as bearer in the Authorization http header:
    'Authorization: Bearer <access token>'
  6. The API responds to the request.
  7. 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:
    1. grant_type: set to 'refresh_token'
    2. client_id: provided individually by SASIS
    3. client_secret: provided individually by SASIS
    4. scope: set constantly to 'openid profile email offline_access roles c1s_profile cpr'
    5. refresh_token: The refresh token received with the last access token.
  8. A new access token as well as a new refresh token is returned to the API Client.
  9. The specific API resource is called providing the new access token in as bearer in the Authorization http header:
    'Authorization: Bearer <access token>'
  10. The API responds to the request.

Access token

The access token response contains additional information:

Code Block
languagejava
titleAccess token response
{
  "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">

CprApiAccessSample.zip

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
languagec#
themeConfluence
title1./2. Retrieve the auth servers token endpoint
collapsetrue
        /// <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
languagec#
themeConfluence
title3./4. Request access and refresh token
collapsetrue
        /// <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
languagec#
themeConfluence
title7./8. Token refresh strategy based validity of cached token response and request new access token
collapsetrue
        /// <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
languagec#
themeConfluence
title5./6./9./10. API resource call using the access token in the Authorization http header
collapsetrue
        /// <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
languagec#
themeConfluence
titlePlain API Call (putting everything together)
collapsetrue
        var accessToken = await GetAccessTokenAsync(ct).ConfigureAwait(false);

        var cprApiResponse = await CprApiSampleRequestAsync(accessToken, ct).ConfigureAwait(false);

Connection Settings

SettingTest EnvironmentLive Environment
AuthorityUrlhttps://sas-auth.itsense.chhttps://openid.santesuisse.com
CprBaseUrlhttps://stagecurrent.zsrnext.ch/https://www.zsrnext.ch
ClientId1)1)
ClientSecret1)1)
UserName1)1)
Password1)1)

1) To be provided individually by SASIS. Please contact: support@sasis.ch

Status CodeDescription200Success202Accepted; Request is valid and business process could be triggered successfully.400Bad Request; The request data is invalid.401Unauthorized; The caller does not have sufficient privileges to perform the call.403Forbidden;  The server is refusing the action.500Internal Server Error; Any unexpected internal failure.

Referenced Algorithms

Clearing number check digit

Panel

The clearing number has the following structure:

  • A leading char as check digit
  • A four digit sequential number
  • A two digit number circle / canton number

The leading char of the clearing number is created and validated as follows:

  • Each number is multiplied with its position (calculate from the right end).
  • All products are summarized into one sum.
  • Modulo 26 of the sum denotes the char in the alphabet (result 0 results in char 'Z'). 

Example L248519:
(9*1)+(1*2)+(5*3)+(8*4)+(4*5)+(2*6) = 90
90 mod 26 = 12
12th char in the alphabet = L

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:

  • ISO-Alpha-3 Code (ISO 3166-1) of Switzerland (CHE)
  • 8 digit pseudo random number
  • check digit

The check digit is created and validated as follows:

  • Each digit of the pseudo-random number is multiplied with a predefined multiplier: 54327654
  • All products are summarized into one sum.
  • 11 minus Modulo 11 of the sum defines the check digit.
Example CHE-114.617.288:
(1*5)+(1*4)+(4*3)+(6*2)+(1*7)+(7*6)+(2*5)+(8*4) = 124
124 mod 11 = 3
11 - 3 = 8