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

POST Log Activity same start time

Hi,

 

I'm posting activities to POST /1/user/-/activities.json - Log Activity

 

I've got a scenario where I'm adding two activities with the same start time (I know, you can't do two things at once) however when attempting to post the second activity, the response I get back is the first activity.

So, I post the first activity and the response I get is a 201 Created with a response body of the activity posted. Then, I post the second activity but this time I get a 200 OK with a response body of the first activity posted.

I know the start time for both activities are the same, which would explain why the second activity seemingly doesn't get created. So, is the 200 OK I receive when trying to add the second activity an indication that an activity already exists with the same start time so I should handle that respectively?

 

Alex

Best Answer
0 Votes
2 REPLIES 2

Hi @Meyers0503 

 

I can agree with you that it should not be possible to log two activities with the same start time, however, I was able to reproduce your scenario on my end.

 

I believe that the 200 you and I are seeing is the incorrect status code that is being returned. With that in mind, I will be following up with the team to address this scenario and discuss the best status code to return for this situation.

 

Thanks for bringing this to my attention! Let me know if you have any other questions.

Best Answer
0 Votes

Hi @JohnFitbit 

 

Thanks for the reply. I'm glad you've been able to reproduce the scenario I played out.

 

Hopefully this issue is fixed soon, but I can workaround it for the moment. It was more to make sure that my expectation of the API response was right.

 

Alex

Best Answer
0 Votes