Class: V1::SubjectInteractionsController

Inherits:
ApiController
  • Object
show all
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

Instance Method Details

#call_nextObject

#call_subjectObject

#in_progress_checkObject

#outcomesObject

#questionnaire_submitObject

#quota_qualify_reportObject

#searchHash<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

Returns:

#showObject

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_screenHash<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

Returns:

#updateObject

Update a subject interaction