---
title: "API: listSessions"
slug: "api-listsessions"
updated: 2022-08-22T16:54:09Z
published: 2022-08-22T16:54:09Z
canonical: "support.smarteru.com/api-listsessions"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.smarteru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API: listSessions

- Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
- If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
- Tags are required unless specified.

## **Descripti****on**

The listSessions method retrieves [sessions](/v1/docs/sessions) for an [instructor-led course](/v1/docs/courses-instructor-led).

## **Who Has** **Access**

[Administrators and owners](/v1/docs/user-profile-information#access-level) have access to the listSessions method.

## **AP****I Call XML Package**

```markup
<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>listSessions</Method>

   <Parameters>
      <LearningModule>
         <LearningModuleID><![CDATA[]]></LearningModuleID>
      </LearningModule>
   </Parameters>

</SmarterU>
```

## **L****earningModule Tag Group**

The LearningModule tag group is a container for the courses.

```markup
<LearningModule>
   <LearningModuleID><![CDATA[]]></LearningModuleID>
</LearningModule>
```

The LearningModule tag may contain the following.

### **LearningModuleID**

The instructor-led course's system-generated identifier. This is the LearningModuleID returned by the [listLearningModules](/v1/docs/api-listlearningmodules) method.

## **AP****I Response XML Package**

The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-listsessions#error-codes) tag.

```markup
<SmarterU>
   <Result></Result>
   <Info>
      <Sessions>
         <Session>
            <CourseSessionID>![CDATA[]]</CourseSessionID>
            <Status>![CDATA[]]</Status>        
            <Type>![CDATA[]]</Type>
            <GradeType>![CDATA[]]</GradeType>
            <Dates>
               <Date>
                  <StartDate>![CDATA[]]</StartDate>
                  <EndDate>![CDATA[]]</EndDate>
                  <StartDateConverted><![CDATA[]]></StartDateConverted>
                  <EndDateConverted><![CDATA[]]></EndDateConverted>
                  <URL><![CDATA[]]></URL>
                  <WebinarProvider>![CDATA[]]<WebinarProvider/>
                  <Other>![CDATA[]]<Other/>
                  <Venue>![CDATA[]]</Venue>
                  <Room>![CDATA[]]</Room>
                  <Location>![CDATA[]]<Location/>
                  <Capacity>![CDATA[]]<Capacity/>
               </Date>
            </Dates>
         </Session>
      </Sessions>
   </Info>

   <Errors>
      <Error>
         <ErrorID></ErrorID>
         <ErrorMessage></ErrorMessage>
      </Error>
   </Errors>

</SmarterU>
```

The Sessions tag is a container for the sessions returned by the listSessions method. Each session is contained in a Session tag and may contain the following.

### **CourseSessionID**

The session's system-generated identifier.

### **Status**

The session's status (i.e., Active, Finalized, or Removed).

### **Type**

The [session type](/v1/docs/instructor-led-session-main#session-type) (i.e., Single or Multi).

### **GradeType**

The [session's grade type](/v1/docs/instructor-led-session-main#grade-type) (i.e., None, Letter Grade, PassFail, or Percentage).

### **Dates**

The Dates tag is a container for the session dates. Each session date is contained in a Date tag and may contain following.

| Tag | Description |
| --- | --- |
| **StartDate** | The [session's start date](/v1/docs/instructor-led-session-session-details#start-date) in UTC. |
| **EndDate** | The [session's end date](/v1/docs/instructor-led-session-session-details#end-date) in UTC. |
| **StartDateConverted** | The session's start date converted to the API user's timezone. |
| **EndDateConverted** | The session's end date converted to the API user's timezone. |
| **URL** | The [session's URL](/v1/docs/instructor-led-session-session-details#url). |
| **WebinarProvider** | The [session's webinar provider](/v1/docs/instructor-led-session-session-details#webinar-provider). |
| **Other** | The value in the [session's Other setting](/v1/docs/instructor-led-session-session-details#other). |
| **Venue** | The [venue](/v1/docs/instructor-led-session-session-details#venue) where the session will take place. |
| **Room** | The [room](/v1/docs/instructor-led-session-session-details#room) where the session will take place. |
| **Location** | The [room's location](/v1/docs/settings-rooms#location). |
| **Capacity** | The [maximum number of learners](/v1/docs/instructor-led-session-session-details#capacity) that can be enrolled in the session. |

### Example API Response XML Package

Below is an example of an API response XML package.

```markup
<SmarterU>
   <Result></Result>
   <Info>
      <Sessions>

         <Session>
            <CourseSessionID><![CDATA[42411]]></CourseSessionID>
            <Status><![CDATA[Finalized]]></Status>
            <Type><![CDATA[Single]]></Type>
            <GradeType><![CDATA[PassFail]]></GradeType>
            <Dates>
               <Date>
                  <StartDate><![CDATA[2018-06-05 14:30:00.0]]></StartDate>
                  <EndDate><![CDATA[2018-06-05 22:30:00.0]]></EndDate>
                  <StartDateConverted><![CDATA[2018-06-05 08:30:00]]></StartDateConverted>
                  <EndDateConverted><![CDATA[2018-06-05 16:30:00]]></EndDateConverted>
                  <URL/>
                  <WebinarProvider/>
                  <Other/>
                  <Venue><![CDATA[Training Campus]]></Venue>
                  <Room><![CDATA[Training Boutique A]]></Room>
                  <Location/>
                  <Capacity>50</Capacity>
               </Date>
            </Dates>
         </Session>

         <Session>
            <CourseSessionID><![CDATA[56667]]></CourseSessionID>
            <Status><![CDATA[Removed]]></Status>
            <Type><![CDATA[Single]]></Type>
            <GradeType><![CDATA[PassFail]]></GradeType>
            <Dates>
               <Date>
                  <StartDate><![CDATA[2018-07-10 14:30:00.0]]></StartDate>
                  <EndDate><![CDATA[2018-07-10 23:30:00.0]]></EndDate>
                  <StartDateConverted><![CDATA[2018-07-10 08:30:00]]></StartDateConverted>
                  <EndDateConverted><![CDATA[2018-07-10 17:30:00]]></EndDateConverted>
                  <URL/>
                  <WebinarProvider/>
                  <Other/>
                  <Venue><![CDATA[Training Campus]]></Venue>
                  <Room><![CDATA[Training Boutique A]]></Room>
                  <Location/>
                  <Capacity>50</Capacity>
               </Date>
            </Dates>
         </Session>
 
         <Session>
            <CourseSessionID><![CDATA[56669]]></CourseSessionID>
            <Status><![CDATA[Active]]></Status>
            <Type><![CDATA[Multi]]></Type>
            <GradeType><![CDATA[PassFail]]></GradeType>
            <Dates>
               <Date>
                  <StartDate><![CDATA[2018-10-02 15:00:00.0]]></StartDate>
                  <EndDate><![CDATA[2018-10-02 23:30:00.0]]></EndDate>
                  <StartDateConverted><![CDATA[2018-10-02 09:00:00]]></StartDateConverted>
                  <EndDateConverted><![CDATA[2018-10-02 17:30:00]]></EndDateConverted>
                  <URL/>
                  <WebinarProvider/>
                  <Other/>
                  <Venue><![CDATA[Training Campus]]></Venue>
                  <Room><![CDATA[Training Boutique A]]></Room>
                  <Location/>
                  <Capacity>50</Capacity>
               </Date>
 
               <Date>
                  <StartDate><![CDATA[2019-06-03 15:00:00.0]]></StartDate>
                  <EndDate><![CDATA[2019-06-03 23:00:00.0]]></EndDate>
                  <StartDateConverted><![CDATA[2019-06-03 09:00:00]]></StartDateConverted>
                  <EndDateConverted><![CDATA[2019-06-03 17:00:00]]></EndDateConverted>
                  <URL/>
                  <WebinarProvider/>
                  <Other/>
                  <Venue><![CDATA[Training Campus]]></Venue>
                  <Room><![CDATA[Training Boutique A]]></Room>
                  <Location/>
                  <Capacity>50</Capacity>
               </Date>
            </Dates>
         </Session>
 
      </Sessions>
   </Info>

   <Errors>
      <Error>
         <ErrorID></ErrorID>
         <ErrorMessage></ErrorMessage>
      </Error>
   </Errors>

</SmarterU>
```

## **Error Codes**

| Error Code | Message |
| --- | --- |
| LS:01 | The LearningModuleID provided is not valid. |

## Related

- [API: listLearningModules](/api-listlearningmodules.md)
- [Sessions](/sessions.md)
- [Viewing Sessions](/viewing-sessions.md)
