Alexa.Education.Course Interface

Implement the Alexa.Education.Course interface in your Alexa education skill to provide a list of courses and the current enrollment status for a given student. All education skills that support assignments or grades must support this interface. For more information about education skills, see About Alexa Education Skills.

For the list of languages that the Course interface supports, see List of Alexa Interfaces and Supported Languages.

Utterances

There are no utterances associated with this interface.

Request

The Get request queries a list of courses and the current enrollment status for a given student.

If there's more than one student associated with the account and the user doesn't specify the student, Alexa asks the user for clarification, and then includes the appropriate studentId in the request to your skill. In other words, your skill doesn't need to discern whether there's more than one student associated with the account, it just needs to return the results for the specified studentId.

The payload of the Get request contains the following fields.

Field Description Type

paginationContext

Pagination information

PaginationContext object for requests

query

Match-all query parameters to filter for a studentId (required) and courseEnrollmentState (required)

Object

locale

Locale that identifies the user's language

string enum

The following is an example of a Get request.

{
  "request": {
    "header": {
      "namespace": "Alexa.Education.Course",
      "name": "Get",
      "messageId": "ExampleMessageID",
      "interfaceVersion": "1.0"
    },
    "authorization": {
      "type": "BearerToken",
      "token": "ExampleBearerToken"
    },
    "payload": {
      "paginationContext": {
        "maxResults": 5,
        "nextToken": "ExampleNextToken"
      },
      "query": {
        "matchAll": {
          "studentId": "1184",
          "courseEnrollmentState": "ACTIVE"
        }
      },
      "locale": "en-US"
    }
  }
}

Response

If you handle a Get request successfully, respond with a GetResponse object.

The payload of a GetResponse object contains the following fields.

Field Description Type Required

paginationContext

Pagination information

PaginationContext object for responses

No

courses

The results of the query

Array of Course objects

Yes

The following is an example of GetResponse.

Copied to clipboard.

{
  "response": {
    "header": {
      "namespace": "Alexa.Education.Course",
      "name": "GetResponse",
      "messageId": "ExampleMessageID",
      "interfaceVersion": "1.0"
    },
    "payload": {
      "paginationContext": {
        "totalCount": 1
      },
      "courses": [
      {
        "id": "course_001",
        "name": "UFO 101",
        "aliases": [
          "UFO"
        ],
        "description": "This course rests on two premises: (1) UFOs are a myth; (2) myths are real.",
        "startTime": "2019-06-05T00:00:00Z",
        "endTime": "2019-06-10T00:00:00Z"
      }
      ]
    }
  }
}