schedule.trades

Returns a list of trades.

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
mode (accepted)enum (manage, requested, swap)manage: Manage trades
requested: Requested trades
swap: swap request

DOCUMENTATION

GET
Retrieves a list of trades.
Level 5 is required (all users can fetch this module)

--

Parameters:

Example Request:

{
   "module":"schedule.trades",
   "method":"GET",
   "request":{
 
   }
}

Example response:

{
   "status":1,
   "data":[
      {
         "id":"238",
         "status":"0",
         "user":"5144",
         "shift":"94220",
         "store":"11",
         "reference":null,
         "reason":"No big reason",
         "date":"1339498178",
         "confirm_before":"0",
         "confirm_after":"0",
         "trade_to":"0",
         "shift_start_date":{
            "id":"1150",
            "month":"6",
            "day":"22",
            "year":"2017",
            "weekday":"Fri",
            "mname":"Jun",
            "week":"7",
            "dayid":6,
            "formatted":"Jun 22, 2017"
         },
         "shift_start":"33",
         "shift_end":"73",
         "shift_schedule":"33499",
         "schedule_name":"Budget 1",
         "user_name":"Andy",
         "requested":{
            "id":"1140",
            "month":"6",
            "day":"7",
            "year":"2017",
            "weekday":"Tue",
            "mname":"Jun",
            "week":"24",
            "dayid":3,
            "formatted":"Jun 12, 2017"
         },
         "shift_start_time":"8 am",
         "shift_end_time":"6 pm",
         "traders":{
            "count":2,
            "data":[
               {
                  "id":"2297",
                  "trade_id":"238",
                  "shift":"94220",
                  "user":"5145",
                  "confirmed":"0",
                  "approved":"0",
                  "sms":"0",
                  "email":"0",
                  "online":"0",
                  "user_name":"Bond"
               },
               {
                  "id":"2298",
                  "trade_id":"238",
                  "shift":"94220",
                  "user":"5245",
                  "confirmed":"0",
                  "approved":"0",
                  "sms":"0",
                  "email":"0",
                  "online":"0",
                  "user_name":"Ian Graham"
               }
            ]
         }
      }
   ],
   "token":"xxxxxxx"
}