Definition

POST - 3/surveys/{surveyId}/pages/{pageNumber}/branching

Early access feature - Creates page branch logic.

Required roles: Survey (write)

Request information

surveyId

The id of a survey.


Type integer
Additional info
Required
pageNumber

The id of a survey.


Type integer
Additional info
Required

Logic object to create page branching.

Logics

Collection of logic items


Type Collection of LogicCreate
ElsePage

Logic details of the Else branch


Sample:
{
  "Logics": [
    {
      "LogicOperatorId": 1,
      "Items": [
        {
          "MetadataTypeId": 64,
          "OperatorId": 1,
          "QuestionId": 1,
          "ResponseId": 1,
          "Value": "sample string 2",
          "QueryStringParameter": "sample string 3"
        },
        {
          "MetadataTypeId": 64,
          "OperatorId": 1,
          "QuestionId": 1,
          "ResponseId": 1,
          "Value": "sample string 2",
          "QueryStringParameter": "sample string 3"
        }
      ],
      "GotoPage": 1,
      "GotoURL": {
        "RespondentStatus": 1,
        "Url": "sample string 1"
      }
    },
    {
      "LogicOperatorId": 1,
      "Items": [
        {
          "MetadataTypeId": 64,
          "OperatorId": 1,
          "QuestionId": 1,
          "ResponseId": 1,
          "Value": "sample string 2",
          "QueryStringParameter": "sample string 3"
        },
        {
          "MetadataTypeId": 64,
          "OperatorId": 1,
          "QuestionId": 1,
          "ResponseId": 1,
          "Value": "sample string 2",
          "QueryStringParameter": "sample string 3"
        }
      ],
      "GotoPage": 1,
      "GotoURL": {
        "RespondentStatus": 1,
        "Url": "sample string 1"
      }
    }
  ],
  "ElsePage": {
    "ElseGotoPage": 1,
    "ElseGotoURL": {
      "RespondentStatus": 1,
      "Url": "sample string 1"
    }
  }
}
Sample:
<LogicsCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Logics>
    <LogicCreate>
      <LogicOperatorId>AND</LogicOperatorId>
      <Items>
        <LogicItemBase>
          <MetadataTypeId>64</MetadataTypeId>
          <OperatorId>1</OperatorId>
          <QuestionId>1</QuestionId>
          <ResponseId>1</ResponseId>
          <Value>sample string 2</Value>
          <QueryStringParameter>sample string 3</QueryStringParameter>
        </LogicItemBase>
        <LogicItemBase>
          <MetadataTypeId>64</MetadataTypeId>
          <OperatorId>1</OperatorId>
          <QuestionId>1</QuestionId>
          <ResponseId>1</ResponseId>
          <Value>sample string 2</Value>
          <QueryStringParameter>sample string 3</QueryStringParameter>
        </LogicItemBase>
      </Items>
      <GotoPage>1</GotoPage>
      <GotoURL>
        <RespondentStatus>ReachedEnd</RespondentStatus>
        <Url>sample string 1</Url>
      </GotoURL>
    </LogicCreate>
    <LogicCreate>
      <LogicOperatorId>AND</LogicOperatorId>
      <Items>
        <LogicItemBase>
          <MetadataTypeId>64</MetadataTypeId>
          <OperatorId>1</OperatorId>
          <QuestionId>1</QuestionId>
          <ResponseId>1</ResponseId>
          <Value>sample string 2</Value>
          <QueryStringParameter>sample string 3</QueryStringParameter>
        </LogicItemBase>
        <LogicItemBase>
          <MetadataTypeId>64</MetadataTypeId>
          <OperatorId>1</OperatorId>
          <QuestionId>1</QuestionId>
          <ResponseId>1</ResponseId>
          <Value>sample string 2</Value>
          <QueryStringParameter>sample string 3</QueryStringParameter>
        </LogicItemBase>
      </Items>
      <GotoPage>1</GotoPage>
      <GotoURL>
        <RespondentStatus>ReachedEnd</RespondentStatus>
        <Url>sample string 1</Url>
      </GotoURL>
    </LogicCreate>
  </Logics>
  <ElsePage xmlns:d2p1="http://schemas.datacontract.org/2004/07/CheckMarket.Common.APIModels">
    <d2p1:ElseGotoPage>1</d2p1:ElseGotoPage>
    <d2p1:ElseGotoURL>
      <RespondentStatus>ReachedEnd</RespondentStatus>
      <Url>sample string 1</Url>
    </d2p1:ElseGotoURL>
  </ElsePage>
</LogicsCreate>

Response information

Returns status message if the launch was successful or not.


Meta

The metadata such as paging parameters, status code, timestamp,... which are related to this request.


Type MetaData
Data

The actual data returned by the request.


Links

HATEOAS related to this object. It wil contain relevant url's such as previous and next page for paged results, create/update/delete action. These url's can be used in your application for the next steps in your application logic.


Type Hateoas
Sample:
{
  "Meta": {
    "Status": 1,
    "TotalRowCount": 1,
    "Limit": 1,
    "Offset": 1,
    "TotalPageCount": 1,
    "StartRec": 1,
    "StopRec": 1,
    "Timestamp": "2024-11-10T01:03:16.876364Z",
    "IsFiltered": true
  },
  "Data": {
    "Succeeded": true,
    "FailureMessage": "sample string 2"
  }
}
Sample:
<Payload xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
  <Data>
    <FailureMessage>sample string 2</FailureMessage>
    <Succeeded>true</Succeeded>
  </Data>
  <Meta>
    <IsFiltered>true</IsFiltered>
    <Limit>1</Limit>
    <Offset>1</Offset>
    <StartRec>1</StartRec>
    <Status>1</Status>
    <StopRec>1</StopRec>
    <Timestamp>2024-11-10T01:03:16.876364+00:00</Timestamp>
    <TotalPageCount>1</TotalPageCount>
    <TotalRowCount>1</TotalRowCount>
  </Meta>
</Payload>