redeemEarnableItem

[Authenticated] This mutation allows users to claim a specific NFT by passing the wallet address and a valid item id for the NFT contract that is configured with a Mint Portal in the Mojito system. The NFT contract must be set up to allow minting of NFTs through the Mint Portal. The user does not need to provide a claim code to claim the NFT.This V2 mutation is created to return invoiceID as reference to know the current status of the transaction

Sample query

mutation redeemEarnableItem(
  $claimableItemId: UUID1!
  $destAddr: String
  $gating: GateInput
) {
  redeemEarnableItem(
    claimableItemId: $claimableItemId
    destAddr: $destAddr
    gating: $gating
  ) {
    redeemInitiated
    invoiceID
  }
}

Sample variable

{
  "claimableItemId": "83f6385c-17a3-45fd-a18b-7992e3878198",
  "destAddr": "0x35C26722c5E89b4E4086c37EECf64584bf4821D6",
   "gating": {
    "ruleId": "784f7822-4a13-4cb1-9c2a-3af074e82e10",
    "contractAddress": "0x12591b90d5634e93732a15ba3391d34834f78bd9",
    "tokenId": "1",
    "ownerWallet": "0xaDE04b0544e25A8C23f0a57aE0b61caC8B5bfd11"
  }
}

Sample response

{
  "data": {
    "redeemEarnableItem": {
      "redeemInitiated": true,
      "invoiceID": "93a5ae57-93da-4555-b082-477fc777f435"
    }
  }
}

Arguments

NameTypeDescriptionRequired
claimableItemIdUUIDUnique ID of the Claimable Item for No code claimYes
destAddrStringEVM Compatible Wallet AddressYes
gatingObjectThe gating information to apply to redeem if eligible.No

Fields

NameTypeDescription
redeemInitiatedBooleanProvides status either in true or false for the claimable request
invoiceIDUUID1Provides the invoice ID as a reference