Added Membership LPS, Youth LPS and Membership NPS surveys
February 25th, 2021
We have added API support for 3 new surveys in AIESEC.

To get survey details and survey questions:

API endpoint: {{host}}/v2/surveys/survey_details
Request Type: GET
Params name: survey_type
Param option: ['membership_lps', 'youth_lps', 'membership_nps']
Sample request: {{host}}/v2/surveys/survey_details?survey_type=position_lps

To submit survey answer:

API endpoint: {{host}}/v2/surveys/answer
Request Type: POST
Params name: responses, survey_uuid
Sample request: {{host}}/v2/surveys/answer
Body:  {"responses": [{"question_id": 1, "answer": 1}, {"question_id": 2, "answer": 2, "other_question_id": 3, "other_option_answer": "test"}] }

Note: 
  • Have added additional details in the survey question. These object will have keys like sub_question_type, visual_style, is_other . 
  • sub_question_type will have either ["detractor","passive"] or ["passive","promoter"]  value. According to this value the step 2 and step 3 questions are showed.
  • visual_style will have vertical value which indicates how that questions are aligned.
  • is_other will have true value. If this option is selected then and input field should appear and the user enters the value. For these cases we have two additional params (other_question_id, other_option_answer) .
  • For Membership LPS and Membership NPS surveys, in api new object added  position is added. This will have details for person name, person home mc name, profile picture, position name and position office id. current_position key is also removed from the response and the details of this can be taken from name inside position object.
  • For Youth LPS and Youth NPS surveys, in api new object added  opportunity_application is added. This will have details for person name, person home mc name, profile picture, opportunity title and opportunity home MC id.

X
Crafted by