Getting the list of user's bracelets
Let's imagine that you have a user's health token. You can get the list of devices worn by the user. To do that you need to make the GET request:
You need to pass x-health-token as a header. In return you will get the JSON list of devices worn by the user.
Example
Request:
curl --request GET \
--url https://api.integration.corsano.com/v1/user-devices \
--header 'x-health-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9hcGkuaGVhbHRoLmNsb3VkLm1tdC5jaFwvdXNlcnNcLzQxNzYyNWRlLTAyNDctNGU2Yi04OGI3LTBmOTk1MmVhMTZlNVwvYXV0aFwvbG9naW4iLCJpYXQiOjE2OTEwNTQ4NDQsImV4cCI6MTY5MTA1ODQ0NCwibmJmIjoxNjkxMDU0ODQ0LCJqdGkiOiJBd3RjN0c0NDQ0bkRnNEdwIiwic3ViIjoiNWZlNjIyNjAxOGEzZDZmN2I3YjJkYjQwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.y2DSRk3et9DC_6li9X7oCS26GNRTAgmIOG2BzxxVHh8'
Response:
[
{
"device_type": "287B1",
"serial_number": "MMT0064A",
"firmware_version": "4.20",
"battery_level": 100,
"updated_at": "2023-08-03 09:31:20"
},
{
"device_type": "287B1",
"serial_number": "0103192A",
"firmware_version": "4.20",
"battery_level": 60,
"updated_at": "2023-07-28 07:30:06"
},
{
"device_type": "287B1",
"serial_number": "MMT0065A",
"firmware_version": "3.82",
"battery_level": 19,
"updated_at": "2022-01-20 11:59:21"
}
]