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

AddAlarm and UpdateAlarm endpoints seem to be ignoring the weekDays parameter

ANSWERED

Hello, I am currently developing a PHP SDK and  a Laravel wrapper to easily integrate this kind of written applications and webpages with your API.

I was currently testing my code and I've noticed something that seems to be wrong, now I'm implementing the Device operations, and while checking the set of all the Alarm parameters the weekDays parameter seems to do nothing while Adding Alarms and Updating Alarms

 

This are some URL queries I'm debugging:

 

For creating:

 

https://api.fitbit.com/1/user/-/devices/tracker/702512773/alarms.json?time=19%3A08%2B00%3A00&enabled=true&recurring=false&weekDays=MONDAY

For updating:

 

 

https://api.fitbit.com/1/user/-/devices/tracker/702512773/alarms/897876588.json?time=19%3A08%2B00%3A00&enabled=true&recurring=false&weekDays=MONDAY%2CSUNDAY&snoozeLength=30&snoozeCount=40&label=someLabel

For both of them all the parameters are correcly set but the weekDays list seems to always be an empty string. Am I doing something wrong? Is someone else experiencing this issue?

Thanks!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @namelivia,

 

Welcome to the forums!

 

I'm sorry to hear that your weekDays array isn't populating with the days you specified and I am happy to provide additional clarification.

 

It appears that you cannot have specified days in the weekDays array if recurring is set to "false". When adding an alarm on the Fitbit app and web dashboard at fitbit.com from a customer perspective, you can only bring up the options for M/T/W/Thu/F/S/Su if you select a recurring schedule.

 

This means that we currently don't support adding a non-recurring alarm for a future day through the app or web dashboard. This is why you are seeing an empty "[]" array for the weekDays property when executing these API calls. If you set recurring to "true", your alarm will POST successfully. With that in mind, you can only set either a next day alarm or recurring alarm, but not a non-recurring future day alarm. 

 

I hope this clears things up. Please let me know if you have any additional questions.

 

View best answer in original post

Best Answer
2 REPLIES 2

Hi @namelivia,

 

Welcome to the forums!

 

I'm sorry to hear that your weekDays array isn't populating with the days you specified and I am happy to provide additional clarification.

 

It appears that you cannot have specified days in the weekDays array if recurring is set to "false". When adding an alarm on the Fitbit app and web dashboard at fitbit.com from a customer perspective, you can only bring up the options for M/T/W/Thu/F/S/Su if you select a recurring schedule.

 

This means that we currently don't support adding a non-recurring alarm for a future day through the app or web dashboard. This is why you are seeing an empty "[]" array for the weekDays property when executing these API calls. If you set recurring to "true", your alarm will POST successfully. With that in mind, you can only set either a next day alarm or recurring alarm, but not a non-recurring future day alarm. 

 

I hope this clears things up. Please let me know if you have any additional questions.

 

Best Answer

Hello John,

Thanks for the clarification, it makes sense. I've tested my SDK keeping in mind what you just wrote and the weekDays array is being set as expected.

Thank you!

Best Answer
0 Votes