amazonka-mechanicalturk-2.0: Amazon Mechanical Turk SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.MechanicalTurk.ApproveAssignment

Description

The ApproveAssignment operation approves the results of a completed assignment.

Approving an assignment initiates two payments from the Requester's Amazon.com account

  • The Worker who submitted the results is paid the reward specified in the HIT.
  • Amazon Mechanical Turk fees are debited.

If the Requester's account does not have adequate funds for these payments, the call to ApproveAssignment returns an exception, and the approval is not processed. You can include an optional feedback message with the approval, which the Worker can see in the Status section of the web site.

You can also call this operation for assignments that were previous rejected and approve them by explicitly overriding the previous rejection. This only works on rejected assignments that were submitted within the previous 30 days and only if the assignment's related HIT has not been deleted.

Synopsis

Creating a Request

data ApproveAssignment Source #

See: newApproveAssignment smart constructor.

Constructors

ApproveAssignment' 

Fields

  • overrideRejection :: Maybe Bool

    A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to False.

  • requesterFeedback :: Maybe Text

    A message for the Worker, which the Worker can see in the Status section of the web site.

  • assignmentId :: Text

    The ID of the assignment. The assignment must correspond to a HIT created by the Requester.

Instances

Instances details
ToJSON ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

ToHeaders ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

ToPath ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

ToQuery ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

AWSRequest ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Associated Types

type AWSResponse ApproveAssignment #

Generic ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Associated Types

type Rep ApproveAssignment :: Type -> Type #

Read ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Show ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

NFData ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Methods

rnf :: ApproveAssignment -> () #

Eq ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Hashable ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

type AWSResponse ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

type Rep ApproveAssignment Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

type Rep ApproveAssignment = D1 ('MetaData "ApproveAssignment" "Amazonka.MechanicalTurk.ApproveAssignment" "amazonka-mechanicalturk-2.0-7Thix2UjvlJINPIH68shk3" 'False) (C1 ('MetaCons "ApproveAssignment'" 'PrefixI 'True) (S1 ('MetaSel ('Just "overrideRejection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "requesterFeedback") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "assignmentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newApproveAssignment Source #

Create a value of ApproveAssignment with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:overrideRejection:ApproveAssignment', approveAssignment_overrideRejection - A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to False.

ApproveAssignment, approveAssignment_requesterFeedback - A message for the Worker, which the Worker can see in the Status section of the web site.

ApproveAssignment, approveAssignment_assignmentId - The ID of the assignment. The assignment must correspond to a HIT created by the Requester.

Request Lenses

approveAssignment_overrideRejection :: Lens' ApproveAssignment (Maybe Bool) Source #

A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to False.

approveAssignment_requesterFeedback :: Lens' ApproveAssignment (Maybe Text) Source #

A message for the Worker, which the Worker can see in the Status section of the web site.

approveAssignment_assignmentId :: Lens' ApproveAssignment Text Source #

The ID of the assignment. The assignment must correspond to a HIT created by the Requester.

Destructuring the Response

data ApproveAssignmentResponse Source #

See: newApproveAssignmentResponse smart constructor.

Constructors

ApproveAssignmentResponse' 

Fields

Instances

Instances details
Generic ApproveAssignmentResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Associated Types

type Rep ApproveAssignmentResponse :: Type -> Type #

Read ApproveAssignmentResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Show ApproveAssignmentResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

NFData ApproveAssignmentResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

Eq ApproveAssignmentResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

type Rep ApproveAssignmentResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.ApproveAssignment

type Rep ApproveAssignmentResponse = D1 ('MetaData "ApproveAssignmentResponse" "Amazonka.MechanicalTurk.ApproveAssignment" "amazonka-mechanicalturk-2.0-7Thix2UjvlJINPIH68shk3" 'False) (C1 ('MetaCons "ApproveAssignmentResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newApproveAssignmentResponse Source #

Create a value of ApproveAssignmentResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:ApproveAssignmentResponse', approveAssignmentResponse_httpStatus - The response's http status code.

Response Lenses