Get Specializations
Overview
The section describes how you can download a list of available specialties for your own integration. The specialty ID returned directly in response to the request will be used at a later stage to download an appointment and schedule a consultation.
Request
fetch('https://clinic.telemedi.co/api/v2/specializations', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
})
.then(response => response.json())
.then(response => console.log(response))
Additional request parameters (query string based)
Endpoint also allows you to use prepared parameters that allow you to paginate or filter data within a search for a specific specialty.
All parameters are optional in the request context. After applying your request url address will be: https://clinic.telemedi.co/api/v2/specializations?currency=EUR
const queryParams = {
pagination: true, // If set to false, will get all results without pagination
currency: 'PLN', // If empty, price will be returned in PLN
validate: '' // If empty, will get all results, without validating user age
stationary: true, // Flag to determine whether to include stationary specializations
hasAnyDoctorAssigned: false // Flag to determine whether to get only specializations with doctors
lang: 'pl' // Allows to set the language of retrieved specialties
}
Request example
Query params
const queryParams = {
pagination: false,
currency: 'PLN',
validate: true,
stationary: false,
lang: 'pl'
}
Request
fetch('https://clinic.telemedi.co/api/v2/specializations', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
})
.then(response => response.json())
.then(response => console.log(response))
Response
{
"items": [
{
"id": "string", // "164b5f7f-b72e-4038-a67c-5308082734a9"
"name": "string", // "Lekarz ogólny / internista"
"cost": "string", // "79.00"
"currency": "string", // "PLN"
"is_stationary": "boolean", // false
"userCost": "string" // "79.00"
},
...
],
"total": 28
}