POST api/newmessage/{sessionID}
Отправка нового сообщения гостю (параметры нового сообщения передаются в POST)
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| sessionID |
ID сессии (получается при логине) |
string |
Required |
Body Parameters
NewMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| CorrType |
Тип корреспондента ("support", "admin", "user", "buyer", "visitor", "anonym") |
string |
None. |
| CorrID |
ID корреспондента |
integer |
None. |
| Text |
Текст сообщения |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"CorrType": "sample string 1",
"CorrID": 2,
"Text": "sample string 3"
}
application/x-www-form-urlencoded
Sample:
application/xml, text/xml
Sample:
<NewMessage> <corrType>sample string 1</corrType> <corrID>2</corrID> <text>sample string 3</text> </NewMessage>
Response Information
Resource Description
NewMessageResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| retval |
Код возврата (0 - ок, иначе - ошибка) |
integer |
None. |
| desc |
Текстовая расшифровка кода возврата (описание ошибки) |
string |
None. |
| id |
ID отправленного сообщения |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"retval": 1,
"desc": "sample string 2",
"id": 3
}
application/xml, text/xml
Sample:
<newmessage.response> <retval>1</retval> <desc>sample string 2</desc> <id>3</id> </newmessage.response>