create_user_bonus

toloka.client.TolokaClient.create_user_bonus | Source code

Issues payments directly to a Toloker.

You can send a maximum of 10,000 requests of this kind per day.

Parameters Description

ParametersTypeDescription
user_bonusUserBonus

To whom, how much to pay and for what.

operation_idOptional[UUID]

Operation ID. If asynchronous creation is used, by this identifier you can later get results of creating bonuses.

skip_invalid_itemsOptional[bool]

Validation parameters of objects:

  • True — Award a bonus if the object with bonus information passed validation. Otherwise, skip the bonus.
  • False — Default behavior. Stop the operation and don't award bonuses if at least one object didn't pass validation.

Examples:

Create bonus for specific assignment.

import decimal
new_bonus = toloka_client.create_user_bonus(
UserBonus(
user_id='1',
amount=decimal.Decimal('0.50'),
public_title={
'EN': 'Perfect job!',
'RU': 'Прекрасная работа!',
},
public_message={
'EN': 'You are the best!',
'RU': 'Молодец!',
},
assignment_id='012345'
)
)
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming