Class: V1::SubjectInteractionsController
- Inherits:
-
ApiController
- Object
- ApiController
- V1::SubjectInteractionsController
- Defined in:
- api/app/api/v1/subject_interactions_controller.rb
Overview
A subject interacts with one campaign to schedule (or pre-screen) for one or more events
Constant Summary collapse
- SUBJECT_SCREEN_PARAMS =
%i[subject_id recruiting_campaign_id prioritize_screening redirect_url].freeze
- UPDATE_PARAMS =
:id, :outcome, :callback_start_at, :callback_end_at, :notes, subject_interaction_sessions_attributes: %i[id subject_interaction_id session_id status]].freeze
Instance Method Summary collapse
- #call_next ⇒ Object
- #call_subject ⇒ Object
- #in_progress_check ⇒ Object
- #outcomes ⇒ Object
- #questionnaire_submit ⇒ Object
- #quota_qualify_report ⇒ Object
-
#search ⇒ Hash<String, Array<V1::SubjectInteractionSerializer>>
Search subject interactions ### Example: Search interactions for a specific campaign.
-
#show ⇒ Object
Get a particular subject interaction ### Example - a basic use case, enforcing company-wide rules.
-
#subject_screen ⇒ Hash<string, SubjectInteractionSerializer>
Initiates an interaction with a subject for a particular recruiting campaign ### Options.
-
#update ⇒ Object
Update a subject interaction.
Instance Method Details
#call_next ⇒ Object
#call_subject ⇒ Object
#in_progress_check ⇒ Object
#outcomes ⇒ Object
#questionnaire_submit ⇒ Object
#quota_qualify_report ⇒ Object
#search ⇒ Hash<String, Array<V1::SubjectInteractionSerializer>>
Search subject interactions
Example: Search interactions for a specific campaign
curl --request POST \
--header "authorization: Bearer $bearer_token" \
--header "Content-Type: application/json" \
--data '{
"recruiting_campaign_id": 13
}' \
https://app.redjade.net/api/v1/subject_interactions/search
#show ⇒ Object
Get a particular subject interaction
Example - a basic use case, enforcing company-wide rules
curl --request GET \
--header "authorization: Bearer $bearer_token" \
http://app.redjade.net/api/v1/subject_interactions/13
#subject_screen ⇒ Hash<string, SubjectInteractionSerializer>
Initiates an interaction with a subject for a particular recruiting campaign
Options
- [Integer]
recruiting_campaign_id
(required) - campaign to screen with - [Integer]
subject_id
(required) - subject to screen - [String]
prioritize_screening
- Skip all requirements except screening. See subject interactions for a description of this option. - [String]
redirect_url
- a place to redirect after the interaction is complete. Will attach an outcome query string parameter to the redirect.
Example - a basic use case, enforcing company-wide rules
curl --request POST \
--header "authorization: Bearer $bearer_token" \
--header "Content-Type: application/json" \
--data '{
"recruiting_campaign_id": 13,
"subject_id": 138
}' \
https://app.redjade.net/api/v1/subject_interactions/subject_screen
Example
You can also skip some or all global requirements and provide a redirect URL. We will redirect consumers when they are done screening and attach a query parameter containing the interaction's outcome.
curl --request POST \
--header "authorization: Bearer $bearer_token" \
--header "Content-Type: application/json" \
--data '{
"recruiting_campaign_id": 13,
"subject_id": 138,
"prioritize_screening": "skip_everything",
"redirect_url": "https://your-custom-company-portal.com/some-path/"
}' \
https://app.redjade.net/api/v1/subject_interactions/subject_screen
#update ⇒ Object
Update a subject interaction