Download study data
Retrieve a test’s questions, samples, participants, and responses as a JSON snapshot. For a spreadsheet, use Export study data to Excel.
Find the test
Section titled “Find the test”List your company’s tests:
curl --fail-with-body \ 'https://app.redjade.net/api/v1/sensory_tests?page=1&per=25' \ --header "Authorization: Bearer $REDJADE_TOKEN"The response array contains the tests. Use name, title, project_name, and status to find the test, then save its id for the download request.
List responses include pagination.current, pagination.pages, pagination.count, and pagination.per_page (the page size). Request successive page values until current >= pages or the result list is empty. At the last page, pagination.next can equal the current page rather than becoming null.
Without pagination parameters, requests use page=1 and per=10. Set per to choose a different page size. Add include_archived=true to include archived tests.
Download the data
Section titled “Download the data”Set TEST_ID to the test’s id:
TEST_ID=12345curl --fail-with-body \ "https://app.redjade.net/api/v1/calcs/payload?sensory_test_id=$TEST_ID" \ --header "Authorization: Bearer $REDJADE_TOKEN" \ --output study-data.jsonThe file contains the whole test under the top-level response object. Allow for the download size and processing time of large studies.
The same endpoint accepts recruiting_campaign_id for campaign data or analysis_id to select its associated test. Supply one selector per request.
Read the response
Section titled “Read the response”This endpoint calls questionnaires surveys. The snapshot is nested as follows:
response├── samples[]├── participants[]└── surveys[] ├── questions[] │ └── answers[] ├── completed_surveys[] │ └── questions[] │ └── selected_answers[] └── serving_samples[]Each completed_surveys entry records one participant’s responses. Join its fields to the definitions using these IDs. Paths in the right column are relative to response:
| Field within a completion | Join to |
|---|---|
participant_id |
participants[].id |
sample_ids[] |
samples[].id |
serving_id |
The same survey’s serving_samples[].serving_id |
questions[].id |
The same survey’s questions[].id |
questions[].selected_answers[].id |
The matching question’s answers[].id |
This shortened response shows one participant’s selection for one sample. Other fields and collections are omitted:
{ "response": { "samples": [{ "id": 24, "name": "Cookie A" }], "participants": [{ "id": 17 }], "surveys": [{ "id": 8, "questions": [{ "id": 42, "question_type": "radio", "answers": [{ "id": "674e9e42-72c9-4e8b-9bd9-6db11306fc92", "value": 9 }] }], "completed_surveys": [{ "id": 91, "participant_id": 17, "serving_id": 56, "sample_ids": [24], "questions": [{ "id": 42, "selected_answers": [{ "id": "674e9e42-72c9-4e8b-9bd9-6db11306fc92" }] }] }], "serving_samples": [{ "serving_id": 56, "sample_id": 24, "code_as_entered": "321" }] }] }}Use the IDs returned by your test; the IDs above are illustrative.
Match a selected choice’s id to the question’s answer definitions. Read text and score for text and numeric responses. Keep all fields when storing a response that contains several values.
Multi-sample entries, grid rows, and specialized question types carry additional references. Their response structures differ from single-choice answers. answered_at values are epoch milliseconds.
Download formats
Section titled “Download formats”RedJade’s Download Raw Data action and the Excel export API produce spreadsheets with numeric values, labels, or both.
The JSON download uses RedJade IDs and the native test structure. Sending questionnaire responses uses the separate questionnaire schema, which carries one participant’s responses to one questionnaire. A study download requires conversion before it can be sent to that endpoint.