list_bonus_payments

list_bonus_payments(**kwargs)

The ListBonusPayments operation retrieves the amounts of bonuses you have paid to Workers for a given HIT or assignment.

See also: AWS API Documentation

Request Syntax

response = client.list_bonus_payments(
    HITId='string',
    AssignmentId='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • HITId (string) -- The ID of the HIT associated with the bonus payments to retrieve. If not specified, all bonus payments for all assignments for the given HIT are returned. Either the HITId parameter or the AssignmentId parameter must be specified
  • AssignmentId (string) -- The ID of the assignment associated with the bonus payments to retrieve. If specified, only bonus payments for the given assignment are returned. Either the HITId parameter or the AssignmentId parameter must be specified
  • NextToken (string) -- Pagination token
  • MaxResults (integer) --
Return type

dict

Returns

Response Syntax

{
    'NumResults': 123,
    'NextToken': 'string',
    'BonusPayments': [
        {
            'WorkerId': 'string',
            'BonusAmount': 'string',
            'AssignmentId': 'string',
            'Reason': 'string',
            'GrantTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • NumResults (integer) --

      The number of bonus payments on this page in the filtered results list, equivalent to the number of bonus payments being returned by this call.

    • NextToken (string) --

      If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.

    • BonusPayments (list) --

      A successful request to the ListBonusPayments operation returns a list of BonusPayment objects.

      • (dict) --

        An object representing a Bonus payment paid to a Worker.

        • WorkerId (string) --

          The ID of the Worker to whom the bonus was paid.

        • BonusAmount (string) --

          A string representing a currency amount.

        • AssignmentId (string) --

          The ID of the assignment associated with this bonus payment.

        • Reason (string) --

          The Reason text given when the bonus was granted, if any.

        • GrantTime (datetime) --

          The date and time of when the bonus was granted.

Exceptions

  • MTurk.Client.exceptions.ServiceFault
  • MTurk.Client.exceptions.RequestError