Toloka documentation

Get a list of rewards issued

Warning

We recommend that you use the toloka.dev domain for API requests. The toloka.yandex.com domain is still supported but it will be deprecated soon.

Gets a list of rewards issued.

Request

GET https://toloka.dev/api/v1/user-bonuses
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.dev/api/v1/user-bonuses
Authorization: OAuth <OAuth token>

Headers

Title Overview
Authorization A token for account authorization. Add OAuth as a prefix.

Query parameters

Specified in the link after the question mark; separated by &.

Parameter

Overview

user_id

string

Toloker ID.

assignment_id

string

ID of the Toloker's response to the task a reward is issued for.

private_comment

string

Comments that are only visible to the requester.

sort

string

Parameters to sort by:

  • id — Reward ID.
  • created — The date when the reward was awarded, in UTC using ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

To learn how to configure sorting, see Sorting the list of objects.

Standard query parameters

limit, id_gt, id_gte, id_lt, id_lte, created_gt, created_gte, created_lt, created_lte.

Query example

You can set up the display of the list of rewards in parts (for example, 10 rewards at a time):

  1. Show the first 10 rewards, starting with the one with the lowest ID.
  2. Show the remaining rewards (10 at a time) in ascending order.

Show the first 10 rewards

GET https://toloka.dev/api/v1/user-bonuses?sort=id&limit=10
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.dev/api/v1/user-bonuses?sort=id&limit=10
Authorization: OAuth <OAuth token>

Show the remaining tasks sorted by ascending ID

GET https://toloka.dev/api/v1/user-bonuses?sort=id&limit=10&id_gt=<ID of the last bonus from the previous response>
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.dev/api/v1/user-bonuses?sort=id&limit=10&id_gt=<ID of the last bonus from the previous response>
Authorization: OAuth <OAuth token>

Response

Information about rewards in the items array:

{"items" : [{bonus #1}, {bonus #2}, ... {bonus #n}], "has_more": true}