Get a list of rewards issued

To get a list of rewards issued, send a GET request to the /user-bonuses resource.

Request

GET api/v1/user-bonuses ?
  user_id=<user ID>
& [assignment_id=<ID of the performer's response to the task>]
& [private_comment=<comment for the requester>]
& [limit=<maximum number of results in the response>]
& [sort=<sort fields>]
& [id_gt=<reward ID>]
& [id_gte=<reward ID>]
& [id_lt=<reward ID>]
& [id_lte=<reward ID>]
& [created_gt=<date>]
& [created_gte=<date>]
& [created_lt=<date>]
& [created_lte=<date>]

Host: https://sandbox.toloka.yandex.com
Authorization: OAuth <OAuth token>
Request parameters

Parameter

Overview

Data type

Required

user_id

User ID.

String

No

assignment_id

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

String

No

private_comment

Comments for the requester.

String

No

limit

Limit on the number of results to return. By default — 50; maximum — 300.

Number

No

sort

Parameters for sorting in ascending order:

  • id — Reward ID.

  • created — Date the reward was issued, in UTC in the format YYYY-MM-DD.

You can separate parameters with a comma.

To change the sorting direction to descending, add the minus sign before the parameter. For example, sort=-id.

String

No

id_gt

Rewards with an ID greater than the specified value.

String

No

id_gte

Rewards with an ID greater than or equal to the specified value.

String

No

id_lt

Rewards with an ID less than the specified value.

String

No

id_lte

Rewards with an ID less than or equal to the specified value.

String

No

created_gt

Rewards awarded after the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_gte

Rewards awarded after or on the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_lt

Rewards awarded before the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_lte

Rewards awarded before or on the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

Parameter

Overview

Data type

Required

user_id

User ID.

String

No

assignment_id

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

String

No

private_comment

Comments for the requester.

String

No

limit

Limit on the number of results to return. By default — 50; maximum — 300.

Number

No

sort

Parameters for sorting in ascending order:

  • id — Reward ID.

  • created — Date the reward was issued, in UTC in the format YYYY-MM-DD.

You can separate parameters with a comma.

To change the sorting direction to descending, add the minus sign before the parameter. For example, sort=-id.

String

No

id_gt

Rewards with an ID greater than the specified value.

String

No

id_gte

Rewards with an ID greater than or equal to the specified value.

String

No

id_lt

Rewards with an ID less than the specified value.

String

No

id_lte

Rewards with an ID less than or equal to the specified value.

String

No

created_gt

Rewards awarded after the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_gte

Rewards awarded after or on the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_lt

Rewards awarded before the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_lte

Rewards awarded before or on the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

To get the list of rewards in parts (for example, 10 rewards at a time), use a combination of parameters in requests:

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

Response

Contains information about rewards in the items array:
{"items" : [{reward 1}, {reward 2}, ... {reward n}], "has_more": true}