XUND
API ReferenceMedical Services

Convert filters and filter values on border change

POST/v1/services/filters/borderChange

Upon moving to a new location, it should be checked whether a border was crossed. In case a new country is viewed, the local specializations and supported filters will change.

This endpoint is meant to solve this problem by checking the old and new coordinates and converting both the filters and the filter values to the target country. Upon conversion unsupported filter types will be removed and supported ones will be added.

When the filters change, the specialization select values are modified. The converted filter values mark the new selection based on the previous one.

Authorization

BearerToken
AuthorizationBearer <token>

Authenticate with a JWT bearer token obtained from the token endpoint with your Client Id and API key.

In: header

Header Parameters

language*string

The expected language of the response.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Exactly one pair of fromCountryCode and toCountryCode or fromLocation and toLocation parameters is mandatory. The filterValues parameter is always mandatory.

Response Body

application/json

curl -X POST "https://example.com/v1/services/filters/borderChange" \  -H "authorization: Bearer <token>" \  -H "language: en" \  -H "Content-Type: application/json" \  -d '{    "fromCountryCode": "AT",    "toCountryCode": "DE",    "filterValues": {      "location": {        "latitude": 48.103252,        "longitude": 11.629402      },      "specializations": [        "ef0ea38a-b3bf-4292-bc9a-49a3e233aded",        "74c9d0f4-4ba5-4cf3-bfa1-583b81a146e3"      ]    }  }'

{  "isFilterChanged": false}

Last updated on