MemberLead CRM - Recruitment Analytics API
August 9th, 2021
A REST API endpoint is created which is used to measure member leads funnel with conversion data across the recruitment status flow for an entity.

It uses elasticsearch and aggregates to obtain doc_count for different recruitment statuses.

office_id which is used for entity filter is a mandatory param that needs to be passed along with access_token. Other params that can be used are,
  1. start_date and end_date for time period filter.
  2. academic_level_ids for an academic level filter. It accepts the value as an array of ids which can be resolved by calling the constants query with type_id as academic_level. It is nested inside the recruitment param.
  3. backgrounds for background filter. It accepts the value as an array of ids which can be resolved by calling the constants query with type_id as background.
  4. employment_status_ids for employment status filter. It accepts the value as an array of ids which can be resolved by calling the constants query with type_id as employment_status. It is nested inside the recruitment param.
  5. created_via for lead created via filter. It accepts either of the value, EXPA, expa, YOP, or yop as a string. It is nested inside the recruitment param.
  6. motivation_reason_ids for motivation filter. It accepts the value as an array of ids which can be resolved by calling the constants query with type_id as motivation_reason. It is nested inside the recruitment param.
  7. referral_type_ids for referral filter. It accepts the value as an array of ids which can be resolved by calling the constants query with type_id as referral_type. It is nested inside the recruitment param.
GET /v2/applications/analyze.json

Sample request
https://analytics.api.aiesec.org/v2/applications/analyze.json?access_token=<access_token>&start_date=<start_date>&end_date=<end_date>&recruitment[office_id]=<office_id>&recruitment[academic_level_ids][]=<academic_level_id_1>&recruitment[academic_level_ids][]=<academic_level_id_2>&recruitment[employment_status_ids][]=<employment_status_id_1>&recruitment[employment_status_ids][]=<employment_status_id_2>&recruitment[motivation_reason_ids][]=<motivation_reason_id_1>&recruitment[motivation_reason_ids][]=<motivation_reason_id_2>&recruitment[created_via]=<YOP_or_EXPA>&recruitment[referral_type_ids][]=<referral_type_id_1>&recruitment[referral_type_ids][]=<referral_type_id_2>&backgrounds[]=<background_id_1>&backgrounds[]=<background_id_2>

Sample response
{
    "analytics":  {
        "contacted_count":  {
            "meta":  {
            
            },
            "doc_count": 4
        },
        "accepted_count":  {
            "meta":  {
              
            },
            "doc_count": 1
        },
        "in_process_count":  {
            "meta":  {
              
            },
            "doc_count": 3
        },
        "rejected_count":  {
            "meta":  {
              
            },
            "doc_count": 2
        },
        "applied_count":  {
            "meta":  {
              
            },
            "doc_count": 7
        }
    }
}
X
Crafted by