Project

Retrieves a specific project.
GET https://api.speaking-partner.com/v1/projects/{projectId}

URL Parameters

Name Required? Description
ProjectId Yes The ID of the project.

Example Request

GET: https://api.speaking-partner.com/v1/projects/1008

Example Response

{
   "ClassType":"Individual",
   "MaxSessionEnrollments":1,
   "Name":"Individual Scheduled",
   "ProjectId":1008,
   "SessionLength":15
}

Sessions

Retrieves sessions of a specific project.
GET https://api.speaking-partner.com/v1/projects/{projectId}/sessions?startdate={startdate}&enddate={enddate}&open={open}

URL Parameters

Name Required? Description
ProjectId Yes The ID of the project.
StartDate No Retrieve sessions which start after this date.
EndDate No Retrieve sessions which start before this date.
Open No Retrieve only sessions which either have an open enrollment (true) or are full (false).

Example Request

GET: https://api.speaking-partner.com/v1/projects/651/sessions?startdate=1336520255&enddate=1336522255&open=true

Example Response

[
   {
      "CancellationDate":null,
      "EndDate":1336520455,
      "EnrollmentCount":0,
      "MaxSessionEnrollments":1,
      "Name":"Individual Session A",
      "SessionId":17,
      "StartDate":1336520355,
      "IsSubstituted":false,
      "Billable":true,
      "Teacher":{
         "Biography":null,
         "FirstName":"Jon",
         "LastName":"Smith",
         "PhotoURL":null,
         "TeacherId":8
      },
      "Metadata":{
         "ValueA":"http://example.com",
         "ValueB":"USA",
         "ValueC":"12345"
      }
   },
   {
      "CancellationDate":null,
      "EndDate":1336520475,
      "EnrollmentCount":0,
      "MaxSessionEnrollments":1,
      "Name":"Individual Session B",
      "SessionId":18,
      "StartDate":1336520375,
      "IsSubstituted":false,
      "Teacher":{
         "Biography":null,
         "FirstName":"Bob",
         "LastName":"Jones",
         "PhotoURL":null,
         "TeacherId":8
      },
      "Metadata":{
         "ValueA":"http://example.com/test",
         "ValueB":"USA",
         "ValueC":"67890"
      }
   }
]

Availabilities

Retrieves availabilities of a specific project.
GET https://api.speaking-partner.com/v1/projects/{projectId}/availabilities?startdate={startdate}&enddate={enddate}&teacherid={teacherid}&domain={domain}&username={username}

URL Parameters

Name Required? Description
ProjectId Yes The ID of the project.
StartDate No Retrieve availabilities which start after this date.
EndDate No Retrieve availabilities which start before this date.
TeacherId No Retrieve availabilities for a specific teacher.
Domain & Username No Filters availabilities based on current student enrollments.

Example Request

GET: https://api.speaking-partner.com/v1/projects/651/availabilities?startdate=1372873200&enddate=1372875600&domain=example&username=example

Example Response

[
    {
        "AvailabilityId": 202,
        "Teacher: {
            "TeacherId": 1143,
            "FirstName": "Walter",
            "LastName": "Bishop",
            "Biography": "Teaching is fun!",
            "PhotoURL": null
        },
        "StartDate": 1372874400,
        "EndDate": 1372875300
    },
    {
        "AvailabilityId": 203,
        "Teacher": {
            "TeacherId": 33,
            "FirstName": "Noah",
            "LastName": "Barnes",
            "Biography": "I love to teach!",
            "PhotoURL": null
        },
        "StartDate": 1372875600,
        "EndDate": 1372876500
    }
]

Teachers

Retrieves teachers for a specific project.
GET https://api.speaking-partner.com/v1/projects/{projectId}/teachers

URL Parameters

Name Required? Description
ProjectId Yes The ID of the project.

Example Request

GET: https://api.speaking-partner.com/v1/projects/651/teachers

Example Response

[
   {
      "TeacherId":1143,
      "FirstName":"Walter",
      "LastName":"Bishop",
      "Biography":"Hi! My name is Walter. I have been teaching for 12 years and enjoy reading, writing, and outdoor activities.",
      "PhotoURL":null
   },
   {
      "TeacherId":5323,
      "FirstName":"Lilly",
      "LastName":"Barnes",
      "Biography":"Hello! My name is Lilly Barnes. The best way to learn a language is to practice a lot and to not be afraid to speak!",
      "PhotoURL":null
   }
]