Get a list of bonuses awarded

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

Request

GET api/v1/user-bonuses ?
  user_id=<id пользователя>
& [private_comment=<comment for the requester>]
& [limit=<maximum number of results in the response>]
& [sort=<fields to sort by>]
& [id_gt=<bonus ID>]
& [id_gte=<bonus ID>]
& [id_lt=<bonus ID>]
& [id_lte=<bonus ID>]
& [created_gt=<date>]
& [created_gte=<date>]
& [created_lt=<date>]
& [created_lte=<date>]

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

Parameter

Description

Data type

Required

user_id

User ID.

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 — Bonus ID.

  • created — Date the bonus was awarded, 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

Bonuses with an ID greater than the specified value.

String

No

id_gte

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

String

No

id_lt

Bonuses with an ID less than the specified value.

String

No

id_lte

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

String

No

created_gt

Bonuses 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

Bonuses 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

Bonuses 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

Bonuses 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 bonuses in parts (for example, 10 bonuses at a time), use a combination of parameters in requests:

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

Response

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