Skip to content

Achievements POST API for Custom Activities

Aishwarya Lakshminarasimhan edited this page Sep 25, 2019 · 1 revision

Implementing Achievements POST API

Achievements supports the creation of custom activities, these custom activities expose an API which can be implemented by the user in order to create user generated activities.

Achievements POST API -

Achievements POST API


POST Request Body -

{
  "userToken": "KSpZF", 
  "editable": { "0": "Editable block contents" },
  "hidden": { "0": "Hidden block contents" },
  "shown": { "0": "Shown block contents" }
}
Parameter Type Description
userToken String 5 Character unique user specific code
editable Object Editable Block contents by Block id. Both key and value are Strings
hidden Object Hidden Block contents by Block id. Both key and value are Strings
shown Object Shown Block contents by Block id. Both key and value are Strings

POST Response Body -

{
  "isComplete": false,
  "jsonFeedback": { "key": "value" },
  "htmlFeedback": "<div>Hey</div>",
  "textFeedback": "Hey"
}
Parameter Type Description
isComplete Boolean true upon successful completion and false otherwise
jsonFeedback Object Contains the execution feedback in a json format
htmlFeedback String Contains the execution feedback as a String in HTML format
textFeedback String Contains the execution feedback as text