Year Groups

A Year Group is a collection of student memberships in a cohort that share the same Program.

Get all Year Groups

get

This endpoint retrieves the basic information of all Year Groups. It returns the group name, program, grade level and student IDs for members.

Authorizations
Query parameters
modified_sincestringOptional

A timestamp to filter results by modification date.

pagestringOptional

An integer defining which page to display.

per_pagestringOptional

An integer defining the number of records to display per page.

Responses
200

Success

application/json
get
GET /v2/year-groups HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
200

Success

{
  "year_groups": [
    {
      "id": 10907398,
      "name": "IB Diploma Group of 2019 (Grade 12)",
      "short_name": "IB Diploma Group of 2019",
      "program": "IB Diploma",
      "grade": "Grade 12",
      "grade_number": 13,
      "student_ids": [
        10193652
      ]
    },
    {
      "id": 11076103,
      "name": "IB MYP Group of 2019 (Year 4)",
      "short_name": "IB MYP Group of 2019",
      "program": "IB Middle Years",
      "grade": "Year 4",
      "grade_number": 10,
      "student_ids": [
        12459565,
        11456849,
        12068809
      ]
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 2,
    "per_page": 100
  }
}

Get Students for a Year Group

get

This endpoint retrieves all students belonging to a year group, as specified by the year group ID.

Authorizations
Path parameters
idintegerRequired

Unique identifier for year group.

Query parameters
pagestringOptional

An integer defining which page to display.

per_pagestringOptional

An integer defining the number of records to display per page.

Responses
200

Success

application/json
get
GET /v2/year-groups/{id}/students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
200

Success

{
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "per_page": 100
  },
  "student_ids": [
    10193652,
    12449380,
    12569245
  ],
  "students": [
    {
      "id": 10193652,
      "email": "[email protected]",
      "first_name": "John",
      "last_name": "Cage",
      "archived": false,
      "created_at": "2018-09-15T06:31:08.000-07:00",
      "updated_at": "2021-02-23T00:57:49.000-08:00",
      "last_accessed_at": "2021-02-25T08:13:03.000-08:00",
      "gender": "Male",
      "birthday": "1994-08-01",
      "mobile_phone_number": "",
      "student_id": "857906",
      "cas_advisor_id": 10559037,
      "class_grade": "Grade 10",
      "class_grade_number": 11,
      "program": "IB Diploma",
      "program_code": "diploma",
      "ib_group_id": 10342694,
      "year_group_id": 10342694,
      "parent_ids": [],
      "street_address": "",
      "city": "New York",
      "state": "",
      "zipcode": "",
      "country": "US",
      "nationalities": [
        "US"
      ],
      "languages": [
        "ENG",
        "SPA"
      ],
      "graduating_year": 2023,
      "role": "Student"
    },
    {
      "id": 12449380,
      "email": "[email protected]",
      "first_name": "Blue Ivy",
      "last_name": "Carter",
      "archived": false,
      "created_at": "2014-03-11T06:50:34.000-07:00",
      "updated_at": "2021-02-23T00:57:48.000-08:00",
      "student_id": "",
      "class_grade": "Grade 10",
      "class_grade_number": 11,
      "program": "IB Diploma",
      "program_code": "diploma",
      "ib_group_id": 10342694,
      "year_group_id": 10342694,
      "parent_ids": [
        10193613,
        12425959
      ],
      "nationalities": [],
      "languages": [],
      "graduating_year": 2023,
      "role": "Student"
    },
    {
      "id": 12569245,
      "email": "[email protected]",
      "first_name": "Robyn",
      "last_name": "Anderson",
      "archived": false,
      "created_at": "2014-10-23T06:12:42.000-07:00",
      "updated_at": "2021-02-23T00:57:49.000-08:00",
      "phone_number": "",
      "mobile_phone_number": "",
      "national_id": "",
      "student_id": "",
      "class_grade": "Grade 10",
      "class_grade_number": 11,
      "program": "IB Diploma",
      "program_code": "diploma",
      "ib_group_id": 10342694,
      "year_group_id": 10342694,
      "parent_ids": [],
      "street_address": "99590 Johnson Park",
      "street_address_ii": "",
      "city": "Fort Lauderdale",
      "state": "FL",
      "zipcode": "72146",
      "country": "US",
      "nationalities": [],
      "languages": [],
      "graduating_year": 2023,
      "role": "Student"
    }
  ]
}

Add Students to a Year Group

post

This endpoint adds a list of student IDs to a year group, as specified by the year group ID.

Authorizations
Path parameters
idintegerRequired

Unique identifier for year group.

Body
student_idsinteger[]Required

An array of student IDs to be added to a year group

Responses
200

Success

application/json
post
POST /v2/year-groups/{id}/add_students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "student_ids": [
    1
  ]
}
200

Success

{
  "status": "ok"
}

Remove Students from a Year Group

post

This endpoint removes a list of student IDs from a year group, as specified by the year group ID.

Authorizations
Path parameters
idintegerRequired

Unique identifier for year group.

Body
student_idsinteger[]Required

An array of Student IDs to remove from the Year Group

Responses
200

Success

application/json
post
POST /v2/year-groups/{id}/remove_students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "student_ids": [
    1
  ]
}
200

Success

{
  "status": "ok"
}

Get Teachers for a Year Group

get

Retrieves the Homeroom, CAS, EE, TOK, Project-based Learning advisors for a Year Group, specified by id. Returns advisor IDs and role abbreviations.

Authorizations
Path parameters
idintegerRequired

Unique identifier for year group.

Responses
200

Success

application/json
get
GET /v2/year-groups/{id}/advisors HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
200

Success

{
  "advisors": [
    {
      "id": 10193613,
      "roles": [
        "homeroom",
        "cas",
        "M25",
        "EXT"
      ]
    },
    {
      "id": 12425959,
      "roles": [
        "ee",
        "tok",
        "M25"
      ]
    }
  ]
}

Was this helpful?