You are browsing the documentation for a deprecated version ('2014-08-15') of the Amazon Mechanical Turk Requester API. This version of the API will be deprecated and will be rendered unusable as of June 1st, 2019. If you request against a legacy API version (https://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI-legacy/Welcome.html) on or after June 1, 2019, you will receive the following response:
The latest version of our API ('2017-01-17') provides you with additional tool choices and enables you to select from nine AWS Software Development Kits This version also updates naming conventions used in the API and adopts the AWS standard of Signature Version 4 to authenticate requests securely. The API uses REST requests and no longer requires that developers be familiar with SOAP protocol. These changes make the MTurk API consistent with AWS APIs, simplifying the on-boarding process for both new and existing AWS developers. The legacy MTurk Command Line Tools and .NET, Java, Ruby, and Perl SDKs were marked as deprecated in January 2018. We will be deprecating the legacy APIs as of June 1, 2019. If you are on a legacy API, you must migrate to the latest
version of our API. You can find documentation for the latest API here and the AWS SDKs here For support, contact requestor-apilegacydeprecation-support@amazon.com |
GrantBonus
Description
The GrantBonus
operation issues a payment of money from your
account to a Worker. This payment happens separately from the reward you pay to the
Worker when you approve the Worker's assignment.
The GrantBonus
operation requires the Worker's ID and the
assignment ID as parameters to initiate payment of the bonus.
You must include a message that explains the reason for the bonus payment, as the Worker may not be expecting the payment.
Amazon Mechanical Turk collects a fee for bonus payments, similar to the HIT listing fee. This operation fails if your account does not have enough funds to pay for both the bonus and the fees.
For information about Amazon Mechanical Turk pricing and fee amounts, see Amazon Mechanical Turk Pricing
Request Parameters
The GrantBonus
operation accepts parameters common to all
operations. Some common parameters are required. See Common Parameters for more information.
The following parameters are specific to the GrantBonus
operation:
Name | Description | Required |
---|---|---|
|
The name of the operation Type: String Valid Values: GrantBonus Default: None |
Yes |
|
The ID of the Worker being paid the bonus, as returned in the assignment data of the GetAssignmentsForHIT operation. Type: String Default: None |
Yes |
|
The ID of the assignment for which this bonus is paid, as returned in the assignment data of the GetAssignmentsForHIT operation. Type: String Default: None |
Yes |
|
The bonus amount to pay. Type: Price data structure Default: None |
Yes |
|
A message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message. Type: String Default: None |
Yes |
|
A unique identifier for this request, which allows you to retry the call on error
without granting multiple bonuses. This is useful in cases such as
network timeouts where it is unclear whether or not the call
succeeded on the server. If the bonus already exists in the
system from a previous call using the same
Type: String Default: None Constraints: must not be longer than 64 characters in length. Note: It is your responsibility to ensure uniqueness of the token. The unique token
expires after 24 hours. Subsequent calls using the same
|
No |
Response Elements
A successful request for the GrantBonus
operation returns with
no errors. The response includes the elements described in the following table. The
operation returns no other data.
Name | Description |
---|---|
|
Contains a |
Examples
The following example shows how to use the GrantBonus
operation.
Sample Request
The following example of a call to the GrantBonus
operation pays a bonus of $5 to a Worker.
https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester &AWSAccessKeyId=
[the Requester's Access Key ID]
&Version=2017-01-17 &Operation=GrantBonus &Signature=[signature for this request]
&Timestamp=[your system's local time]
&WorkerId=AZ3456EXAMPLE &AssignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE &BonusAmount.1.Amount=5 &BonusAmount.1.CurrencyCode=USD &Reason=Thanks%20for%20doing%20great%20work!
Sample Response
The following is an example response.
<GrantBonusResult> <Request> <IsValid>True</IsValid> </Request> </GrantBonusResult>