messaging.wall

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token

CREATE

ParametersTypeDescription
token (required)Valid token
post (required)varcharPost
id (accepted)integerMessage id
(create comment on message with given id)
title (accepted)varcharMessage title
sticky (accepted)enum (0,1)Is wall message sticky?

0: Message is not sticky
1: Message is sticky

DELETE

ParametersTypeDescription
token (required)Valid token
id (required)integerMessage or comment id
delete (required)enum(message,comment)What request should delete (message or comment)

UPDATE

ParametersTypeDescription
token (required)Valid token
id (required)integerMessage id
sticky (required)enum (0,1)Is wall message sticky?

0: Message is not sticky
1: Message is sticky

DOCUMENTATION

GET
Gets wall messages and comments.
Level 5 is required.

--

Example Request:

{
   "module":"messaging.wall",
   "method":"GET",
   "request":{

   }
}

Example Response:

{  
    "status":1,
    "data":[  
        {  
            "id":"171",
            "user":{  
                "id":"12",
                "name":"Alan Ford"
            },
            "date":"1337627278",
            "sticky":"0",
            "title":"Testing",
            "post":"Hello",
            "title_formatted":"Testing",
            "post_formatted":"Hello"
        },
        {  
            "id":"168",
            "user":{  
                "id":"5147",
                "name":"Bob Rock"
            },
            "date":"1337342896",
            "sticky":"0",
            "title":"Hi",
            "post":"Vihiiiiiiiiii :*",
            "title_formatted":"Hi",
            "post_formatted":"Vihiiiiiiiiii :*"
        },
        {  
            "id":"167",
            "user":{  
                "id":"4910",
                "name":"No 1"
            },
            "date":"1337341670",
            "sticky":"0",
            "title":"No avatar",
            "post":"test",
            "title_formatted":"No avatar",
            "post_formatted":"test",
            "comments":[  
                {  
                    "id":"217",
                    "user":{  
                        "id":"2",
                        "name":"Alan Ford"
                    },
                    "date":"1337342655",
                    "comment":"bla",
                    "comment_formatted":"bla"
                },
                {  
                    "id":"218",
                    "user":{  
                        "id":"5147",
                        "name":"Bob Rock"
                    },
                    "date":"1337348928",
                    "comment":"asdf",
                    "comment_formatted":"asdf"
                }
            ]
        }
    ],
    "token":"xxxxxxx"
}

CREATE
Creates a new wall message or comment.
If message id is being specified, a comment is added. Else, a new message is being created. A user can create new wall messages/comments, only if it is enabled in admin settings.
Level 5 is required.

--

Example Request:

{
       "module":"messaging.wall",
       "method":"CREATE",
       "request":{
          "title":"New Title",
          "post":"New message"
       }
    }

Example Response:

{
       "status":1,
       "data":[],
       "token":"xxxxxxx"
    }

DELETE
Deletes wall message or comment.
Level 5 is required.

--

Example Request:

{
       "module":"messaging.wall",
       "method":"DELETE",
       "request":{
          "id":"934",
          "delete":"message"
       }
    }

Example Response:

{
       "status":1,
       "data":[],
       "token":"xxxxxxx"
    }

UPDATE
Updates wall message,
Level 4 is required.

--

Example Request:

{
      "module":"messaging.wall",
      "method":"UPDATE",
      "request":{
        "id":"1368352",
        "sticky":"1"
      }
    }

Example Response:

{
  "status":1,
  "data":[
    {
      "id":1368352,
      "company_id":343161,
      "user_id":3999339,
      "date":"1544538431",
      "sticky":"1",
      "title":"Post Title",
      "post":"Post",
      "deleted":"0",
      "deleted_by":0
   }
  ],
  "token":"xxxxxxx"
}