Session

Retrieves details for a specific session.
GET https://api.speaking-partner.com/v1/sessions/{sessionid}

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

GET: https://api.speaking-partner.com/v1/sessions/52699

Example Response

{
   "CancellationDate":null,
   "EndDate":1349474400,
   "EnrollmentCount":2,
   "MaxSessionEnrollments":3,
   "Name":"Group Session",
   "SessionId":52699,
   "StartDate":1349472600,
   "IsSubstituted":false,
   "Billable":true,
   "Teacher":{
      "Biography":null,
      "FirstName":"Walter",
      "LastName":"Bishop",
      "PhotoURL":null,
      "TeacherId":8
   },
   "Metadata":{
      "ValueA":"http://example.com",
      "ValueB":"USA",
      "ValueC":"12345"
   }
}

Enrollments

Retrieves all enrollments for a specific session. Each enrollment includes student information.
GET https://api.speaking-partner.com/v1/sessions/{sessionid}/enrollments

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

GET: https://api.speaking-partner.com/v1/sessions/52699/enrollments

Example Response

[
   {
      "Attended":true,
      "EnrollmentDate":1349300483,
      "EnrollmentId":2,
      "Feedback":{
         "CreationDate":1351641600,
         "Custom":null,
         "Message":"You can do better next time."
      },
      "Student":{
         "Domain":"massive",
         "Email":"bill@example.com",
         "FirstName":"Bill",
         "LastName":"Jones",
         "Locale":"en-US",
         "NativeName":null,
         "PrimaryPhone":null,
         "PublicName":"Billy",
         "SecondaryPhone":null,
         "SkypeName":null,
         "Status":"Active",
         "TimeZone":"Mountain Standard Time",
         "Username":"bjones"
      }
   },
   {
      "Attended":false,
      "EnrollmentDate":1350334240,
      "EnrollmentId":6,
      "Feedback":null,
      "Student":{
         "Domain":"massive",
         "Email":"student@example.com",
         "FirstName":"First",
         "LastName":"Last",
         "Locale":"en-US",
         "NativeName":"",
         "PrimaryPhone":"1231231234",
         "PublicName":"Public",
         "SecondaryPhone":"",
         "SkypeName":"",
         "Status":"Active",
         "TimeZone":"Mountain Standard Time",
         "Username":"examplestudent"
      }
   }
]

Recordings

Retrieves all recordings for a specific session.
GET https://api.speaking-partner.com/v1/sessions/{sessionid}/recordings

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

GET: https://api.speaking-partner.com/v1/sessions/3322/recordings

Example Response

[
   {
      "ContentType":"audio/mpeg",
      "CreationDate":1351877405,
      "Extension": "mp3",
      "IsPrivate":false,
      "Name":"Recording_20121102_173005.mp3",
      "RecordingId":1,
      "SessionId":3322,
      "Size":1034235,
      "Url":".../Recording_20121102_173005.mp3"
   },
   {
      "ContentType":"audio/mpeg",
      "CreationDate":1351877405,
      "Extension": "mp3",
      "IsPrivate":false,
      "Name":"Recording_20121102_173005.mp3",
      "RecordingId":2,
      "SessionId":3322,
      "Size":53210,
      "Url":".../Recording_20121102_173005.mp3"
   }
]
Creates a new recording for a specific session.
POST https://api.speaking-partner.com/v1/sessions/{sessionid}/recordings

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Request Parameters

Name Required? Description
ContentType No The HTTP content type of the recording. Required if URL is not provided. (audio/mpeg)
Extension No The extension to use for the file. Required if URL is not provided. (mp3)
Url No The URL location of the recording file. Only set this when the file is hosted outside of Speaking Partners. Required if ContentType and Extension are not provided. Must be URL Encoded.
IsPrivate Yes Indicates if the recording should be hidden from students and teachers and only accessible by Speaking Partners staff.

Example Request

POST: https://api.speaking-partner.com/v1/sessions/3322/recordings
extension=mp3&contenttype=audio/mpeg&isprivate=false

Example Response

{
    "ContentType":"audio/mpeg",
    "CreationDate":1351877405,
    "Extension": "mp3",
    "IsPrivate":false,
    "Name":null,
    "RecordingId":5,
    "SessionId":3312,
    "Size":null,
    "Url":null
}

Metadata

Retrieves metadata for a specific session.
GET https://api.speaking-partner.com/v1/sessions/{sessionid}/metadata

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

GET: https://api.speaking-partner.com/v1/sessions/3322/metadata

Example Response

{
   "ValueA":"http://example.com",
   "ValueB":"USA",
   "ValueC":"12345"
}
Updates metadata for a specific session.
POST https://api.speaking-partner.com/v1/sessions/{sessionid}/metadata

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

POST: https://api.speaking-partner.com/v1/sessions/3322/metadata
ValueA=http%3A%2F%2Fexample.com&ValueB=USA&ValueC=12345

Example Response

{
   "ValueA":"http://example.com",
   "ValueB":"USA",
   "ValueC":"12345"
}

Lesson

Retrieves the lesson for a specific session.
GET https://api.speaking-partner.com/v1/sessions/{sessionid}/lesson

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

GET: https://api.speaking-partner.com/v1/sessions/3322/lesson

Example Response

{
   "LessonId":655,
   "Name":"English Level 1",
   "Module":{
      "ModuleId":3443,
      "Name":"English Introduction"
   },
   "Handouts":[
      {
         "Name":"handout.pdf",
         "IsHandout":true,
         "Url":"https://student.speaking-partner.com/files/handout.pdf"
      }
   ]
}
Updates lesson for a specific session.
POST https://api.speaking-partner.com/v1/sessions/{sessionid}/lesson

URL Parameters

Name Required? Description
SessionId Yes The ID of the session.

Example Request

POST: https://api.speaking-partner.com/v1/sessions/3322/lesson

Example Response

{
   "LessonId":655,
   "Name":"English Level 1",
   "Module":{
      "ModuleId":3443,
      "Name":"English Introduction"
   },
   "Handouts":[
      {
         "Name":"handout.pdf",
         "IsHandout":true,
         "Url":"https://student.speaking-partner.com/files/handout.pdf"
      }
   ]
}