toloka.client.TolokaClient.create_user_bonus
| Source code
Issues a bonus payment to a Toloker.
You can send a maximum of 10,000 requests of this kind per day.
Parameters | Type | Description |
---|---|---|
user_bonus | UserBonus | The bonus. |
operation_id | Optional[UUID] | The UUID of the operation that conforms to the RFC4122 standard. The UUID is used if Specify UUID to avoid accidental errors like Toloka operation duplication caused by network problems. If you send several requests with the same |
async_mode | Optional[bool] | Request processing mode:
Default value: |
Returns:
Created bonus.
Return type:
Examples:
Issuing a bonus to a Toloker with a message in 2 languages.
from decimal import Decimalnew_bonus = toloka_client.create_user_bonus( toloka.client.UserBonus( user_id='fac97860c7929add8048ed2ef63b66fd', amount=Decimal('0.50'), public_title={ 'EN': 'Perfect job!', 'RU': 'Прекрасная работа!', }, public_message={ 'EN': 'You are the best!', 'RU': 'Молодец!', }, assignment_id='00001092da--61ef030400c684132d0da0de' ))
Last updated: August 28, 2023