Enrollments are associations between users and groups or course sections. 
Table of Contents     Enrollments associate users to courses or groups.
Fields 
    Field  Name  Description  Type  Required      id    Enrollment ID    The Schoology assigned ID of the enrollment record.
    string    no      uid    User ID    The Schoology ID of the user.
    string    yes      admin    Admin    Whether this user is an administrator (e.g. teacher) as opposed to a regular member (e.g. student)
    {0,1}    yes      status    Status    The current status of the enrollment.
1: Active 
2: Expired (i.e. past course) 
3: Invite pending 
4: Request Pending 
5: Archived (Course specific status members can be placed in before being fully unenrolled) 
     {1-5}    yes       
  
Operations 
The operations below are available for the following realms  (replace [realm] with the appropriate realm and ID):
create 
Create an enrollment
   Path       POST  https://api.schoology.com/v1/[realm]/enrollments    
         Content   An object containing enrollment fields 
JSON  {  
    "uid" :  "2461632" ,  
    "admin" :  "0" ,  
    "status" :  "1"  
} XML  <body>  
  <uid> 2461632 </uid>  
  <admin> 0 </admin>  
  <status> 1 </status>  
</body>        Return   An object containing enrollment fields 
JSON  {  
    "id" :  "44783136" ,  
    "uid" :  "48289" ,  
    "school_uid" :  "s1" ,  
    "name_title" :  "" ,  
    "name_title_show" :  "0" ,  
    "name_first" :  "James" ,  
    "name_first_preferred" :  "" ,  
    "name_middle" :  "" ,  
    "name_middle_show" :  "0" ,  
    "name_last" :  "Howlett" ,  
    "name_display" :  "James Howlett" ,  
    "admin" :  0 ,  
    "status" :  1 ,  
    "picture_url" :  "http: \/\/ .. \/ pictures \/ default_user.gif" ,  
    "links" : {  
        "self" :  "http: \/\/ ... \/ enrollments \/ 44783136"  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <id> 44783136 </id>  
  <uid> 48289 </uid>  
  <school_uid> s1 </school_uid>  
  <name_title  />  
  <name_title_show> 0 </name_title_show>  
  <name_first> James </name_first>  
  <name_first_preferred  />  
  <name_middle  />  
  <name_middle_show> 0 </name_middle_show>  
  <name_last> Howlett </name_last>  
  <name_display> James Howlett </name_display>  
  <admin> 0 </admin>  
  <status> 1 </status>  
  <picture_url> http://.../default_user.gif </picture_url>  
  <links>  
    <self> http://.../44783136 </self>  
  </links>  
</result>          
create 
Create an enrollment with an access code
   Path       POST  https://api.schoology.com/v1/[realm]/accesscode    
         Content   An object containing an access code. The object will look like {"access_code" : "VCVKF-4MJG9"}.
JSON  {  
    "access_code" :  "VCVKF-4MJG9"  
} XML  <body>  
  <access_code> VCVKF-4MJG9 </access_code>  
</body>        Return   An object containing enrollment fields 
JSON  {  
    "id" :  "54179017" ,  
    "uid" :  "45552" ,  
    "school_uid" :  "" ,  
    "name_title" :  "" ,  
    "name_title_show" :  "0" ,  
    "name_first" :  "Mr." ,  
    "name_first_preferred" :  "" ,  
    "name_middle" :  "" ,  
    "name_middle_show" :  "0" ,  
    "name_last" :  "Strickland" ,  
    "name_display" :  "Mr. Strickland" ,  
    "admin" :  0 ,  
    "status" :  "1" ,  
    "picture_url" :  "http: \/\/ ... \/ default_user.gif"  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <id> 54179017 </id>  
  <uid> 45552 </uid>  
  <school_uid  />  
  <name_title  />  
  <name_title_show> 0 </name_title_show>  
  <name_first> Mr. </name_first>  
  <name_first_preferred  />  
  <name_middle  />  
  <name_middle_show> 0 </name_middle_show>  
  <name_last> Strickland </name_last>  
  <name_display> Mr. Strickland </name_display>  
  <admin> 0 </admin>  
  <status> 1 </status>  
  <picture_url> http://.../default_user.gif </picture_url>  
</result>          
bulk create - single realm 
Create multiple enrollments at a time in one realm
   Path       POST  https://api.schoology.com/v1/[realm]/enrollments    
         Content   Multiple enrollments can be created at a time (up to 50) by wrapping your response in ‘enrollments’, with enrollment fields  wrapped in ‘enrollment’.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "uid" :  "2461632" ,  
                "admin" :  "0" ,  
                "status" :  "1"  
            },  
            {  
                "uid" :  "23453322" ,  
                "admin" :  "0" ,  
                "status" :  "1"  
            }  
        ]  
    }  
} XML  <body>  
  <enrollments>  
    <enrollment>  
      <uid> 2461632 </uid>  
      <admin> 0 </admin>  
      <status> 1 </status>  
    </enrollment>  
    <enrollment>  
      <uid> 23453322 </uid>  
      <admin> 0 </admin>  
      <status> 1 </status>  
    </enrollment>  
  </enrollments>  
</body>        Return   The API endpoint (location) of each enrollment created, or an error message if there was a problem creating the enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "response_code" :  200 ,  
                "id" :  "54302505" ,  
                "uid" :  248101 ,  
                "location" :  "http: \/\/ ... \/ 54302505"  
            },  
            {  
                "response_code" :  200 ,  
                "id" :  "54302521" ,  
                "uid" :  48489 ,  
                "location" :  "http: \/\/ ... \/ 54302521"  
            }  
        ]  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <enrollments>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <id> 54302505 </id>  
      <uid> 248101 </uid>  
      <location> http://.../54302505 </location>  
    </enrollment>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <id> 54302521 </id>  
      <uid> 48489 </uid>  
      <location> http://.../54302521 </location>  
    </enrollment>  
  </enrollments>  
</result>          
bulk create - multi realm 
Create multiple enrollments across multiple realms at one time
   Path       POST  https://api.schoology.com/v1/enrollments    
         Content   Multiple enrollments can be created at a time (up to 50) by wrapping your response in ‘enrollments’, with enrollment fields  wrapped in ‘enrollment’. Along with the base enrollment fields  include realm [group, section] and group_id or section_id in the enrollment objects. Each enrollment object would look something like The whole body will look something like:
This endpoint does support the update_existing  flag.
JSON  {  
  "enrollments" :{  
    "enrollment" :[  
      {  
        "realm"  :  "section" ,  
        "section_id"  :  12345 ,  
        "status"  :  1 ,  
        "admin"  :  1 ,  
        "uid"  :  87942  
      },  
      {  
        "realm"  :  "section" ,  
        "section_id"  :  98762 ,  
        "status"  :  1 ,  
        "admin"  :  0 ,  
        "uid"  :  87942  
      },  
      {  
        "realm"  :  "group" ,  
        "group_id"  :  65371 ,  
        "status"  :  1 ,  
        "admin"  :  1 ,  
        "uid"  :  12873  
      }  
    ]  
  }  
} XML  <body>  
  <enrollments>  
    <enrollment>  
      <realm> section </realm>  
      <section_id> 12345 </section_id>  
      <status> 1 </status>  
      <admin> 1 </admin>  
      <uid> 87942 </uid>  
    </enrollment>  
    <enrollment>  
      <realm> section </realm>  
      <section_id> 98762 </section_id>  
      <status> 1 </status>  
      <admin> 0 </admin>  
      <uid> 87942 </uid>  
    </enrollment>  
    <enrollment>  
      <realm> group </realm>  
      <group_id> 65371 </group_id>  
      <status> 1 </status>  
      <admin> 1 </admin>  
      <uid> 12873 </uid>  
    </enrollment>  
  </enrollments>  
</body>        Return   The API endpoint (location) of each enrollment created, or an error message if there was a problem creating the enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "response_code" :  200 ,  
                "location" :  "http: \/\/ ... \/ 54302505" ,  
                "uid" :  248101 ,  
                "id" :  "54302505" ,  
                "realm" :  "section" ,  
                "realm_id" :  "3719526"  
            },  
            {  
                "response_code" :  200 ,  
                "location" :  "http: \/\/ ... \/ 44783161" ,  
                "uid" :  48489 ,  
                "id" :  "44783161" ,  
                "realm" :  "section" ,  
                "realm_id" :  "4318461"  
            }  
        ]  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <enrollments>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <location> http://.../54302505 </location>  
      <uid> 248101 </uid>  
      <id> 54302505 </id>  
      <realm> section </realm>  
      <realm_id> 3719526 </realm_id>  
    </enrollment>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <location> http://.../44783161 </location>  
      <uid> 48489 </uid>  
      <id> 44783161 </id>  
      <realm> section </realm>  
      <realm_id> 4318461 </realm_id>  
    </enrollment>  
  </enrollments>  
</result>          
course enrollment import 
Create and update many course enrollments at a time by grading_period_id, course_code, section_code, and user unique_id. This this endpoint does not require you to know the Schoology IDs for each course, section, or user, this can be used for easy synchronization. You are required, however, to pass a Schoology grading period ID (or multiple, comma-separated IDs). For example, if you pass 5,6,7 as a grading_period_id, you will be importing into sections that span all three grading periods for the given course_code/section_code combination. This endpoint is only available for courses (and not for groups).
   Path       POST  https://api.schoology.com/v1/enrollments/import/course/[grading_period_id]    
         Content   Multiple enrollments can be created at a time (up to 50), and require a course course_code , section section_code , and user school_uid . You can also pass admin  to mark an enrollment as a teacher, or delete  to remove an enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "course_code" :  "E200" ,  
                "section_code" :  "34" ,  
                "school_uid" :  "test1234" ,  
                "admin" :  "1"  
            },  
            {  
                "course_code" :  "E200" ,  
                "section_code" :  "34" ,  
                "school_uid" :  "test456" ,  
                "admin" :  "0"  
            }  
        ]  
    }  
} XML  <body>  
  <enrollments>  
    <enrollment>  
      <course_code> E200 </course_code>  
      <section_code> 34 </section_code>  
      <school_uid> test1234 </school_uid>  
      <admin> 1 </admin>  
    </enrollment>  
    <enrollment>  
      <course_code> E200 </course_code>  
      <section_code> 34 </section_code>  
      <school_uid> test456 </school_uid>  
      <admin> 1 </admin>  
    </enrollment>  
  </enrollments>  
</body>        Return   The API endpoint (location) of each enrollment created, or an error message if there was a problem creating the enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "response_code" :  200 ,  
                "location" :  "http: \/\/ ... \/ 54302505" ,  
                "school_uid" :  "s2" ,  
                "course_code" :  "CC106" ,  
                "section_code" :  "SC101"  
            },  
            {  
                "response_code" :  200 ,  
                "location" :  "http: \/\/ ... \/ 54302521" ,  
                "school_uid" :  "s3" ,  
                "course_code" :  "CC106" ,  
                "section_code" :  "SC101"  
            }  
        ]  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <enrollments>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <location> http://.../enrollments/54302505 </location>  
      <school_uid> s2 </school_uid>  
      <course_code> CC106 </course_code>  
      <section_code> SC101 </section_code>  
    </enrollment>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <location> http://.../enrollments/54302521 </location>  
      <school_uid> s3 </school_uid>  
      <course_code> CC106 </course_code>  
      <section_code> SC101 </section_code>  
    </enrollment>  
  </enrollments>  
</result>          
course enrollment import alternative 
Create and update multiple course enrollments using section_school_code and user unique_id. This is similar to the course enrollment import above with the exception of not having to provide the grading_period_id. Instead, unique section_school_code values are used to determine the sections for each enrollment.
   Path       POST  https://api.schoology.com/v1/enrollments/import/course    
         Content   Multiple enrollments can be created at a time (up to 50), and require a course section section_school_code  and user school_uid . You can also pass admin  to mark an enrollment as a teacher, or delete  to remove an enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "section_school_code" :  "23" ,  
                "school_uid" :  "test1234" ,  
                "admin" :  "1"  
            },  
            {  
                "section_school_code" :  "344" ,  
                "school_uid" :  "test456" ,  
                "delete" :  "1"  
            }  
        ]  
    }  
} XML  <body>  
  <enrollments>  
    <enrollment>  
      <section_school_code> 23 </section_school_code>  
      <school_uid> test1234 </school_uid>  
      <admin> 1 </admin>  
    </enrollment>  
    <enrollment>  
      <section_school_code> 344 </section_school_code>  
      <school_uid> test456 </school_uid>  
      <delete> 1 </delete>  
    </enrollment>  
  </enrollments>  
</body>        Return   The API endpoint (location) of each enrollment created, or an error message if there was a problem creating the enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "response_code" :  200 ,  
                "location" :  "http: \/\/ ... \/ 54302505" ,  
                "school_uid" :  "s2" ,  
                "section_school_code" :  "SC111" ,  
                "course_code" :  "CC106" ,  
                "section_code" :  ""  
            },  
            {  
                "response_code" :  200 ,  
                "location" :  "http: \/\/ ... \/ 54302521" ,  
                "school_uid" :  "s3" ,  
                "section_school_code" :  "SC111" ,  
                "course_code" :  "CC106" ,  
                "section_code" :  ""  
            }  
        ]  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <enrollments>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <location> http://...//54302505 </location>  
      <school_uid> s2 </school_uid>  
      <section_school_code> SC111 </section_school_code>  
      <course_code> CC106 </course_code>  
      <section_code  />  
    </enrollment>  
    <enrollment>  
      <response_code> 200 </response_code>  
      <location> http://.../54302521 </location>  
      <school_uid> s3 </school_uid>  
      <section_school_code> SC111 </section_school_code>  
      <course_code> CC106 </course_code>  
      <section_code  />  
    </enrollment>  
  </enrollments>  
</result>          
list 
View a list of enrollments (paged). The following query strings can (optionally) be appended to the path to filter results:
uid : filter enrollments for a given user 
enrollment_status : filter enrollments for a given enrollment status (1-5) 
type : filter enrollments by an enrollment type. Possible values: [‘admin’, ‘member’] 
picture_size : specify size of profile picture returned with this user. Possible values: [‘big’, ‘reg’, ‘sm’, ‘tiny’] 
 
For each of the above query strings, you can specify a coma delimited list of values. Retrieving this list without specifying the above parameters will return a paged list of all enrollments in the given realm.
   Path       GET  https://api.schoology.com/v1/[realm]/enrollments    
         Content    none 
       Return   A collection of enrollment objects, each one containing enrollment fields 
JSON  {  
    "enrollment" : [  
        {  
            "id" :  "43807916" ,  
            "uid" :  "45552" ,  
            "school_uid" :  "" ,  
            "name_title" :  "" ,  
            "name_title_show" :  "0" ,  
            "name_first" :  "Mr." ,  
            "name_first_preferred" :  "" ,  
            "name_middle" :  "" ,  
            "name_middle_show" :  "0" ,  
            "name_last" :  "Strickland" ,  
            "name_display" :  "Mr. Strickland" ,  
            "admin" :  1 ,  
            "status" :  "1" ,  
            "picture_url" :  "http: \/\/ .. \/ images \/ avatar1.png" ,  
            "links" : {  
                "self" :  "http: \/\/ ...enrollments \/ 43807916"  
            }  
        },  
        {  
            "id" :  "44783136" ,  
            "uid" :  "48289" ,  
            "school_uid" :  "s1" ,  
            "name_title" :  "" ,  
            "name_title_show" :  "0" ,  
            "name_first" :  "James" ,  
            "name_first_preferred" :  "" ,  
            "name_middle" :  "" ,  
            "name_middle_show" :  "0" ,  
            "name_last" :  "Howlett" ,  
            "name_display" :  "James Howlett" ,  
            "admin" :  0 ,  
            "status" :  "1" ,  
            "picture_url" :  "http: \/\/ ... \/ default_user.gif" ,  
            "links" : {  
                "self" :  "http: \/\/ ... \/ enrollments \/ 44783136"  
            }  
        }  
    ],  
    "total" :  "2" ,  
    "links" : {  
        "self" :  "http: \/\/ ...enrollment_status=1&start=0&limit=20"  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <enrollment>  
    <id> 43807916 </id>  
    <uid> 45552 </uid>  
    <school_uid  />  
    <name_title  />  
    <name_title_show> 0 </name_title_show>  
    <name_first> Mr. </name_first>  
    <name_first_preferred  />  
    <name_middle  />  
    <name_middle_show> 0 </name_middle_show>  
    <name_last> Strickland </name_last>  
    <name_display> Mr. Strickland </name_display>  
    <admin> 1 </admin>  
    <status> 1 </status>  
    <picture_url> http://...//images/avatar1.png </picture_url>  
    <links>  
      <self> http://.../enrollments/43807916 </self>  
    </links>  
  </enrollment>  
  <enrollment>  
    <id> 44783136 </id>  
    <uid> 48289 </uid>  
    <school_uid> s1 </school_uid>  
    <name_title  />  
    <name_title_show> 0 </name_title_show>  
    <name_first> James </name_first>  
    <name_first_preferred  />  
    <name_middle  />  
    <name_middle_show> 0 </name_middle_show>  
    <name_last> Howlett </name_last>  
    <name_display> James Howlett </name_display>  
    <admin> 0 </admin>  
    <status> 1 </status>  
    <picture_url> http://.../default_user.gif </picture_url>  
    <links>  
      <self> http://.../v1/sections/3719526/enrollments/44783136 </self>  
    </links>  
  </enrollment>  
  <total> 2 </total>  
  <links>  
    <self> http://...enrollment_status=1 & start=0 & limit=20 </self>  
  </links>  
</result>          
view 
View a specified enrollment
   Path       GET  https://api.schoology.com/v1/[realm]/enrollments/{id}    
         Content    none 
       Return   An object containing enrollment fields 
JSON  {  
    "id" :  "44783136" ,  
    "uid" :  "48289" ,  
    "school_uid" :  "s1" ,  
    "name_title" :  "" ,  
    "name_title_show" :  "0" ,  
    "name_first" :  "James" ,  
    "name_first_preferred" :  "" ,  
    "name_middle" :  "" ,  
    "name_middle_show" :  "0" ,  
    "name_last" :  "Howlett" ,  
    "name_display" :  "James Howlett" ,  
    "admin" :  0 ,  
    "status" :  "1" ,  
    "picture_url" :  "http: \/\/ .. \/ default_user.gif"  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
  <id> 44783136 </id>  
  <uid> 48289 </uid>  
  <school_uid> s1 </school_uid>  
  <name_title  />  
  <name_title_show> 0 </name_title_show>  
  <name_first> James </name_first>  
  <name_first_preferred  />  
  <name_middle  />  
  <name_middle_show> 0 </name_middle_show>  
  <name_last> Howlett </name_last>  
  <name_display> James Howlett </name_display>  
  <admin> 0 </admin>  
  <status> 1 </status>  
  <picture_url> http://.../default_user.gif </picture_url>  
</result>          
update 
Modify an enrollment
   Path       PUT  https://api.schoology.com/v1/[realm]/enrollments/{id}    
         Content   An object containing enrollment fields 
JSON  {  
    "uid" :  "2461632" ,  
    "status" :  "2"  
} XML  <body>  
  <uid> 2461632 </uid>  
  <status> 2 </status>  
</body>        Return    none 
         
bulk update 
Modify multiple enrollments
   Path       PUT  https://api.schoology.com/v1/[realm]/enrollments    
         Content   Up to 50 enrollments can be updated at a time by wrapping your response in ‘enrollments’, with enrollment fields  wrapped in ‘enrollment’.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "id" :  "2461632" ,  
                "status" :  "2"  
            },  
            {  
                "id" :  "23453322" ,  
                "status" :  "2"  
            }  
        ]  
    }  
} XML  <body>  
  <enrollments>  
    <enrollment>  
      <uid> 2461632 </uid>  
      <status> 2 </status>  
    </enrollment>  
    <enrollment>  
      <uid> 23453322 </uid>  
      <status> 2 </status>  
    </enrollment>  
  </enrollments>  
</body>        Return   The schoology ID of each enrollment updated, or an error message if there was a problem creating the enrollment.
JSON  {  
    "enrollments" : {  
        "enrollment" : [  
            {  
                "response_code" :  200 ,  
                "id" :  "44783151"  
            },  
            {  
                "response_code" :  200 ,  
                "id" :  "44783156"  
            }  
        ]  
    }  
} XML  <?xml  version = "1.0"  encoding = "utf-8"  ?>  
<result>  
    <enrollments>  
        <enrollment>  
            <response_code> 200 </response_code>  
            <id> 44783151 </id>  
        </enrollment>  
        <enrollment>  
            <response_code> 200 </response_code>  
            <id> 44783156 </id>  
        </enrollment>  
    </enrollments>  
</result>          
delete 
Delete an enrollment (cannot be undone)
   Path       DELETE  https://api.schoology.com/v1/[realm]/enrollments/{id}    
         Content    none 
       Return    none 
         
bulk delete 
Delete up to 50 enrollments. Comma-separated Schoology IDs are passed in the query string with the enrollment_ids  parameter.
   Path       DELETE  https://api.schoology.com/v1/enrollments?enrollment_ids=[comma-separated-enrollment-ids]    
         Content    none 
       Return    none