schedule.breakrule

Management of break rules.

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
id (required)integerSchedule id

CREATE

ParametersTypeDescription
token (required)Valid token
id (required)integerSchedule id
break (required)integerBreak length in minutes
paid (required)enum (0,1)0 - not paid
1 - paid
min (accepted)varcharMinimum shift time
max (accepted)varcharMaximum shift time
exact (accepted)varchar

DELETE

ParametersTypeDescription
token (required)Valid token
id (required)integerBreak rule id

DOCUMENTATION

GET
Retrieves all break rules for schedule.
Level 7 is required.

--

Example Request:

{
   "module":"schedule.breakrule",
   "method":"GET",
   "request":{
      "id":138641
   }
}

Example Response:

{
   "status":1,
   "data":[
      {
         "id":"31733",
         "store":"17949",
         "schedule":"138641",
         "user":"247525",
         "min":"1",
         "max":"9",
         "break":"15",
         "paid":"1",
         "date":"1352377163"
      }
     
}

CREATE
Creates a new break rule.
Level 3 is required.

--

Example request:

{
   "module":"schedule.breakrule",
   "method":"CREATE",
   "request":{
      "id":31733,
      "break":15,
      "paid":1,
      "min":"1",
      "max":"9"
   }
}

Example Response:

{
   "status":1,
   "data":"Breakrule Created",
   "token":"xxxxxxx"
}

DELETE
Deletes break rule.
Level 3 is required.

--

Example Request:

{
   "module":"schedule.breakrule",
   "method":"DELETE",
   "request":{
      "id":26911
   }
}

Example Response:

{
   "status":1,
   "data":"Breakrule Removed",
   "token":"xxxxxxx"
}