Requirements object
AgeRangeEligibilityRequirement
-
This filter allows you to apply a participant age range based on their date of birth. You can select the age range from 18 to 100 with the
min_ageandmax_ageconfiguration. Bothmin_ageandmax_agecan be sent as two different objects in the attributes array. Please note, the age range is inclusive ofmax_age. -
All the necessary information for the payload, including the class name of the requirement (
_cls), the attributes array, and the unique id of the question (query.id), can be sourced from the/api/v1/eligibility-requirements/endpoint. -
The structure of each requirement object in the payload is as follows:
- _cls: The class name of the requirement. It specifies the type of requirement (e.g. AgeRangeEligibilityRequirement).
- attributes: An array of attribute objects. Each object in the array represents an option or answer. It has two properties:
- name: The name of the attribute (
min_ageormax_age). - value: An integer that denotes the age limit.
- name: The name of the attribute (
- query: An object that contains the id attribute. The
query.idrelates to the id of the question to which the object relates.
Here is an example of how to format your request:
ApprovalNumbersEligibilityRequirement
-
Recruit participants based on min and/or max number of approved submissions. You can send both
minimum_approvalsandmaximum_approvalsas two different objects in the attributes array.- To include participants that have 100 or more approved submissions, set
minimum_approvalsto value 100. - To include participants that have 200 or less approved submissions, set
maximum_approvalsto value 200.
- To include participants that have 100 or more approved submissions, set
ApprovalRateEligibilityRequirement
-
Target participants based on minimum or maximum approval rate, the percentage of approved studies. We use the upper bound of the 95% confidence interval to calculate approval rate. You can send both
minimum_approval_rateandmaximum_approval_rateas two different objects in the attributes array.- To include participants that have 95% approval rate or higher, set
minimum_approval_rateto value 95. - To include participants that have 95% approval rate or lower, set
maximum_approval_rateto value 95.
- To include participants that have 95% approval rate or higher, set
JoinedBeforeEligibilityRequirement
- Only include participants who joined Prolific before a specified date (e.g. Participants who joined Prolific before 01/09/21).
- To include participants that have joined on the first of September 2021 or before, you can send an attribute with
joined_beforeand value2020-09-01. The format of the date is YYYY-MM-DD.
PreviousStudiesAllowlistEligibilityRequirement
- Include participants from selected completed studies. You can include participants from multiple studies by sending multiple attributes. Read about how to invite specific participants to your study.
- To include participants from a study, you can include the
idandvalueattributes. Additionally, if you want to filter these participants to allow only those that have made a submission with a specific completion code, you can send thecompletion_codesattribute as an array of strings.
- To add previous participants whose response wasn’t approved, please instead use a custom allowlist.
PreviousStudiesEligibilityRequirement
- Exclude participants from the selected completed studies regardless of their submission status. You can exclude participants from multiple studies by sending multiple attributes. Read about how to prevent certain participants from accessing your study.
- To exclude participants from a study, you can include the
idandvalueattributes. Additionally, if you want to filter these participants to block only those that have made a submission with a specific completion code, you can include thecompletion_codesattribute as an array of strings.
CustomWhitelistEligibilityRequirement
- A comma-separated list of participant and/or submission IDs for users you want to participate in the study.
- ONLY these participants will be eligible for this study (i.e. longitudinal design).
- To include participants by id, you can send an attribute with
white_listand value an array of participant ids. - You may also provide submission ids, which will be converted to their corresponding participant ids.
CustomAllowlistEligibilityRequirement.Custom Blacklist - CustomBlacklistEligibilityRequirement
- A comma-separated list of participant and/or submission IDs of the users you wish to make ineligible for the study.
- To exclude participants by id, you can send an attribute with
black_listand value an array of participant ids. - You may also provide submission ids, which will be converted to their corresponding participant ids.
CustomBlocklistEligibilityRequirement.Other Prescreen Requirements filters
Prescreening requirement filters enable participants to select one or multiple options/answers. The filters are of two types:
- Single Select - SelectAnswerEligibilityRequirement: Participants can select one option. Example: “In what country do you currently reside?”
- Multi Select - MultiSelectAnswerEligibilityRequirement: Participants can select multiple options. Example: “Which of the following languages are you fluent in?”
All the necessary information for the payload can be sourced from the /api/v1/eligibility-requirements/ endpoint. This endpoint provides the data structure for each requirement, including the class name (_cls), the attributes array, and the unique id of the question (query.id).
The structure of each requirement object in the payload is as follows:
- _cls: The class name of the requirement. It specifies the type of requirement (e.g. Single Select or Multi Select).
- attributes: An array of attribute objects. Each object in the array represents an option or answer. It has two properties:
- value: A boolean that denotes if this option/answer is selected. Setting it to
trueincludes the participants who have selected this option/answer. You only need to provide the attributes objects for those withvalue: True. The other options will default tofalse. - index: The position of this option/answer in the array. The indexing starts from 0.
- value: A boolean that denotes if this option/answer is selected. Setting it to
- query: An object that contains the id attribute. The
query.idrelates to the id of the question to which the object relates.
Here is an example of how to format your request:
About unique Ids
If you are using React or other component framework to render these requirements, you might need a unique id for every requirement.
At the moment there is not one, but you can use the question.id if present or the _cls if the question id was missing to build a unique id.