Discussions

Ask a Question
Back to All

Availability

I need to get employees availability on a certain date and certain interval. I am using the php sdk but that feature is not present in the code. I can craft my code based on your api v2 but when I looked into https://platform.humanity.com/v2.0/reference#get-weekly-availability the query params make no sense to me.
What does the following means and where to get them:

  • approved
  • day (i assume this is the week day starting from 1)
  • timeframe

Also the results are cryptic, i got a something like this

"status": 1,
"data": {
"id": "1",
"day": "Sun",
"availability": {
"1": {
"flag": 1,
"approved": 1353400175
},
"2": {
"flag": 1,
"approved": 1353400175
},

From what I understand this seems to be a 96 length array corresponding to 15 minutes division of a day, but the results seems to indicate the periods when the people are not available, instead of when they are.