This guide explains how to format your survey data into structured data points suitable for submission to the addRespondent endpoint of the ReDem API.

Preparing survey responses for CHS (Coherence Score)

For each CHS data point, all question–answer pairs must be included as separate objects within the interviewData array. Each object should contain a questionId (as a string), a question (as a string) and an answer (as a string or number) to ensure compatibility with the addRespondent endpoint.

For the most accurate assessments, the AI performs best when it has full visibility into the context of the questionnaire. Therefore, it is recommended to include as much information as possible from the questionnaire.

  • Single-select questions
    Single-select questions (radio buttons, dropdowns, yes/no, Likert scale, NPS, etc.) produce one answer value.

    Transform the question and answer into a structured object with the following format:

Example interviewData objects for a single-select question
// Dropdown question
{
    "questionId": "Q1",
    "question": "What is your favorite type of cuisine? Select one option that describes your preference.",
    "answer": "Italian"
}

// Radio button question
{
    "questionId": "Q1",
    "question": "In a typical week, how frequently do you eat red meat (e.g., beef, pork)?",
    "answer": "3–5 times per week"
}

// Yes/No question
{
    "questionId": "Q1",
    "question": "Do you like Fish or seafood?",
    "answer": "No"
}

// Likert scale question
{
    "questionId": "Q1",
    "question": "How much do you enjoy eating street food? - Not at all, A little, Somewhat, Quite a bit, Very much",
    "answer": "Not at all"
}

// NPS question
{
    "questionId": "Q1",
    "question": "How likely are you to recommend our food delivery service to a friend or colleague",
    "answer": 8
}
  • Multi-select questions
    Multi-select questions (checkboxes) produce a zero, one or many answer values.

    Transform the question and answer into a structured object with the following format:

    • Add every option label to the question so that downstream systems can reconstruct the full context.
    • Concatenate all selected options in the answer field, separated by comma.
    • If no options are selected, set the answer to the literal string “None of those”.
Example interviewData objects for a multi-select question
// if the respondet selected one option
{
    "questionId": "Q1",
    "question": "Which of these dietary preferences or restrictions apply to you? (Select all that apply) - Vegetarian, Vegan, Gluten-free, Lactose-intolerant, Halal",
    "answer": "Vegetarian"
}


// if the respondet selected more than one option
{
    "questionId": "Q1",
    "question": "Which of the following foods do you eat regularly? (You may select more than one.) - Chicken, Cheese, Bacon or sausage, Eggs, Fish or seafood, Plant-based meat substitutes (e.g., tofu, tempeh), Milk or dairy products, Fruits, Leafy vegetables (e.g., spinach, kale)",
    "answer": "Cheese, Eggs"
}


// if the respondet did not select any of the options
{
    "questionId": "Q1",
    "question": "Which of the following fast foods brands do you consume more? - McDonald's, KFC, Pizza Hut, Subway, Burger King, Taco Bell, Wendy's, Domino's, Papa John's",
    "answer": "None of those"
}
  • Open-ended questions
    Open-ended questions produce a free text or numeric answer value.
Example interviewData object for an open-ended question
{
    "questionId": "Q1",
    "question": "Can you describe your typical eating habits during the week?",
    "answer": "I usually eat home-cooked meals with lots of vegetables and lean meats. I occasionally eat out on weekends, mostly opting for Asian or Mediterranean dishes. I try to avoid sugary snacks and drink plenty of water throughout the day."
}
  • Grid (matrix) questions
    Grid/matrix questions contain a stem plus multiple row items that share the same answer scale.

    Transform the grid/matrix stem, row labels and answer scale into a structured object with the following format:

    • Emit one object per row item so that each cell becomes its own data point
    • Concatenate the stem and the row label, separated by -, to form the question.
    • Keep the selected scale label as the answer.
Example interviewData object for a grid/matrix question
{
    "questionId": "Q1",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Red meat (e.g., beef, pork)",
    "answer": "3–5 times per week"
},
{
    "questionId": "Q2",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Fish or seafood",
    "answer": "Several times per day"
},
{
    "questionId": "Q3",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Poultry (e.g., chicken, turkey)",
    "answer": "1–2 times per week"
},
{
    "questionId": "Q4",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Dairy products (e.g., milk, cheese, yogurt)",
    "answer": "Daily"
},
{
    "questionId": "Q5",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Eggs",
    "answer": "3–5 times per week"
},
{
    "questionId": "Q6",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Legumes (e.g., beans, lentils, chickpeas)",
    "answer": "1–2 times per week"
},
{
    "questionId": "Q7",
    "question": "Please indicate how often you usually eat the following types of food. Think about a normal week. - Grains (e.g., rice, pasta, bread)",
    "answer": "Daily"
}