POST api/bot/MaxSendMessage

Отправка сообщений в мессенджер MAX пользователю или в группу

Request Information

URI Parameters

None.

Body Parameters

MaxSendMessageRequest
NameDescriptionTypeAdditional information
ApiURL

Полный адрес метода api Max с указанным user_id или chat_id

string

None.

MaxBotToken

Авторизационный токен бота, от чьего имени отправляется сообщение

string

None.

Format

Формат сообщения: "html" или "markdown"

string

None.

Text

Текст сообщения

string

None.

Operator

Идентификатор оператора программы лояльности

integer

None.

Token

Токен пользователя, который инициирует данный запрос

integer

None.

SiteCode

Уникальный код виджета по продаже подарочных сертификатов, который инициирует запрос

string

None.

Request Formats

application/json, text/json

Sample:
{
  "ApiURL": "sample string 1",
  "MaxBotToken": "sample string 2",
  "Format": "sample string 3",
  "Text": "sample string 4",
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 5"
}

application/xml, text/xml

Sample:
<MaxSendMessageRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request">
  <Operator xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Operator>
  <SiteCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 5</SiteCode>
  <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token>
  <ApiURL>sample string 1</ApiURL>
  <Format>sample string 3</Format>
  <MaxBotToken>sample string 2</MaxBotToken>
  <Text>sample string 4</Text>
</MaxSendMessageRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

MaxSendMessageResponse
NameDescriptionTypeAdditional information
Result

Результат отправки сообщения

boolean

None.

Code

Код ошибки (от мессенджера)

string

None.

Mid

Идентификатор отправленного сообщения

string

None.

ErrorCode

Код ошибки

integer

None.

Message

Сообщение об ошибке

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Result": true,
  "Code": "sample string 2",
  "Mid": "sample string 3",
  "ErrorCode": 4,
  "Message": "sample string 5"
}

application/xml, text/xml

Sample:
<MaxSendMessageResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">4</ErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 5</Message>
  <Code>sample string 2</Code>
  <Mid>sample string 3</Mid>
  <Result>true</Result>
</MaxSendMessageResponse>