Award-related REST APIs

The ability to award users for their interactions with your site is an important part of the AnswerHub user experience, helping you keep users involved in the content creation, discussion, and even moderation processes. We designed this section to guide you in creating API requests that involve awards.

Documentation Related to Awards

Award Sorting Criteria

Currently, the retrieve awards list request only supports a single sorting criteria.

Criteria NameFieldOrderDescription
creationDatecreationDatedescendingThis parameter sorts the requested information from the most to least recently created.

AwardType Data Model

Field Summary

This table summarizes the fields supported by the AwardType type if used in an API request:

Field NameTypeExample(s)Description
awardIdInteger134This is the AwardType identifier.
nameStringGood QuestionThis is the name of a given award.
descriptionStringQuestion voted up 5 timesThis is the human readable description provided for why the system gave an award.
activeBooleantrueThis boolean flag marks whether an award is active or not. If true an award is active, if false it is not.
levelgold,silver, or bronzegoldThis is the level of award given to a user.

AwardedUser Data Model

Field Summary

This table summarizes the fields supported by the AwardedUser type if used in an API request:

Field NameTypeExample(s)Description
userIdID: Integer (64 bits)13This is the integer (digit) formatted identifier of a user.
countInteger (64 bits)12This integer represents the number of times a user has received a given AwardType.
usernameStringjames007This is the assigned username of a user.
realnameStringJames BondThis is the real name of the user.
slugStringjames-bondThis is a slug representation of a given user's real name.
goldInteger0This is the number of awards of Gold rank given to a specific user.
silverInteger1This is the number of awards of Silver rank given to a specific user.
bronzeInteger3This is the number of awards of Bronze rank given to a specific user.
reputationInteger1This is the number of reputation points the system has awarded a specific user.
mostRecentAwardTimestamp1405555272This is the timestamp formatted date and time of the most recently received award (presented as the number of milliseconds since the system gave the award).
superUserGroupCountInteger (64bits)1This is a count of the number of groups with Super User permissions a given user belongs to.
moderatorGroupCountInteger (64bits)1This is the number of groups with Moderator permissions a given user belongs to.