Updated: 2022-10-18
Background
To support a more dynamic and content-agnostic country card, the API endpoints were updated in September 2022. This post describes the changes that have been made and what impact they will have on the integration code.
Note: Changing to the new endpoints as soon as possible is highly recommended.
Changes
API-Endpoint call changes
The first major change is the API endpoints. They have been updated and the old ones will now
be in a deprecated/obsolete state. Changing to the new endpoints as soon as possible is highly recommended.
The old API endpoints:
[GET] https://api.safeture.com/rpc/regions/getCompiledRegionCard
[GET]https://api.safeture.com/rpc/regions/getRegionCard
[POST]https://api.safeture.com/rpc/regions/setRegionCard
New API endpoints:
[GET]https://api.safeture.com/regioncard/getcompiled
[GET]https://api.safeture.com/regioncard
[POST]https://api.safeture.com/regioncard
GET getcompiled
Below are the major changes from the API [GET] getCompiledRegionCard to the new [GET]
getcompiled listed. For full documentation of the new API, click here.
The following query params are changed:
- id -> regionid
- lang -> language
The following changes are done to the response:
- threatAssessmentLevel -> has been removed
- providers -> structure changed
- viewid -> new body field
- payloadcontrollertype -> new body field
- headingimage -> new body field
- designfeatures -> new body field
GET regioncard
Below are the major changes from the API [GET] getRegionCard to the new [GET] regioncard
listed. For full documentation of the new API, please click here.
The following query params are changed:
- id -> regionid
- lang -> language
- includeallcontenttypes -> allcontenttypes
- fallbacktoenglishtext –> englishfallback
The following changes are done to the response:
- providers -> structure changed
- viewid -> new body field
- headingimage -> new body field
POST regioncard
Below are the major changes from the API [POST] setRegionCard to the new [POST] regioncard
listed. For full documentation of the new API, please click here.
The following changes are done to the request body:
- providers -> structure changed
- viewid -> new field
The following changes are done to the response:
- viewid -> new body field
- headingimage -> new body field
- result -> response
- changed from a string to an object.