SUPPORTED METHODS:
CREATE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
shift (required) | integer | Shift id |
swap (required) | varchar | Shifts to trade with Array of user_shift_id's (eg. "1435,5667") you get user_shift_id with schedule.tradelist and swap bit set to 1 |
reason (required) | varchar | Reason |
UPDATE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
trade (required) | integer | Trade id |
action (required) | enum (activate, deactivate, cancel, accept, reject) | required: Require trade deactivate: Deactivate trade cancel: Cancel trade accept: Accept trade reject: Reject trade |
user (accepted) | integer | User id |
shift_for_swap (accepted) | integer | Shift for swap |
DOCUMENTATION
CREATE
Creates an individual swap shift request.
Level 5 is required.
--
Example Request:
{
"module":"schedule.tradeswap",
"method":"CREATE",
"request":{
"shift":"13221461",
"reason":"No big reason",
"swap":"13221462,13221463"
}
}
Example Response:
{
"status":"1",
"data":{
},
"token":"xxxxxxxx"
}
UPDATE
Updates an individual swap shift request.
Level 5 is required.
--
Example Request:
{
"module":"schedule.tradeswap",
"method":"UPDATE",
"request":{
"trade":27265,
"action":"accept",
"user":2503236,
"shift_for_swap":236523
}
}
Example Response:
{
"status":"1",
"data":{
},
"token":"xxxxxxxx"
}