GET api/checknewmessages/{sessionID}/{corrID}/{corrType}/{lastID}
Проверяет наличие новых сообщений в переписке
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| sessionID |
ID сессии (получается при логине) |
string |
Required |
| corrID |
ID корреспондента |
integer |
Required |
| corrType |
Тип корреспондента ("support", "admin", "user", "buyer", "visitor", "anonym") |
string |
Required |
| lastID |
ID последнего сообщения (если в базе есть больше, значит есть новые сообщения) |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
CheckNewMessagesResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| retval |
Код возврата (0 - ок, иначе - ошибка) |
integer |
None. |
| desc |
Текстовая расшифровка кода возврата (описание ошибки) |
string |
None. |
| exists |
Результат проверки (0 - нет, 1 - есть сообщения) |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"retval": 1,
"desc": "sample string 2",
"exists": 3
}
application/xml, text/xml
Sample:
<checknew.response> <retval>1</retval> <desc>sample string 2</desc> <exists>3</exists> </checknew.response>