MENU

Messages

Endpoint

https://api.website.world/webapps/api/messages

Description

Messages are also known as enquiries, form posts, survey results etc

Parameters

Name Description Example Optional Data type
data The JSON you would like to POST. This can be POST content also
{

}
Yes json object
id Search a specific message by it's id id=123 Yes int

mbr_id

Search messages which were posted by a mbr_id mbr_id=1234 Yes int

postedAfter

Search messages which were posted after the time provided.

postedAfter="2021-01-01"

Yes string

postedBefore

Search messages which were posted before the time provided.

postedBefore="2021-12-31"

Yes string

orderby

Sort the results by latest date.

orderby = "date"

Yes string
forum_info_id or info_id
Messages on a specific blog 
forum_info_id=123123
Yesint
forum_pid or pid
Messages on a specific product
pid=123123
Yesint
msg_group_id
Forum posts from a specific group
msg_group_id=1234
Yesint
msg_re
Replies to existing comments
msg_re=123
Yesint

Create a new Message Post

To create a new message use POST method and do not provide any Message Id.
Provide the mbr_id if known or member email address as mbr_from. 

Example if mbr_id is known:

{

"mbr_id" : 12345,

"from_name": "Example Name",

"subject": "Subject of the post",

"body": "Example post body",

"page": 123

}

Example if mbr_id not known:

{

"submitter" : "example@email.com",

"from_name": "Example Name",

"subject": "Subject of the post",

"body": "Example post body",

"page": 123

}

Updateable Fields for Messages

submitted, submitter, from_name, from_phone, mbr_id, re_info_id, body, subject, re_listing_id, recipient, re_pid, re_eventid, closed_by_mbr_id, closed_date, enquirystatus, repliedon, msg_net_score, re_bookingid, msg_debug, notifywheninstock

Example url to get messages about a product with a product id 1234: https://dev.cms-tool.net/webapps/api/messages?pid=1234

Example Return JSON Messages

{
"endPoint": "messages",
"resultCount": 2,
"offset": 0,
"data": [
{
"submitter": "testemail@test.co.nz",
"from_phone": "021123123",
"subject": "Make a Booking 2021-12-14 15:00:00",
"mbr_id": 1234,
"msgid": 1413,
"posted_by_mbr_id": 1234,
"closed_by_mbr_id": 0,
"from_name": "John",
"body": "No comment was provided with booking ID:123",
"msg_debug": " ",
"re_eventid": 0,
"submitted": "2021-12-13 13:43:52.0",
"re_info_id": 0,
"re_bookingid": 123,
"id": 1413,
"page": 2222,
"re_pid": 1234,
"re_listing_id": 0,
"msg_net_score": 0,
"cid": 1234
},
{
"submitter": "testemaill@testemail.com",
"from_phone": "0212123431",
"subject": "Make a Booking 2021-12-25 15:00:00",
"mbr_id": 12,
"msgid": 141,
"posted_by_mbr_id": 12,
"closed_by_mbr_id": 0,
"from_name": "Jackson",
"body": "Example booking comment",
"msg_debug": " ",
"re_eventid": 0,
"submitted": "2021-12-24 12:21:28.0",
"re_info_id": 0,
"re_bookingid": 11,
"id": 141,
"page": 2222,
"re_pid": 1234,
"re_listing_id": 0,
"msg_net_score": 0,
"cid": 1234
}
],
"success": false,
"pageSize": 200
}