2.0 Notification object

The notification object informs the client of a situation or event that has occurred.

The primary property of a notification is its type, which identifies the event. The other two properties (message and explanation) contain the text that can be presented to the user. These are provided as a convenience, since the client should be able to produce the text itself, based on the type property. The message and explanation texts are provided in the language of the user.

Example

{
  "timestamp": "2015-06-12T07:16:23Z",
  "type": "FULL_PROFICIENCY",
  "message": "100% reached!",
  "explanation": {
    "text": "Well done! You have reached full proficiency for this drill.",
    "markup": [{
      "type": "bold",
      "offset": 0,
      "length": 10
    }]
  }
}

Fields

Field Type Description
timestamp
optional
Timestamp The date the event was generated. Example value: 2010-03-12T15:47:31.123Z
type
required
String Uniquely identifies the type of the notification.

The following events may be communicated by the API:

  • FIRST_AUDIO_QUESTION
  • FIRST_INCORRECT_ANSWER
  • FIRST_INCORRECT_SET_ANSWER
  • FIRST_INTRO
  • FIRST_MC_SEQUENCE_QUESTION
  • FIRST_MC_SET_QUESTION
  • FIRST_MULTIPLE_CHOICE_QUESTION
  • FIRST_OPEN_ENDED_QUESTION
  • FIRST_REPEATING_QUESTION
  • FULL_PROFICIENCY
  • HALF_WAY
  • INITIAL_TRIAL_WARNING
  • LIMITED_SIZE_TRIAL_WARNING
  • OBJECTIVE_MET
  • TEST_COMPLETED
  • TRIAL_STARTED
message
required
String The message describing the event of this notification, in the user's language.

Example value: You perfectly master this drill now.
explanation
required
2.0 MarkupText object An additional, more detailed description of the notification, in the user's language, with optional markup.
icon
optional
2.0 Media object An optional icon to represent the notification.
properties
optional
List of 2.0 Property objects An optional list of general purpose key/value pairs.