POST api/questionnaire/Questionnaires

Получение опросов доступных для отображения и их настройки, в зависимости от входных фильтров

Request Information

URI Parameters

None.

Body Parameters

QuestionnairesRequest
NameDescriptionTypeAdditional information
Client

Идентификатор клиента в БД Mloyalty

integer

None.

ClientIShop

Идентификатор клиента в БД интернет-магазина или сайта

integer

None.

Questionnaire

Идентификатор опроса, по которому нужно получить данные

integer

None.

IsMobile

Признак, что запрос идёт из мобильного приложения

boolean

None.

SourceUrl

Адрес сайта, с которого идёт запрос

string

None.

Operator

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

integer

None.

Token

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

integer

None.

SiteCode

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

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Client": 1,
  "ClientIShop": 1,
  "Questionnaire": 1,
  "IsMobile": true,
  "SourceUrl": "sample string 1",
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 2"
}

application/xml, text/xml

Sample:
<QuestionnairesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request.QuestionnaireRequest">
  <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 2</SiteCode>
  <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token>
  <Client>1</Client>
  <ClientIShop>1</ClientIShop>
  <IsMobile>true</IsMobile>
  <Questionnaire>1</Questionnaire>
  <SourceUrl>sample string 1</SourceUrl>
</QuestionnairesRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

QuestionnairesResponse
NameDescriptionTypeAdditional information
QuestionnaireData

Данные по опроснику

Collection of QuestionnairesQuestionnaireData

None.

ErrorCode

Код ошибки

integer

None.

Message

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

string

None.

Response Formats

application/json, text/json

Sample:
{
  "QuestionnaireData": [
    {
      "Id": 1,
      "Title": "sample string 1",
      "Subtitle": "sample string 2",
      "Image": "sample string 3",
      "Text": "sample string 4",
      "UrlButton": "sample string 5",
      "NameButton": "sample string 6",
      "Type": 64,
      "Dynamic": true,
      "DataShown": true,
      "PosRequire": true,
      "ChequeRequire": true,
      "QuestionGroup": [
        {
          "Id": 1,
          "Name": "sample string 1"
        },
        {
          "Id": 1,
          "Name": "sample string 1"
        }
      ],
      "QuestionsData": [
        {
          "Id": 1,
          "LevelStep": 1,
          "Text": "sample string 1",
          "Group": 1,
          "ManyAnswer": true,
          "FreeAnswer": true,
          "CommentShown": true,
          "CommentRequire": true,
          "RelevantShown": true,
          "HelpForQuestionShown": true,
          "HelpForQuestionText": "sample string 2",
          "DescriptionQuestion": "sample string 3",
          "AnswersData": [
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            },
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            }
          ]
        },
        {
          "Id": 1,
          "LevelStep": 1,
          "Text": "sample string 1",
          "Group": 1,
          "ManyAnswer": true,
          "FreeAnswer": true,
          "CommentShown": true,
          "CommentRequire": true,
          "RelevantShown": true,
          "HelpForQuestionShown": true,
          "HelpForQuestionText": "sample string 2",
          "DescriptionQuestion": "sample string 3",
          "AnswersData": [
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            },
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            }
          ]
        }
      ]
    },
    {
      "Id": 1,
      "Title": "sample string 1",
      "Subtitle": "sample string 2",
      "Image": "sample string 3",
      "Text": "sample string 4",
      "UrlButton": "sample string 5",
      "NameButton": "sample string 6",
      "Type": 64,
      "Dynamic": true,
      "DataShown": true,
      "PosRequire": true,
      "ChequeRequire": true,
      "QuestionGroup": [
        {
          "Id": 1,
          "Name": "sample string 1"
        },
        {
          "Id": 1,
          "Name": "sample string 1"
        }
      ],
      "QuestionsData": [
        {
          "Id": 1,
          "LevelStep": 1,
          "Text": "sample string 1",
          "Group": 1,
          "ManyAnswer": true,
          "FreeAnswer": true,
          "CommentShown": true,
          "CommentRequire": true,
          "RelevantShown": true,
          "HelpForQuestionShown": true,
          "HelpForQuestionText": "sample string 2",
          "DescriptionQuestion": "sample string 3",
          "AnswersData": [
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            },
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            }
          ]
        },
        {
          "Id": 1,
          "LevelStep": 1,
          "Text": "sample string 1",
          "Group": 1,
          "ManyAnswer": true,
          "FreeAnswer": true,
          "CommentShown": true,
          "CommentRequire": true,
          "RelevantShown": true,
          "HelpForQuestionShown": true,
          "HelpForQuestionText": "sample string 2",
          "DescriptionQuestion": "sample string 3",
          "AnswersData": [
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            },
            {
              "Id": 1,
              "Text": "sample string 1",
              "Image": "sample string 2"
            }
          ]
        }
      ]
    }
  ],
  "ErrorCode": 1,
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<QuestionnairesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response.QuestionnaireResponse">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</ErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 2</Message>
  <QuestionnaireData>
    <QuestionnairesResponse.QuestionnairesQuestionnaireData>
      <ChequeRequire>true</ChequeRequire>
      <DataShown>true</DataShown>
      <Dynamic>true</Dynamic>
      <Id>1</Id>
      <Image>sample string 3</Image>
      <NameButton>sample string 6</NameButton>
      <PosRequire>true</PosRequire>
      <QuestionGroup>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
          <Id>1</Id>
          <Name>sample string 1</Name>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
          <Id>1</Id>
          <Name>sample string 1</Name>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
      </QuestionGroup>
      <QuestionsData>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
          <AnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
          </AnswersData>
          <CommentRequire>true</CommentRequire>
          <CommentShown>true</CommentShown>
          <DescriptionQuestion>sample string 3</DescriptionQuestion>
          <FreeAnswer>true</FreeAnswer>
          <Group>1</Group>
          <HelpForQuestionShown>true</HelpForQuestionShown>
          <HelpForQuestionText>sample string 2</HelpForQuestionText>
          <Id>1</Id>
          <LevelStep>1</LevelStep>
          <ManyAnswer>true</ManyAnswer>
          <RelevantShown>true</RelevantShown>
          <Text>sample string 1</Text>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
          <AnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
          </AnswersData>
          <CommentRequire>true</CommentRequire>
          <CommentShown>true</CommentShown>
          <DescriptionQuestion>sample string 3</DescriptionQuestion>
          <FreeAnswer>true</FreeAnswer>
          <Group>1</Group>
          <HelpForQuestionShown>true</HelpForQuestionShown>
          <HelpForQuestionText>sample string 2</HelpForQuestionText>
          <Id>1</Id>
          <LevelStep>1</LevelStep>
          <ManyAnswer>true</ManyAnswer>
          <RelevantShown>true</RelevantShown>
          <Text>sample string 1</Text>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
      </QuestionsData>
      <Subtitle>sample string 2</Subtitle>
      <Text>sample string 4</Text>
      <Title>sample string 1</Title>
      <Type>64</Type>
      <UrlButton>sample string 5</UrlButton>
    </QuestionnairesResponse.QuestionnairesQuestionnaireData>
    <QuestionnairesResponse.QuestionnairesQuestionnaireData>
      <ChequeRequire>true</ChequeRequire>
      <DataShown>true</DataShown>
      <Dynamic>true</Dynamic>
      <Id>1</Id>
      <Image>sample string 3</Image>
      <NameButton>sample string 6</NameButton>
      <PosRequire>true</PosRequire>
      <QuestionGroup>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
          <Id>1</Id>
          <Name>sample string 1</Name>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
          <Id>1</Id>
          <Name>sample string 1</Name>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionGroup>
      </QuestionGroup>
      <QuestionsData>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
          <AnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
          </AnswersData>
          <CommentRequire>true</CommentRequire>
          <CommentShown>true</CommentShown>
          <DescriptionQuestion>sample string 3</DescriptionQuestion>
          <FreeAnswer>true</FreeAnswer>
          <Group>1</Group>
          <HelpForQuestionShown>true</HelpForQuestionShown>
          <HelpForQuestionText>sample string 2</HelpForQuestionText>
          <Id>1</Id>
          <LevelStep>1</LevelStep>
          <ManyAnswer>true</ManyAnswer>
          <RelevantShown>true</RelevantShown>
          <Text>sample string 1</Text>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
        <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
          <AnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
            <QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
              <Id>1</Id>
              <Image>sample string 2</Image>
              <Text>sample string 1</Text>
            </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData.QuestionnairesAnswersData>
          </AnswersData>
          <CommentRequire>true</CommentRequire>
          <CommentShown>true</CommentShown>
          <DescriptionQuestion>sample string 3</DescriptionQuestion>
          <FreeAnswer>true</FreeAnswer>
          <Group>1</Group>
          <HelpForQuestionShown>true</HelpForQuestionShown>
          <HelpForQuestionText>sample string 2</HelpForQuestionText>
          <Id>1</Id>
          <LevelStep>1</LevelStep>
          <ManyAnswer>true</ManyAnswer>
          <RelevantShown>true</RelevantShown>
          <Text>sample string 1</Text>
        </QuestionnairesResponse.QuestionnairesQuestionnaireData.QuestionnairesQuestionsData>
      </QuestionsData>
      <Subtitle>sample string 2</Subtitle>
      <Text>sample string 4</Text>
      <Title>sample string 1</Title>
      <Type>64</Type>
      <UrlButton>sample string 5</UrlButton>
    </QuestionnairesResponse.QuestionnairesQuestionnaireData>
  </QuestionnaireData>
</QuestionnairesResponse>