Insert page break using Qualtrics Survey API | XM Community
Skip to main content

Hi everyone!

I am creating a survey using the Qualtrics Survey API. I am not really familiar with the jargon, so please bear with me.

I am able to do almost everything, that is, create surveys, create blocks, update flows, and create questions, but I cannot insert page breaks in my survey.

Given the length and complexity of my survey, I do not want to insert them manually.

I have tried to insert a Page Break by adding it to the BlockElements parameter in a variety of ways, as a put block request and as a post block request. I tried to post the JSON that I get after a get block request from a block with page breaks, but in all these cases, I always receive the same error message: "Invalid request. Missing or invalid parameter BlockElements." This happened even if I used the same exact JSON as the one received from a get request.

I got in contact with customer service, and from what I have understood, they told me I should instead prepare a txt file because I cannot create a page break via Qualtrics Survey API. It seems to me that this cannot be possible. Preparing a txt file sounds to me like a completely different thing that would require a lot of work, and I wouldn't know how to recreate many of the features of a typical Qualtrics survey, like the various elements of flow.

So, if anybody was able to create and insert a page break using the Qualtrics Survey API, could you please share any code you have? I am using Python requests, but anything at this point would be welcome.

Hi @LuisaC It is possible to add page breaks and re-organize the questions within a block using the Update Block PUT request.

 

When I look at the response I get from the Get Block GET request, there is one parameter missing that is required  in the payload when using the Update Block PUT request. That parameter is ‘LibraryID’, which can be found by going to your Account Settings > Qualtrics IDs > Libraries > My Library: ‘name’

 

Contrary to what the Update Block documentation says, I was able to get this to work without also having to add the so called required ‘SubType’ and ‘ReferencedBlockID’ parameters which were also missing from the GET request.

 

For reference the only parameters I have in my successful Update Block PUT request payload are:

  • Type
  • Description
  • ID
  • LibraryID
  • BlockElements

 

If that missing parameter isn’t the solution, double check the ID’s and the spelling/formatting of your payload.

 

Hope this helps!


Leave a Reply