GetBonusPayments

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

The following example of a call to the GetBonusPayments operation retrieves all bonus payments associated with a given HIT.

http://mechanicalturk.amazonaws.com/onca/xml?Service=AWSMechanicalTurkRequester
&AWSAccessKeyId=[the Requester's Access Key ID]
&Version=2006-10-31
&Operation=GetBonusPayments
&Signature=[signature for this request]
&Timestamp=[your system's local time]
&HITId=123RVWYBAZW00EXAMPLE

A request to the Mechanical Turk Service includes parameters that control its behavior and the data it returns. Required parameters must be included for the request to succeed.

GetBonusPayments accepts parameters common to all operations. Some common parameters are required. See Common Parameters for more information.

The following parameters are specific to the GetBonusPayments operation:

NameDescriptionTypeValue
Operation

The operation you would like to call. To access the GetBonusPayments operation, set the Operation parameter to GetBonusPayments.

Required

GetBonusPayments

HITId

The ID of the HIT associated with the bonus payments to retrieve. If specified, all bonus payments for all assignments for the given HIT will be returned.

Either HITId or AssignmentId must be specified.

Optional

A valid HIT ID

AssignmentId

The ID of the assignment associated with the bonus payments to retrieve. If specified, only bonus payments for the given assignment will be returned.

Either HITId or AssignmentId must be specified.

Optional

A valid assignment ID

PageSize

The number of bouns payments to include in a "page" of results. The complete result set is divided into pages of this many bonus payments.

PageSize must be a number between 1 and 100. If the PageSize parameter is not specified, a default size of 10 elements is used.

Optional

A positive integer

PageNumber

The page of results to return. Once the list of bonus payments has been divided into pages of size PageSize, the page corresponding to PageNumber is returned as the results of the operation.

If the PageNumber parameter is not specified, a default page number of 1 will be used.

Optional

A positive integer

A successful request for the GetBonusPayments operation will have a GetBonusPaymentsResult element in the response.

The GetBonusPaymentsResult element contains the following elements:

NameDescriptionValue
PageNumber

The page of results to return. Once the list of bonus payments has been divided into pages of size PageSize, the page corresponding to PageNumber is returned as the results of the operation.

If the PageNumber parameter is not specified, a default page number of 1 will be used.

A positive integer

NumResults

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.

A non-negative integer

TotalNumResults

The total number of bonus payments in the filtered results list based on this call.

A non-negative integer

BonusPayment

A bonus payment. The response will include one BonusPayment element for each bonus payment returned by the query.

A BonusPayment data structure. See below.

Each BonusPayment is a data structure with the following elements:

NameDescriptionValue
WorkerId

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

A valid Worker ID

BonusAmount

The amount of the bonus payment.

A Price data structure

AssignmentId

The ID of the assignment associated with this bonus payment

A valid assignment ID

Reason

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

A string

GrantTime

The date and time of when the bonus was granted.

A dateTime in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59Z