async fetchRespondentData(<paramsObject>)

Async function to Load a single respondent dataset and return a syrup object which is used for further processing. Errors in calling the underlying API will be thrown so are trappable with standard .catch.

Table 1. Parameters
Parameter Notes


A single object containing the following fields:

  • projectID

  • pageID

  • respondentID

Example of calling fetchRespondentData
var r = await syrup.fetchRespondentData({
  projectID: '8fcbb2dc-8093-40d7-6c41-88ecccdcb2aa',
  pageID: 'b8b70dca-a5b8-4a1a-4a8f-f60254fea95c',
  respondentID: 'RespondentTestID1',

The returned r can now be used for further data queries such as this one that will get all baskets for all questions a respondent answered on the given pageID.

var basket = r.questions().baskets().get()