schedule.tradeswap

SUPPORTED METHODS:

CREATE

ParametersTypeDescription
token (required)Valid token
shift (required)integerShift id
swap (required)varcharShifts 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)varcharReason

UPDATE

ParametersTypeDescription
token (required)Valid token
trade (required)integerTrade 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)integerUser id
shift_for_swap (accepted)integerShift 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"
}