Skip to content

Validity service endpoints

  • Technical definitions of each API, sample code, test UI and Open API definitions to download you can find in the developer portal. -> developer.discover.swiss/apis

General headers

Header Name Type Description
Ocp-Apim-Subscription-Key string Appropriate subscription key you can get in the developer portal
Accept-Timezone string Supply a TimeZone id property acquired from Infocenter /timezones route or IANA code in order to get data with desired time offset. The default is UTC.
Content-Type string default: application/json;charset=UTF-8
Use a different charset if your application is not sending the data in utf-8. for example: application/json;charset=ISO-8859-1

Validity endpoint

url verb request response description
/validate GET holder
validFor
ValidationResponse validate object by provided holder and validFor information

ValidationResponse

Property Type Description
validFrom date-time
validUntil date-time
validFor string Location id

string

OpenAPI document

All methods and response models can be viewed in the Developer Portal. To generate an API client you can use the following URLs without user authentication but still with the Subscription Key in the Header (Ocp-Apim-Subscription-Key) or as Query Parameter (subscription-key=<your-surbscription-key>):