Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

data from tempSkin API doesn't match mobile App

Dear there, 

The data from tempSkin API doesn't match mobile App. Please check the meta data and screenshot.

  • April-19: 0.1 v 0.0
  • April-22: -1.0 v -0.6
  • April-23: 0.0 v -0.0
  • April-24: 0.1 v 0.0

 

```

{ "tempSkin": [ { "dateTime": "2024\-04\-19", "value": { "nightlyRelative": 0.0 }, "logType": "dedicated_temp_sensor" }, { "dateTime": "2024\-04\-22", "value": { "nightlyRelative": -0.6 }, "logType": "dedicated_temp_sensor" }, { "dateTime": "2024\-04\-23", "value": { "nightlyRelative": -0.0 }, "logType": "dedicated_temp_sensor" }, { "dateTime": "2024\-04\-24", "value": { "nightlyRelative": 0.0 }, "logType": "dedicated_temp_sensor" } ] }

```

 

IMG_4C344CFE87C1-1.jpeg

Best Answer
0 Votes
5 REPLIES 5

Hi @HeadsUpHealth 

When calling the skin temperature endpoint, are you specifying the accept-language header?   From the testing I have done, it looks like the default response is in celcius.   If you specify the accept-language=en_US, the response is in fahrenheit, which is what the data in the mobile application is showing.   

In the documentation, we state the nightlyRelative value is "It is displayed to the user as a delta from their baseline temperature in degrees Celsius or Fahrenheit depending on the country specified in the Accept-Language header."

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Thanks @Gordon-C 

It works if I specify the accept-language=en_US. 

Do you know how could I convert a Celsius nightlyRelative value to Fahrenheit?

Best Answer
0 Votes

Hi @HeadsUpHealth 

I'm confused by your question because skin temperature only returns the nightlyRelative value, and that was the information I provided in my previous post.  If you're thinking of the core temperature's value, you should use the same header.   See Core Temperature Response.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @Gordon-C 

The different values are caused by different units(celcius vs fahrenheit).

So, in my example above(April-22: -1.0 v -0.6)

-1.0 is fahrenheit value
-0.6 is celcius value

I am wondering how to convert the values between fahrenheit unit and celcius unit.

 

 

 

 

Best Answer
0 Votes

Hi @HeadsUpHealth 

The values returned represent an average temperature change over the course of the sleep log.  I don't think you'll be able to implement a simple calculation to convert the values.   The best way to get the fahrenheit unit and celcius unit is applying the appropriate Accept-Language header value.   en_US will return fahrenheit units.  Anything else or not using the header will return metric units.   See Unit Systems.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes