Student

Updates an existing student account or creates a new one if an existing one is not found. Responds with the student account information.
POST https://api.speaking-partner.com/v1/students/{domain}/{username}

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Request Parameters

Name Required? Description
FirstName Yes The first given name for the student.
LastName Yes The last given name for the student.
PublicName Yes The name which will represent the student publicly online. (aka nickname)
Email Yes The email address for the student.
Locale Yes The locale ID which represents the locale information used for language conversion.
TimeZone Yes The timezone ID which represents the student’s Time Zone.
Domain No A new updated domain value for the student account.
SkypeName No The Skype username for the student.
PrimaryPhone No The primary number for the student.
SecondaryPhone No The secondary number for the student.
NativeName No The name of the student in their native language.

Example Request

POST: https://api.speaking-partner.com/v1/students/testdomain/testjsmith
BODY: firstName=John&lastName=Smoth&publicName=John S&email=jsmith@example.com&skypeName=jsmith&locale=en-US&timezone=Mountain Standard Time

Example Response

{
   "SecondaryPhone":null,
   "Domain":"testdomain",
   "Email":"jsmith@example.com",
   "FirstName":"John",
   "PrimaryPhone":null,
   "LastName":"Smith",
   "Locale":"en-US",
   "NativeName":null,
   "PublicName":"John B",
   "SkypeName":"jsmith",
   "Status":"Active",
   "TimeZone":"Mountain Standard Time",
   "Username":"testjsmith",
   "UserId":123,
}
Retrieves an existing student’s account information.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith

Example Response

{
   "SecondaryPhone":null,
   "Domain":"testdomain",
   "Email":"jsmith@example.com",
   "FirstName":"John",
   "PrimaryPhone":null,
   "LastName":"Smith",
   "Locale":"en-US",
   "NativeName":null,
   "PublicName":"John B",
   "SkypeName":"jsmith",
   "Status":"Active",
   "TimeZone":"Mountain Standard Time",
   "Username":"testjsmith",
   "UserId":123,
}

Packages

Generates a new package code and assigns it to the student. Responds with the newly generated package code.
POST https://api.speaking-partner.com/v1/students/{domain}/{username}/packages

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Request Parameters

Name Required? Description
PackageId Yes The Package ID provided by Speaking Partners to assign to the student.
Redeemed No Indicates whether to redeem the package code.

Example Request

POST: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/packages
BODY: packageId=15&redeemed=true

Example Response

{
   "AssignedDate":1336599239,
   "Code":"AAAA-1111-2222-3333",
   "PackageId":5,
   "RedeemedDate":1336599240,
   "Status":"Active"
}
Assigns a previously generated package code to the student. Responds with the package code.
POST https://api.speaking-partner.com/v1/students/{domain}/{username}/packagecodes

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Request Parameters

Name Required? Description
Code Yes A previously generated package code provided by Speaking Partners to assign to the student.
Redeemed No Indicates whether to redeem the package code.

Example Request

POST: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/packagecodes
BODY: code=BBBB-2222-2222-4444&redeemed=true

Example Response

{
   "AssignedDate":1336599239,
   "Code":"BBBB-2222-2222-4444",
   "PackageId":55,
   "RedeemedDate":null,
   "Status":"Active"
}
Retrieves an existing student’s list of assigned packages. Each package also contains any codes generated and assigned to the student.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/packages

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/packages

Example Response

[
   {
      "AvailableDays":30,
      "AvailableEndDate":null,
      "AvailableStartDate":1335992400,
      "Codes":[
         {
            "AssignedDate":1336174870,
            "Code":"FFFF-FFAA-1234-1234",
            "PackageId":5,
            "RedeemedDate":null,
            "Status":"Inactive"
         },
         {
            "AssignedDate":1336520255,
            "Code":"5555-1111-DD0D-4C40",
            "PackageId":5,
            "RedeemedDate":null,
            "Status":"Active"
         }
      ],
      "PackageId":5,
      "Quantity":null,
      "UnlimitedQuantity":true
   }
]
Retrieves an existing student’s list of assigned package codes.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/packagecodes

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/packagecodes

Example Response

[
   {
   "AssignedDate":1336174870,
   "Code":"FFFF-FFAA-1234-1234",
   "PackageId":5,
   "RedeemedDate":null,
   "Status":"Inactive"
   },
   {
   "AssignedDate":1336520255,
   "Code":"5555-1111-DD0D-4C40",
   "PackageId":5,
   "RedeemedDate":null,
   "Status":"Active"
   }
]

Projects

Retrieves all projects which a student has access to. Includes enrollment and credit details.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/projects

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/projects

Example Response

[
   {
      "ClassType":"Individual",
      "MaxSessionEnrollments":1,
      "Name":"Individual Scheduled",
      "ProjectId":1008,
      "RemainingCredits":10,
      "SessionLength":15
   },
   {
      "ClassType":"Group",
      "MaxSessionEnrollments":3,
      "Name":"Group Scheduled",
      "ProjectId":1010,
      "RemainingCredits":4,
      "SessionLength":30
   },
   {
      "ClassType":"Classroom",
      "MaxSessionEnrollments":1,
      "Name":"Classroom Scheduled",
      "ProjectId":1011,
      "RemainingCredits":15,
      "SessionLength":60
   },
   {
      "ClassType":"Broadcast",
      "MaxSessionEnrollments":200,
      "Name":"Broadcast Scheduled",
      "ProjectId":1012,
      "RemainingCredits":20,
      "SessionLength":60
   }
]

Enrollments

Retrieves all enrollments for a student. Supports filtering by session start date, end date and project.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/enrollments?projectid={projectid}&startdate={startdate}&enddate={enddate}

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.
ProjectId No Retrieves session enrollments of a specific project
StartDate No Retrieve session enrollments which start after this date.
EndDate No Retrieves session enrollments which start before this date.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/enrollments?startdate=1336520255&enddate=1336521255&projectId=15

Example Response

[
   {
      "Attended":false,
      "EnrollmentDate":1349300483,
      "EnrollmentId":274,
      "Feedback":null,
      "Session":{
         "CancellationDate":null,
         "EndDate":1349474400,
         "EnrollmentCount":2,
         "MaxSessionEnrollments":3,
         "Name":"Group Session",
         "SessionId":13,
         "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"
         }
      }
   }
]
Enrolls a student in a session or availability. Either SessionId or AvailabilityId must be provided.
POST https://api.speaking-partner.com/v1/students/{domain}/{username}/enrollments

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Request Parameters

Name Required? Description
SessionId No The ID of the session to enroll the student in.
AvailabilityId No The ID of the availability to convert to a session and enroll in.

Example Request

POST: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/enrollments
BODY: sessionId=10

Example Response

{
    "Attended":false,
    "EnrollmentDate":1349300483,
    "EnrollmentId":274,
    "Feedback":null,
    "Session":{
        "CancellationDate":null,
        "EndDate":1349474400,
        "EnrollmentCount":2,
        "MaxSessionEnrollments":3,
        "Name":"Group Session",
        "SessionId":13,
        "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"
        }
    }
}

Courses & Lessons

Retrieves all courses which the student has access to.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/courses

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/courses

Example Response

[
   {
      "CourseId":1,
      "Curriculum":{
         "Description":"Let's learn english is a great course.",
         "Name":"Let's Learn English"
      },
      "Name":"Course A"
   },
   {
      "CourseId":3,
      "Curriculum":{
         "Description":"English is fun is a great course.",
         "Name":"English is fun!"
      },
      "Name":"Course B"
   }
]
Retrieves details for a specific course which the student has access to.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/courses/{courseid}

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.
CourseId Yes The ID of the course.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/courses/42

Example Response

{
    "CourseId":1,
    "Curriculum":{
        "Description":"Let's learn english is a great course.",
        "Name":"Let's Learn English"
    },
    "Name":"Course A"
}
Retrieves all lessons of a specific course which the student has access to.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/courses/{courseid}/lessons

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.
CourseId Yes The ID of the course.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/courses/42/lessons

Example Response

[
   {
      "LessonId":1,
      "Module":{
         "ModuleId":2,
         "Name":"Unit 1"
      },
      "Name":"Super Lesson 1",
      "Url":"https://student.speaking-partner.com/..."
   },
   {
      "LessonId":2,
      "Module":{
         "ModuleId":2,
         "Name":"Unit 1"
      },
      "Name":"Super Lesson 2",
      "Url":"https://student.speaking-partner.com/..."
   }
]
Retrieves progress and details of a specific lesson.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/courses/{courseid}/lessons/{lessonid}

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.
CourseId Yes The ID of the course.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/courses/42/lessons/4

Example Response

{
    "LessonId":1,
    "Module":{
        "ModuleId":2,
        "Name":"Unit 1"
    },
    "Name":"Super Lesson 1",
    Progress: 25,
    Score: 72,
    TimeSpent: 240,
    "Url":"https://student.speaking-partner.com/..."
}

Activity Log

Retrieves the activity log for a Student. Each entry contains metadata specific to that type of activity.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/activity?type={type}&startdate={startdate}&enddate={enddate}

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.
Type No The activity log type to filter by. (Login, CourseLaunch)
StartDate No Retrieve log entries which occured after this date.
EndDate No Retrieve log entries which occured before this date.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/activity?type=login&startdate=1353089755&enddate=1353089795

Example Response

[
   {
      "Type":"Login",
      "Data":"Website - 255.255.255.255",
      "CreationDate":1353089785
   },
   {
      "Type":"Login",
      "Data":"Website - 255.255.255.255",
      "CreationDate":1353089774
   },
   {
      "Type":"Login",
      "Data":"Website - 255.255.255.255",
      "CreationDate":1353089763
   }
]

Comments

Retrieves the comments for a Student.
GET https://api.speaking-partner.com/v1/students/{domain}/{username}/comments

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Example Request

GET: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/comments

Example Response

[
    {
        "CommentId":365,
        "Message":"this is a comment for a student",
        "Commenter":{
            "FirstName":"Walter",
            "LastName":"Bishop"
        }
        "CreationDate":1353089785
    },
    {
        "CommentId":366,
        "Message":"this is another comment for a student",
        "Commenter":{
            "FirstName":"Walter",
            "LastName":"Bishop"
        }
        "CreationDate":1354360466
    },
    {
        "CommentId":400,
        "Message":"this is a third comment for a student",
        "Commenter":{
            "FirstName":"Susan",
            "LastName":"Porter"
        }
        "CreationDate":1355678921
    }
]
Creates a comment for a student.
POST https://api.speaking-partner.com/v1/students/{domain}/{username}/comments

URL Parameters

Name Required? Description
Domain Yes The customer domain for the student account.
Username Yes The username for the student account.

Request Parameters

Name Required? Description
Message Yes The message to leave as the comment.

Example Request

POST: https://api.speaking-partner.com/v1/students/testdomain/testjsmith/comments
BODY: message=this is a comment for a student

Example Response

{
    "CommentId":365,
    "Message":"this is a comment for a student",
    "Commenter":{
        "FirstName":"Walter",
        "LastName":"Bishop"
    }
    "CreationDate":1353089785
}