messaging.notice

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
id (required)integerNotice id

UPDATE

ParametersTypeDescription
token (required)Valid token
id (required)integerNotice id
groups (accepted)varcharGroups that notice has to be sent
2 - Manager
3 - Supervisors
4 - Scheduler
5 - Employee
6 - Accountant
7 - Schedule viewer
subject (accepted)varcharNotice subject
message (accepted)varcharNotice message content
start_timestamp (accepted)varcharNotice start date
end_timestamo (accepted)varcharNotice end date
visible_name (accepted)enum (0,1)Should notice sender be known
0 - no
1 - yes

CREATE

ParametersTypeDescription
token (required)Valid token
groups (accepted)varcharGroups that notice has to be sent
subject (required)varcharNotice subject
message (required)varcharNotice message content
start_timestamp (accepted)varcharNotice start date
end_timestamo (accepted)varcharNotice end date
visible_name (accepted)enum (0,1)Should notice sender be known
0 - no
1 - yes

DELETE

ParametersTypeDescription
token (required)Valid token
id (required)integerNotice id

DOCUMENTATION

GET
Gets specified group account notice.
Level 5 is required.

--

Example Request:

{  
    "module":"messaging.notice",
    "method":"GET",
    "request":{  
        "id":"203"
    }
}

Example response:

{
  "status": 1,
  "data": {
    "203": {
      "id": "203",
      "franchise": "202039",
      "date_sent": "2017-06-08 14:35:04",
      "subject": "Notice",
      "message": "Test Notice",
      "groups": [
        "5",
        "4",
        "3",
        "2",
        "6",
        "7"
      ],
      "start_timestamp": {
        "id": 2962,
        "month": 6,
        "day": 8,
        "wday": 4,
        "year": 2017,
        "weekday": "Thu",
        "mname": "Jun",
        "week": 23,
        "dayid": 5,
        "timeid": 1,
        "timeid_exact": 1,
        "formatted": "Jun 8, 2017",
        "iso8601": "2017-06-08T00:00:00+0300",
        "time": "12:00am",
        "timestamp": 1496869200,
        "hours": 0,
        "minutes": 0,
        "seconds": 0,
        "date": "2017-06-08 00:00:00",
        "day_of_year": "158",
        "week_adjusted": 23,
        "sp_wday": 5
      },
      "end_timestamp": {
        "id": -14363,
        "month": 11,
        "day": 30,
        "wday": 1,
        "year": -1,
        "weekday": "Mon",
        "mname": "Nov",
        "week": 49,
        "dayid": 2,
        "timeid": 1,
        "timeid_exact": 1,
        "formatted": "Nov 30, -0001",
        "iso8601": "-0001-11-30T00:00:00+0200",
        "time": "12:00am",
        "timestamp": -62169991200,
        "hours": 0,
        "minutes": 0,
        "seconds": 0,
        "date": "-0001-11-30 00:00:00",
        "day_of_year": "333",
        "week_adjusted": 49,
        "sp_wday": 2
      },
      "last_edited": "2017-06-08 14:48:12",
      "edited_by": "2097936",
      "from": "2097936",
      "visible_name": "0"
    }
  },
  "token": "xxxxxxx"
}

CREATE
Creates a new group account notice.
Level 2 is required.

--

Example Request:

{  
    "module":"messaging.notice",
    "method":"CREATE",
    "request":{  
        "groups":"2",
        "subject":"Test Notice"
    }
}

Example response:

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

UPDATE
Updates specified group account notice.
Level 2 is required.

--

Example Request:

{  
    "module":"messaging.notice",
    "method":"UPDATE",
    "request":{  
         "id":"203",
         "groups":"5",
    }
}

Example response:

{
  "status": 1,
  "data": "Notice Updated",
  "token": "xxxxxxx"
}

DELETE
Deletes specified group account notice.
Level 3 is required.

--

Example Request:

{  
    "module":"messaging.notice",
    "method":"DELETE",
    "request":{  
         "id":"203"
    }
}

Example response:

{
  "status": 1,
  "data": "Notice Deleted",
  "token": "xxxxxxx"
}