Alexa.Education.Grade.Course Interface

Implement the Alexa.Education.Grade.Course interface in your Alexa education skill to provide a list of recent course grades for a given student or course.

For the list of locales that are supported for the Grade.Course interface, see List of Capability Interfaces and Supported Locales.

Utterances

When you use the Alexa.Education.Grade.Course interface, the voice interaction model is already built for you. The following examples show some user utterances:

Alexa, what are Hannah's grades?
Alexa, what's my grade in chemistry?
Alexa, what did Jack get in math?

Request

The Get request queries a list of recent course grades for a given student or course. This request has query parameters to filter for studentId (required) and courseId (optional). The results must be sorted based on recency of the grades.

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 studentId (required) and courseId (optional)

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.Grade.Course",
      "name": "Get",
      "messageId": "ExampleMessageID",
      "interfaceVersion": "1.0"
    },
    "authorization": {
      "type": "BearerToken",
      "token": "ExampleBearerToken"
    },
    "payload": {
      "paginationContext": {
        "maxResults": 5,
        "nextToken": "ExampleNextToken"
      },
      "query": {
        "matchAll": {
          "studentId": "1184",
          "courseId": "course_001"
        }
      },
      "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

courseGrades

The results of the query

Array of CourseGrade objects

Yes

The following is an example of GetResponse.

{
  "response": {
    "header": {
      "namespace": "Alexa.Education.Grade.Course",
      "name": "GetResponse",
      "messageId": "ExampleMessageID",
      "interfaceVersion": "1.0"
    },
    "payload": {
      "paginationContext": {
        "totalCount": 1
      },
      "courseGrades": [
        {
          "courseId": "course_001",
          "courseName": "UFO 101",
          "studentId": "student_001",
          "grade": {
            "overallGrade": {
              "gradeScore": {
                "type": "PERCENTAGE",
                "score": 90
              }
            },
            "standardGrades": [
              {
                "name": "Demonstrate understanding of key details in a text.",
                "gradeScore": {
                  "type": "POINTS",
                  "score": 3,
                  "maxPoints": 4
                }
              },
              {
                "name": "Recount stories and determine their central message, lesson, or moral.",
                "gradeScore": {
                  "type": "POINTS",
                  "score": 4,
                  "maxPoints": 4
                }
              }
            ]
          },
          "lastGradedTime": "2019-04-12T00:00:00Z"
        }
      ]
    }
  }
}