Returns Weekly Availability for a user
SUPPORTED METHODS:
GET
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
user (accepted) | integer | User id |
approved (accepted) | integer | Filter unapproved or approved availability 0: Unapproved 1: Approved |
day (accepted) | enum (1, 2, 3, 4, 5, 6, 7) | 1: Sunday 2: Monday 3: Tuesday 4: Wednesday 5: Thursday 6: Friday 7: Saturday |
timeframe (accepted) | min length 1 | Timeframe |
UPDATE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
flag (required) | enum (1, 2, 3) | 1: Unavailable 2: Available 3: Changed |
user (accepted) | integer | User id |
day (accepted) | enum (1, 2, 3, 4, 5, 6, 7) | 1: Sunday 2: Monday 3: Tuesday 4: Wednesday 5: Thursday 6: Friday 7: Saturday |
start_time (accepted) | time | Start time |
end_time (accepted) | time | End time |
intervals (accepted) | enum (Array) | Availability interval, json {"date_id":["start_time_id", "end_time_id"]} Parameters "start_time_id" and "end_time_id" can take values from 1 to 96 (24 hours splitted into 15 min intervals) |
DELETE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
start_time (required) | time | Start time |
end_time (required) | time | End time |
user (accepted) | integer | User id |
DOCUMENTATION
GET
Returns Weekly Availability for a user.
Level 5 is required (all users can fetch this module)
--
Example Request:
{
"method":"GET",
"module":"availability.weekly",
"request":{
"user":2097936,
"day":1
}
}
Example Response:
{
"status": 1,
"data": {
"1": {
"1": {
"flag": "2",
"approved": null
},
"2": {
"flag": "2",
"approved": null
},
"3": {
"flag": "2",
"approved": null
},
"4": {
"flag": "2",
"approved": null
},
"5": {
"flag": "2",
"approved": null
},
"6": {
"flag": "2",
"approved": null
},
"7": {
"flag": "2",
"approved": null
},
"8": {
"flag": "2",
"approved": null
},
"9": {
"flag": "2",
"approved": null
},
"10": {
"flag": "2",
"approved": null
},
"11": {
"flag": "2",
"approved": null
},
"12": {
"flag": "2",
"approved": null
},
"13": {
"flag": "2",
"approved": null
},
"14": {
"flag": "2",
"approved": null
},
"15": {
"flag": "2",
"approved": null
},
"16": {
"flag": "2",
"approved": null
},
"17": {
"flag": "2",
"approved": null
},
"18": {
"flag": "2",
"approved": null
},
"19": {
"flag": "2",
"approved": null
},
"20": {
"flag": "2",
"approved": null
},
"21": {
"flag": "2",
"approved": null
},
"22": {
"flag": "2",
"approved": null
},
"23": {
"flag": "2",
"approved": null
},
"24": {
"flag": "2",
"approved": null
},
"25": {
"flag": "2",
"approved": null
},
"26": {
"flag": "2",
"approved": null
},
"27": {
"flag": "2",
"approved": null
},
"28": {
"flag": "2",
"approved": null
},
"29": {
"flag": "2",
"approved": null
},
"30": {
"flag": "2",
"approved": null
},
"31": {
"flag": "2",
"approved": null
},
"32": {
"flag": "2",
"approved": null
},
"33": {
"flag": "2",
"approved": null
},
"34": {
"flag": "2",
"approved": null
},
"35": {
"flag": "2",
"approved": null
},
"36": {
"flag": "2",
"approved": null
},
"37": {
"flag": "2",
"approved": null
},
"38": {
"flag": "2",
"approved": null
},
"39": {
"flag": "2",
"approved": null
},
"40": {
"flag": "2",
"approved": null
},
"41": {
"flag": "2",
"approved": null
},
"42": {
"flag": "2",
"approved": null
},
"43": {
"flag": "2",
"approved": null
},
"44": {
"flag": "2",
"approved": null
},
"45": {
"flag": "2",
"approved": null
},
"46": {
"flag": "2",
"approved": null
},
"47": {
"flag": "2",
"approved": null
},
"48": {
"flag": "2",
"approved": null
},
"49": {
"flag": "2",
"approved": null
},
"50": {
"flag": "2",
"approved": null
},
"51": {
"flag": "2",
"approved": null
},
"52": {
"flag": "2",
"approved": null
},
"53": {
"flag": "2",
"approved": null
},
"54": {
"flag": "2",
"approved": null
},
"55": {
"flag": "2",
"approved": null
},
"56": {
"flag": "2",
"approved": null
},
"57": {
"flag": "2",
"approved": null
},
"58": {
"flag": "2",
"approved": null
},
"59": {
"flag": "2",
"approved": null
},
"60": {
"flag": "2",
"approved": null
},
"61": {
"flag": "2",
"approved": null
},
"62": {
"flag": "2",
"approved": null
},
"63": {
"flag": "2",
"approved": null
},
"64": {
"flag": "2",
"approved": null
},
"65": {
"flag": "2",
"approved": null
},
"66": {
"flag": "2",
"approved": null
},
"67": {
"flag": "2",
"approved": null
},
"68": {
"flag": "2",
"approved": null
},
"69": {
"flag": "2",
"approved": null
},
"70": {
"flag": "2",
"approved": null
},
"71": {
"flag": "2",
"approved": null
},
"72": {
"flag": "2",
"approved": null
},
"73": {
"flag": "2",
"approved": null
},
"74": {
"flag": "2",
"approved": null
},
"75": {
"flag": "2",
"approved": null
},
"76": {
"flag": "2",
"approved": null
},
"77": {
"flag": "2",
"approved": null
},
"78": {
"flag": "2",
"approved": null
},
"79": {
"flag": "2",
"approved": null
},
"80": {
"flag": "2",
"approved": null
},
"81": {
"flag": "2",
"approved": null
},
"82": {
"flag": "2",
"approved": null
},
"83": {
"flag": "2",
"approved": null
},
"84": {
"flag": "2",
"approved": null
},
"85": {
"flag": "2",
"approved": null
},
"86": {
"flag": "2",
"approved": null
},
"87": {
"flag": "2",
"approved": null
},
"88": {
"flag": "2",
"approved": null
},
"89": {
"flag": "2",
"approved": null
},
"90": {
"flag": "2",
"approved": null
},
"91": {
"flag": "2",
"approved": null
},
"92": {
"flag": "2",
"approved": null
},
"93": {
"flag": "2",
"approved": null
},
"94": {
"flag": "2",
"approved": null
},
"95": {
"flag": "2",
"approved": null
},
"96": {
"flag": "2",
"approved": null
},
"id": 1,
"day": "Sun"
}
},
"token": "xxxxxxxx"
}
UPDATE
Updates Weekly Availability for a user.
Level 5 is required
--
Example Request:
{
"method":"UPDATE",
"module":"availability.weekly",
"request":{
"flag":"1",
"user":"xxxxxx",
"intervals": {"1":["1","7"],"2":["8","12"]}
}
}
Example Response:
{
"status":1,
"data":"Availability Updated",
"token":"xxxxxxx"
}
DELETE
Deletes Weekly Availability for a user.
Level 5 is required (all users can fetch this module)
--
Example Request:
{
"method":"DELETE",
"module":"availability.weekly",
"request":{
"start_time":1,
"end_time":5,
}
}
Example Response:
{
"status":1,
"data":"Availability Updated",
"token":"xxxxxxx"
}