Quota requirements
Deprecated - please use Filters instead.
This guide will walk you through the steps to utilise the quota balancing feature, which allows you to balance your participant sample based on specific requirements.
Get Eligibility Requirements
To retrieve a list of all available eligibility requirements that can be used to filter participants, send a GET request to the following endpoint: /api/v1/eligibility-requirements/.
Find the Desired Question and Responses
In the JSON response from the previous step, locate the question you want to balance on by checking the title field under each query object. Once you find the desired question, note its id field.
Additionally, take note of the attributes array within the query object, which contains each possible response. You will use these to construct the responses in Step 3. The index field in the attributes array will map to the response_index in the quota requirements.
For example, if you want to balance on the “Sex” question, search for a query object with a title containing the word “Sex” and record the corresponding id. Then, record the attributes array, which may look like this:
Create Study with Quota Requirements
When creating your study, send a POST request to the following endpoint: /api/v1/studies/. Include the appropriate quota requirements in the request body, as well as the study_type field with the value QUOTA. Use the format below as a reference:
Include the appropriate quota requirements in the request body, as well as the study_type field with the value QUOTA.
Use the format below as a reference:
Replace the id field with the question ID obtained in Step 2, and adjust the responses array to reflect the desired weight for each response option using the response_index values obtained from the attributes array in Step 2.