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 Name

Field

Order

Description

creationDate

creationDate

descending

This 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 Name

Type

Example(s)

Description

awardId

Integer

134

This is the AwardType identifier.

name

String

Good Question

This is the name of a given award.

description

String

Question voted up 5 times

This is the human readable description provided for why the system gave an award.

active

Boolean

true

This boolean flag marks whether an award is active or not. If true an award is active, if false it is not.

level

gold,silver, or bronze

gold

This 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 Name

Type

Example(s)

Description

userId

ID: Integer (64 bits)

13

This is the integer (digit) formatted identifier of a user.

count

Integer (64 bits)

12

This integer represents the number of times a user has received a given AwardType.

username

String

james007

This is the assigned username of a user.

realname

String

James Bond

This is the real name of the user.

slug

String

james-bond

This is a slug representation of a given user's real name.

gold

Integer

0

This is the number of awards of Gold rank given to a specific user.

silver

Integer

1

This is the number of awards of Silver rank given to a specific user.

bronze

Integer

3

This is the number of awards of Bronze rank given to a specific user.

reputation

Integer

1

This is the number of reputation points the system has awarded a specific user.

mostRecentAward

Timestamp

1405555272

This 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).

superUserGroupCount

Integer (64bits)

1

This is a count of the number of groups with Super User permissions a given user belongs to.

moderatorGroupCount

Integer (64bits)

1

This is the number of groups with Moderator permissions a given user belongs to.