The Price data structure represents an amount of money in a given currency.
The Price data structure is used as a parameter for the following operations:
In a call to CreateHIT, the Amount and CurrencyCode elements must be specified. FormattedPrice is only used in responses sent by the service.
The Price data structure is used in the HIT data structure.
Example: CreateHIT
The following example of a Price data structure could be passed in to a call to CreateHIT. CreateHIT accepts parameters that describe the HIT being created, including the reward the Worker will be paid for completing the HIT successfully. For CreateHIT, the parameter name is Reward, and the value is a Price data structure.
In a SOAP request, the Price data structure is specified as the Reward parameter in XML:
<Reward> <Amount>32</Amount> <CurrencyCode>USD</CurrencyCode> </Reward>
In a REST request, the components of the Price data structure are specified as separate parameters:
http://mechanicalturk.amazonaws.com/onca/xml?Service=AWSMechanicalTurkRequester
[...]
&Reward.1.Amount=32
&Reward.1.CurrencyCode=USD
The Price structure may contain the following elements.
| Name | Description | Value |
|---|---|---|
| Amount |
The amount of money, as a number. The amount is in the currency specified by the CurrencyCode. For example, with a CurrencyCode of USD, the amount will be in United States dollars (e.g. 12.75 is $12.75 US). |
A number |
| CurrencyCode |
A code that represents the country and units of the currency. Its value is an ISO 4217 currency code, such as USD for United States dollars. Currently, only USD is supported. |
An ISO 4217 currency code, such as USD |
| FormattedPrice |
A textual representation of the price, using symbols and formatting appropriate for the currency. Symbols are represented using the Unicode character set. You do not need to specify FormattedPrice in a request. It is only provided by the service in responses, as a convenience to your application. |
A string |