...
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Web service integrationWhich data can be requested via the ZSR web service?The data delivered via the web service correspond in principle to the data delivered in the backwards-compatible subscriptions. The modules to which the customer has subscribed thus determine which data can be requested. See Subscription options Are the data delivered with the same structure as in the subscription files?The web service uses a different data model from that of the subscription files. See also Mapping Subscription Files- Webservice. The key entities are as follows:
Why was the data model changed (compared with the subscription files)?The reasons for changing the data model are as follows:
Which response format does the ZSR web service use?Data are delivered in JSON format (XML is not supported). Can reference data (master data) be loaded separately?Reference/master data for ZSR/K number values (methods, qualifications, banks etc.) do not have to be loaded separately. All required data are delivered directly in the detailed response for the individual number. If needed, reference/master data can be entered separately as follows:
Where can I find the technical API documentation?An Open API Specification is available. In addition to Swagger, (for example) ReDoc can be used to display the open API specification: ZSRN-API Live (ReDoc). Is there a version history for the ZSR web service?The ZSR web service is currently at version v1.x. For the time being, all changes to the ZSR web service will not be implemented via new versions in parallel operation but will instead be made directly in version v1.x. However, all changes will be published in release notes at the appropriate time and made available via the stage system. The SASIS SLAs apply. As there will not be a version history for the ZSR web service for the time being, SASIS AG recommends that its integrators follow an adapter pattern that allows changes to the client-system interfaces to the ZSR web service via release-independent settings. What are the current SASIS AG IT SLAs?The SASIS IT Service Level Agreement applies to the web service. Questions and supportWhere can I request access to the ZSR web service?Please contact us to request access to the ZSR web service. Who can provide support if I have an issue with the ZSR web service?Please contact us. Authentication and submitting requestsHow do I access the ZSR web service?Please contact us to request access to the ZSR web service. How does authentication work?Authentication is based on OpenID Connect or OAuth 2.0 using password grant.
Access token The access token response contains additional information:
The token itself is a JWT and can therefore be decoded on the JWT website. The expires_in field defines the validity period of the token in seconds. Afterwards, a new token must be retrieved. Code samples A complete c# sample shows how to access one specific API resource (numbers):
Authentication in other languages follows the same procedure. The following code snippets explain the procedure on a step-by-step basis:
What are the limits on batch requests?Batch requests are defined as involving more than 50 requests per minute for a given customer. See also the SASIS IT Service Level Agreement. Why can I only call up 500 numbers in the detail view?Requests involving the endpoints ClearingNumbers and EmployeeNumbers are limited to 500 numbers for performance reasons. The request process must be planned such that no request contains more than 500 numbers. Which status codes does the web service return?The web service uses http status codes. The following codes may be returned:
How can 503 errors be avoided?If the API is overloaded with large numbers of parallel requests, it returns 503 errors. To avoid these, it is very important to follow the instructions for loading the number list and the number details (see also How can data on ZSR and K numbers be requested via the web service?). The number of requests can be reduced further, for example, by requesting only changes via a daily change batch request (see also How can changes be requested?). When a 503 error occurs, it is advisable to wait five minutes before making another request. If possible, customers should check whether API requests can be deferred to a time slot during the night. How can 400 errors be avoided?When the client sends an invalid request to the API, it returns a 400 error. To avoid these, it is very important to follow the instructions for loading the number list and the number details (see also How can data on ZSR and K numbers be requested via the web service?). The request process must be planned such that no request contains more than 500 numbers. ZSR and K number requestsHow is the Numbers endpoint used?The Numbers endpoint delivers ZSR and K numbers that match the filter criteria. See also How can data on ZSR and K numbers be requested via the web service? What are the possible filter criteria for the Numbers endpoint?Filter criteria:
Are extended search functions available?Extended search queries with filter criteria at field level, e.g. by name and postcode, are not offered via the web service. The full version of ZSR is available for advanced search queries. For the ZSR web service filter criteria, see the section on data requests. How can data on ZSR and K numbers be requested via the web service?Data are requested in two steps. Step 1 – Loading the number list: Request all the required ZSR/K numbers via the Numbers endpoint. The filter criteria employed and user authorisations affect the search results. The Numbers endpoint delivers all ZSR/K numbers that match the filter criteria and for which the customer is authorised. It does not deliver ZSR/K numbers that have been suspended for more than ten years. Filter criteria:
Step 2 – Loading the number details: The result from step 1 is used to make a request via the appropriate detail endpoint for 500 numbers at a time. The response from the detail endpoint contains the complete number details for which the user is authorised. For performance reasons, it is important to avoid making large numbers of parallel individual requests. Endpoints:
What are subscription options?The data delivered via the web service correspond in principle to the data delivered in the backwards-compatible subscriptions. The subscription options depend on the modules to which the customer has subscribed. See Subscription options. How can the subscription options be changed?Please contact us. How is the ClearingNumbers endpoint used?The ClearingNumbers endpoint delivers details of ZSR numbers. See How can data on ZSR and K numbers be requested via the web service? How is the EmployeeNumbers endpoint used?The EmployeeNumbers endpoint delivers details of K numbers. See How can data on ZSR and K numbers be requested via the web service? How can deleted numbers be identified?If a specialist value has been delivered (with a specific ID/ZSR/K number) but is no longer contained in the response at a later point in time, it is a deleted/cancelled value. How can changes be requested?A “modified from” date can be set as a parameter via the Numbers endpoint. The response then contains only numbers that have been changed since that date. Modifications can be specialist in nature or concern purely technical values. Numbers that have been suspended or cancelled for more than ten years are not delivered via the Numbers endpoint. To find out which numbers are affected, all active numbers must first be loaded via the Numbers endpoint. Any numbers that are still active in the client system but are not contained in the results should be cancelled or deleted from the client system. Once all modified numbers have been loaded, their details can be requested in the usual way via the detail endpoints. The response from these endpoints always contains all available data on a ZSR/K number, not just the values that have been changed.
The API should always be integrated such that it works regardless of the number of changes reported, i.e. threshold values set by the customer should not cause the data import to fail. Is it possible to load only ZSR/K numbers that have been changed?Yes. The filter criterion “modifiedFrom” makes it possible to request changes by date. See also How can changes be requested? How are changes handled?
Interpreting the dataHow areK numbers and ZSR numbers linked?ZSR number relationships delivered in the web service?
To receive all ZSR number relationships, therefore, it is essential to take account of both ClearingNumber.relatedClearingNumbers and CareProvider.ClearingNumbers
Employee relationships are delivered under clearingNumber.relatedEmployees or in the EmployeeNumbers endpoint under employeeNumber.relatedEmployers. The CareProvider (service provider) is a property on the detail record for a ZSR/K number. ClearingNumber → CareProvider (service provider)EmployeeNumber → CareProvider (service provider)Employment relationships are shown as follows: ClearingNumber → RelatedEmployees (all employees linked to a ZSR number) EmployeeNumber → RelatedEmployers (all employers linked to a K number) On which data is the displayed validity period of a ZSR/K number based?The validity of a ZSR/K number is no longer defined only as a time period with a start date and an end date. It is now defined using multiple time periods (ValidityPeriods), which are delivered as a list. The list clearly shows gaps in validity. Validity periods are defined as follows:: ClearingNumber
EmployeeNumber
How can I tell the difference between a bank account and a post office account?The ZSR web service no longer distinguishes between bank and post office accounts. The field “hasPaymentOrderReferenceNumber” under ClearingNumberAccount shows whether payments using a standard Swiss payment slip are possible. Endpoint: ClearingNumbers; object: ClearingNumberAccount What do the data items “0001-01-01” and “9999-12-31” mean?The ZSR web service always delivers a start date and an end date for time periods, even if it is not possible to determine the exact dates due to the legacy data or for other reasons. Placeholder values for the start and end date are therefore used. These are to be interpreted as follows:
A time period with the start date “0001-01-01” and the end date “9999-12-31” is thus valid for any given point in time. Are technical IDs delivered?Element id The IDs delivered in the detailed response have no specialist meaning and should not be used to interpret values. They are purely technical identifiers of the delivered data and can serve to process changes (see How can changes be requested? and How are changes handled?). No logic should ever be coded to technical IDs. In addition, no technical IDs whatsoever are delivered for the main ZSR/K number record. Identification is only possible using the ZSR/K number itself. A replacement for the old paying agent ID is not delivered. Element key Master/reference data, e.g. canton, country, qualification etc., are delivered with a permanent GUID as identifier. See also Can reference data (master data) be loaded separately? Unique identification is possible using the element “key” (string) for the following entities:
Example: "key": "3fa85f64-5717-4562-b3fc-2c963f66afa6" How can dummy numbers be identified?So-called “dummy” numbers are a legacy construct. They are still in use and can be retrieved via the ZSR web service. If a value for the property "clearingNumberDummy" is delivered on the ClearingNumber object, the number in question is a dummy number. Example of structure:
General information on the paying agent registerHow is a valid valid number constructed?The clearing number has the following structure:
The leading char of the clearing number is created and validated as follows:
Example L248519: How is a valid K number constructed?K numbers consist of a six-digit serial number followed by the letter K. |
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Web service integrationWhich data can be requested via the ZSR web service?The data delivered via the web service correspond in principle to the data delivered in the backwards-compatible subscriptions. The modules to which the customer has subscribed thus determine which data can be requested. See Subscription options Data can be requested on clearing numbers/employee numbers that have not been suspended for more than ten years. Are the data delivered with the same structure as in the subscription files?The web service uses a different data model from that of the subscription files. See also Mapping Subscription Files- Webservice. The key entities are as follows:
Why was the data model changed (compared with the subscription files)?The reasons for changing the data model are as follows:
Which response format does the ZSR web service use?Data are delivered in JSON format (XML is not supported). Can reference data (master data) be loaded separately?Reference/master data for ZSR/K number values (methods, qualifications, banks etc.) do not have to be loaded separately. All required data are delivered directly in the detailed response for the individual number. If needed, reference/master data can be entered separately as follows:
Where can I find the technical API documentation?An Open API Specification is available. In addition to Swagger, (for example) ReDoc can be used to display the open API specification: ZSRN-API Live (ReDoc). Is there a version history for the ZSR web service?The ZSR web service is currently at version v1.x. For the time being, all changes to the ZSR web service will not be implemented via new versions in parallel operation but will instead be made directly in version v1.x. However, all changes will be published in release notes at the appropriate time and made available via the stage system. The SASIS SLAs apply. As there will not be a version history for the ZSR web service for the time being, SASIS AG recommends that its integrators follow an adapter pattern that allows changes to the client-system interfaces to the ZSR web service via release-independent settings. What are the current SASIS AG IT SLAs?The SASIS IT Service Level Agreement applies to the web service. Questions and supportWhere can I request access to the ZSR web service?Please contact us to request access to the ZSR web service. Who can provide support if I have an issue with the ZSR web service?Please contact us. Authentication and submitting requestsHow do I access the ZSR web service?Please contact us to request access to the ZSR web service. How does authentication work?Authentication is based on OpenID Connect or OAuth 2.0 using password grant.
Access token The access token response contains additional information:
The token itself is a JWT and can therefore be decoded on the JWT website. The expires_in field defines the validity period of the token in seconds. Afterwards, a new token must be retrieved. Code samples A complete c# sample shows how to access one specific API resource (numbers):
Authentication in other languages follows the same procedure. The following code snippets explain the procedure on a step-by-step basis:
What are the limits on batch requests?Batch requests are defined as involving more than 50 requests per minute for a given customer. See also the SASIS IT Service Level Agreement. Why can I only call up 500 numbers in the detail view?Requests involving the endpoints ClearingNumbers and EmployeeNumbers are limited to 500 numbers for performance reasons. The request process must be planned such that no request contains more than 500 numbers. Which status codes does the web service return?The web service uses http status codes. The following codes may be returned:
How can 503 errors be avoided?If the API is overloaded with large numbers of parallel requests, it returns 503 errors. To avoid these, it is very important to follow the instructions for loading the number list and the number details (see also How can data on ZSR and K numbers be requested via the web service?). The number of requests can be reduced further, for example, by requesting only changes via a daily change batch request (see also How can changes be requested?). When a 503 error occurs, it is advisable to wait five minutes before making another request. If possible, customers should check whether API requests can be deferred to a time slot during the night. How can 400 errors be avoided?When the client sends an invalid request to the API, it returns a 400 error. To avoid these, it is very important to follow the instructions for loading the number list and the number details (see also How can data on ZSR and K numbers be requested via the web service?). The request process must be planned such that no request contains more than 500 numbers. ZSR and K number requestsHow is the Numbers endpoint used?The Numbers endpoint delivers ZSR and K numbers that match the filter criteria. See also How can data on ZSR and K numbers be requested via the web service? What are the possible filter criteria for the Numbers endpoint?Filter criteria:
Are extended search functions available?Extended search queries with filter criteria at field level, e.g. by name and postcode, are not offered via the web service. The full version of ZSR is available for advanced search queries. For the ZSR web service filter criteria, see the section on data requests. How can data on ZSR and K numbers be requested via the web service?Data are requested in two steps. Step 1 – Loading the number list: Request all the required ZSR/K numbers via the Numbers endpoint. The filter criteria employed and user authorisations affect the search results. The Numbers endpoint delivers all ZSR/K numbers that match the filter criteria and for which the customer is authorised. It does not deliver ZSR/K numbers that have been suspended for more than ten years. Filter criteria:
Step 2 – Loading the number details: The result from step 1 is used to make a request via the appropriate detail endpoint for 500 numbers at a time. The response from the detail endpoint contains the complete number details for which the user is authorised. For performance reasons, it is important to avoid making large numbers of parallel individual requests. Endpoints:
What are subscription options?The data delivered via the web service correspond in principle to the data delivered in the backwards-compatible subscriptions. The subscription options depend on the modules to which the customer has subscribed. See Subscription options. How can the subscription options be changed?Please contact us. How is the ClearingNumbers endpoint used?The ClearingNumbers endpoint delivers details of ZSR numbers. See How can data on ZSR and K numbers be requested via the web service? How is the EmployeeNumbers endpoint used?The EmployeeNumbers endpoint delivers details of K numbers. See How can data on ZSR and K numbers be requested via the web service? WHow can deleted numbers be identified?If a specialist value has been delivered (with a specific ID/ZSR/K number) but is no longer contained in the response at a later point in time, it is a deleted/cancelled value. How can changes be requested?A “modified from” date can be set as a parameter via the Numbers endpoint. The response then contains only numbers that have been changed since that date. Modifications can be specialist in nature or concern purely technical values. Numbers that have been suspended or cancelled for more than ten years are not delivered via the Numbers endpoint. To find out which numbers are affected, all active numbers must first be loaded via the Numbers endpoint. Any numbers that are still active in the client system but are not contained in the results should be cancelled or deleted from the client system. Once all modified numbers have been loaded, their details can be requested in the usual way via the detail endpoints. The response from these endpoints always contains all available data on a ZSR/K number, not just the values that have been changed.
The API should always be integrated such that it works regardless of the number of changes reported, i.e. threshold values set by the customer should not cause the data import to fail. Is it possible to load only ZSR/K numbers that have been changed?Yes. The filter criterion “modifiedFrom” makes it possible to request changes by date. See also How can changes be requested? How are changes handled?
Interpreting the dataHow are K numbers and ZSR numbers linked?The CareProvider (service provider) is a property on the detail record for a ZSR/K number.
On which data is the displayed validity period of a ZSR/K number based?The validity of a ZSR/K number is no longer defined only as a time period with a start date and an end date. It is now defined using multiple time periods (ValidityPeriods), which are delivered as a list. The list clearly shows gaps in validity. Validity periods are defined as follows:: ClearingNumber
EmployeeNumber
How can I tell the difference between a bank account and a post office account?The ZSR web service no longer distinguishes between bank and post office accounts. The field “hasPaymentOrderReferenceNumber” under ClearingNumberAccount shows whether payments using a standard Swiss payment slip are possible. Endpoint: ClearingNumbers; object: ClearingNumberAccount What do the data items “0001-01-01” and “9999-12-31” mean?The ZSR web service always delivers a start date and an end date for time periods, even if it is not possible to determine the exact dates due to the legacy data or for other reasons. Placeholder values for the start and end date are therefore used. These are to be interpreted as follows:
A time period with the start date “0001-01-01” and the end date “9999-12-31” is thus valid for any given point in time. Are technical IDs delivered?The IDs delivered in the detailed response have no specialist meaning and should not be used to interpret values. They are purely technical identifiers of the delivered data and can serve to process changes (see How can changes be requested? and How are changes handled?). Ideally, technical IDs would not be used at all as permanence is not guaranteed. This applies to both volatile, technical IDs of allocations and technical IDs of “master data”, e.g. canton, country etc., even if these are in principle maintained. In addition, no technical IDs whatsoever are delivered for the main ZSR/K number record. Identification is only possible using the ZSR/K number itself. A replacement for the old paying agent ID is not delivered. How can dummy numbers be identified?So-called “dummy” numbers are a legacy construct. They are still in use and can be retrieved via the ZSR web service. If a value for the property "clearingNumberDummy" is delivered on the ClearingNumber object, the number in question is a dummy number. Example of structure:
General information on the paying agent registerHow is a valid number constructed?The clearing number has the following structure:
The leading char of the clearing number is created and validated as follows:
Example L248519: How is a valid K number constructed?K numbers consist of a six-digit serial number followed by the letter K. |