POST api/messages/new/{sessionID}

Отправка нового сообщения гостю (параметры нового сообщения передаются в POST)

Request Information

URI Parameters

NameDescriptionTypeAdditional information
sessionID

ID сессии (получается при логине)

string

Required

Body Parameters

NewMessage
NameDescriptionTypeAdditional 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:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'NewMessage'.

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
NameDescriptionTypeAdditional 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>