Getting User Summaries
In this tutorial we will show you how to make authorized API calls to get user summaries.
First of all you need to get access_token
. You can learn about that here.
Here's a URL to get summaries:
You must pass 2 headers:
- Authorization:
Bearer {ACCESS_TOKEN}
- Content-Type:
application/json
Also you need to pass query parameters:
- date_from (required) (for example "2022-10-18")
- date_to (required) (for example "2022-10-20")
- include_slots (optional, 0 by default, can be either 0 or 1) - using this parameter you can enable slots in summaries
- per_page - (optional, 10 by default) - pagination parameter
- page - (optional, 1 by default) - (optional, 10 by default)
CURL Example:
curl --request GET \
--url 'https://api.health.cloud.corsano.com/user-summaries?date_from=2020-10-06&date_to=2022-10-19&include_slots=1&per_page=5&page=0' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdGcuYXBpLmhlYWx0aC5jbG91ZGNvbm5lY3Qucm9uYXNpdC5jb21cL2xvZ2luIiwiaWF0IjoxNjY2MTYyMTczLCJleHAiOjE2NjYxNjU3NzMsIm5iZiI6MTY2NjE2MjE3MywianRpIjoiRnRjRjRUc1pjM2VoQ3dKRCIsInN1YiI6IjVmZTYyMjYwMThhM2Q2ZjdiN2IyZGI0MCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.qYJJsXM0s64szJdqpiY6k1Fg2FK9TPoAg7JIpZw6Pd0' \
--header 'Content-Type: application/json'
You can also use the researcher API key to get the summary of the user. In this case you don't need patient's login or password. You can learn more about it here