Get next page
Survey / Render & Capture
Get next page
Description
Get the next page of a survey
Request payload
{
"answers": {},
"currentPage": "number",
"userData": "string",
"path": array of numbers,
}
where:
answers: answers object (see Answers object)currentPage: number of the page that is shownuserData: encrypted user information and memory, should be it exactly as the last call returns of this or the “Get survey first page” endpointspath: an array of the current pages values that where displayed, included the current one
Answers object
The answers object should have all the answers that the user selected so far, the API consumer has to remove the ones that doesn’t apply in case of going back to a previous page.
{
"questionId1": {},
"questionId2": {},
"questionId3": {},
"questionId4": {},
}
where:
questionId*: is the question id which the asnwer belong, and the value is an answer object (see Answer object)
Answer object
The answer object depends on the type of question, the posible objects are:
For MC (including country and state from contact info) questions:
{
"na": boolean,
"values": array of numbers
}
where:
na: is true if the user selected the NA optionvalues: should be an array with all the positions of the answers selected by the user
For Grid (basic grid, including nps, max diff and max diff experiment) questions:
{
"na": boolean,
"values": {
"rowPosition": array of numbers
"rowPosition": array of numbers
}
}
where:
na: is true if the user selected the NA optionrowPosition: should be the position of the row which the values belong, for example{ 1: [1,2], 2: [3], 3: [1] }values: should be an array with all the positions of the answers selected by the user
For numeric/text entry questions:
{
"na": boolean,
"value": number/string
}
where:
na: is true if the user selected the NA optionvalue: value typed by the user
For Constant sum questions:
{
"na": boolean,
"values": {
"rowPosition": number
"rowPosition": number
}
}
where:
na: is true if the user selected the NA optionrowPosition: should be the position of the row which the value belong, for example{ 1: 1, 2: 10.6, 3: 90 }value: value typed by the user
For Rank Order questions:
{
"na": boolean,
"values": [
{
"selection": number,
"option": number,
},
{
"selection": number,
"option": number,
},
{
"selection": number,
"option": number,
},
...
]
}
where:
na: is true if the user selected the NA optionvalues: array with the options that where selected and the other of selection,selectionis the postion where the option was put andoptionis the option that where selected
For Contact info questions:
{
"na": boolean,
"values": {
"addressLine1": string,
"addressLine2": string,
"email": string,
"firstName": string,
"lastName": string,
"phone": string,
"zipCode": string,
}
}
where:
na: is true if the user selected the NA optionvalues.addressLine1: Address line 1values.addressLine2: Address line 2values.email: valid emailvalues.firstName: first namevalues.lastName: last namevalues.phone: phone number, should be formated as [+][country code][area code][local phone number] (without te brackets)values.zipCode: valid zip code, only apply for US
For date questions:
{
"na": boolean,
"value": string
}
where:
na: is true if the user selected the NA optionvalue: date formated as “YYYY-MM-DDTHH:mm:ss[+/-]HH:mm”, has to include the time zone (without the brackets, for example “2021-01-03T00:00:00-05:00”)
For conjoint questions:
{
"na": boolean,
"values": {
"pageIndex": {
cards: array of cards objects
},
"pageIndex": {
cards: array of cards objects
},
"pageIndex": {
cards: cards objects
}
}
}
where:
na: is true if the user selected the NA optionvalues: object of conjoint pages shown indexed by the pageIndex of the conjoint experiment, the pageIndex is zero basedcards: object of cards that were shown indexed by the pageCardIndex and which one was selected (see Card object), the pageCardIndex is zero based
Card object
{
"attributes": {},
"group": number,
"selected": boolean
}
where:
attributes: object of atribute positions shown in the card indexed by the attributeIndex, the attributeIndex is zero basedgroup: group number of the cardselected: true if the card was selected, only one of the cards on each cards page can be selected
Response
Codes:
- 200: in case there is a page to show
- 404: project or campaign does not exists
- 409: in case of quotas exceded, recipient already submit a response
- 422: in case of a validations of the submited answers fails
{
"page": page object,
"currentPage": int,
"customization": customization object,
"totalPages": int,
"projectTitle": string,
"projectId": "string",
"clientTimezone": "string",
"userData": string,
}
The response payload has the same specifications as the “Get survey first page” endpoint
POST
Get next page
Description
Get the next page of a surveyRequest payload
answers: answers object (see Answers object)currentPage: number of the page that is shownuserData: encrypted user information and memory, should be it exactly as the last call returns of this or the “Get survey first page” endpointspath: an array of the current pages values that where displayed, included the current one
Answers object
The answers object should have all the answers that the user selected so far, the API consumer has to remove the ones that doesn’t apply in case of going back to a previous page.questionId*: is the question id which the asnwer belong, and the value is an answer object (see Answer object)
Answer object
The answer object depends on the type of question, the posible objects are:For MC (including country and state from contact info) questions:
na: is true if the user selected the NA optionvalues: should be an array with all the positions of the answers selected by the user
For Grid (basic grid, including nps, max diff and max diff experiment) questions:
na: is true if the user selected the NA optionrowPosition: should be the position of the row which the values belong, for example{ 1: [1,2], 2: [3], 3: [1] }values: should be an array with all the positions of the answers selected by the user
For numeric/text entry questions:
na: is true if the user selected the NA optionvalue: value typed by the user
For Constant sum questions:
na: is true if the user selected the NA optionrowPosition: should be the position of the row which the value belong, for example{ 1: 1, 2: 10.6, 3: 90 }value: value typed by the user
For Rank Order questions:
na: is true if the user selected the NA optionvalues: array with the options that where selected and the other of selection,selectionis the postion where the option was put andoptionis the option that where selected
For Contact info questions:
na: is true if the user selected the NA optionvalues.addressLine1: Address line 1values.addressLine2: Address line 2values.email: valid emailvalues.firstName: first namevalues.lastName: last namevalues.phone: phone number, should be formated as [+][country code][area code][local phone number] (without te brackets)values.zipCode: valid zip code, only apply for US
For date questions:
na: is true if the user selected the NA optionvalue: date formated as “YYYY-MM-DDTHH:mm:ss[+/-]HH:mm”, has to include the time zone (without the brackets, for example “2021-01-03T00:00:00-05:00”)
For conjoint questions:
na: is true if the user selected the NA optionvalues: object of conjoint pages shown indexed by the pageIndex of the conjoint experiment, the pageIndex is zero basedcards: object of cards that were shown indexed by the pageCardIndex and which one was selected (see Card object), the pageCardIndex is zero based
Card object
attributes: object of atribute positions shown in the card indexed by the attributeIndex, the attributeIndex is zero basedgroup: group number of the cardselected: true if the card was selected, only one of the cards on each cards page can be selected
Response
Codes:- 200: in case there is a page to show
- 404: project or campaign does not exists
- 409: in case of quotas exceded, recipient already submit a response
- 422: in case of a validations of the submited answers fails
Authorizations
Access token obtained from the m2m-token endpoint.
Body
application/json
The body is of type object.
Response
Successful response