Change in current positions in current person API
May 7th, 2021
We have revamped the manage committee section in EXPA and this causes breaking changes in current_positions object. current_positions returns the list of position a person holds in EXPA. 

This changes affects both REST and Graphql API type.
REST API changes:
Before:
{
   "id":252867,
   "position_short_name":null,
   "role":"Global Support Team",
   "name":"Backend",
   "url":"https://gis.aiesec.org/v2/teams//positions/252867",
   "start_date":"2016-10-20T00:00:00Z",
   "end_date":"2021-09-21T00:00:00Z",
   "team":{
      "id":30567,
      "title":"Commutatus",
      "team_type":"normal",
      "office":{
         "id":1626,
         "name":"AIESEC INTERNATIONAL",
         "full_name":"AIESEC INTERNATIONAL",
         "email":"info@ai.aiesec.org",
         "tag":"AI",
         "parent_id":null,
         "signup_link":null,
         "country":null,
         "url":"https://gis.aiesec.org/v2/committees/1626"
      }
   },
   "parent":{
      "id":252866,
      "position_short_name":null,
      "role":"Global Support Team",
      "name":"CEO",
      "url":"https://gis.aiesec.org/v2/teams//positions/252866"
   },
   "function":{
      "id":11341,
      "name":"Other",
      "matching_with_opportunity":null
   }
}

After:
{
   "id":11438,
   "start_date":"2021-02-15",
   "end_date":"2022-02-17",
   "role":"AIVP",
   "title":"Local Committee Vice President (LCVP)",
   "department":{
    "id": 1
    name: "Other"
    }
   "term":{
      "id":11471,
      "name":"2021-2022"
   },
   "duration":{
       "id": 11518,
       "name": "1 Year"
   },
   "parent":null,
   "office":{
      "id":1626,
      "name":"AIESEC INTERNATIONAL",
      "full_name":"AIESEC INTERNATIONAL",
      "email":"idontwannadoit",
      "tag":"AI",
      "parent_id":null,
      "signup_link":"wdasff",
      "country":null,
      "url":"https://gis.aiesec.org/v2/committees/1626"
   }
}

Graphql API changes:
We have added new object called member_positions in current_person type. This object will have newly added fields related to positions. This object should be used instead of current_positions

Sample Request:
query ProfileQuery {
  currentPerson {
   id    
   member_positions{
    id
    start_date
    end_date
    status
    ldm_report
    title
    role{
      name
    }
    function{
      name
    }
    committee_department{
      name
    }
    duration{
      name
    }
  }
  }
}


X
Crafted by