Real Items API
  • Welcome
  • Account
    • Subscribe to a plan
    • Access your account
    • Get your API key
    • Manage your subscription
  • Resources
    • Postman documentation
    • Quotas and rate limits
  • Quick Start
    • Introduction
    • Fork the Real Items API
    • Your Polygon contracts
    • Mint your first Item
  • Examples
    • Item Viewer
Powered by GitBook
On this page
  • addItem
  • getItem
  1. Quick Start

Mint your first Item

PreviousYour Polygon contractsNextItem Viewer

Last updated 2 years ago

Make sure that you have your testnet contract ID.

addItem

The addItem mutation mints a new Item on the contract specified by contractId. Since we are using your testnet contract, the Item will be minted on the Polygon Mumbai network.

Navigate to the addItem mutation and click on the Body tab.

In the GRAPHQL VARIABLES section, set the values for contractId, batchId, and metadata.

  • contractId: Use the testnet contract ID that you copied in the previous section.

  • batchId: Any string value.

  • metadata: A stringified JSON object.

Keep metadataId: null as is. See the example below.

Click the Send button. The response section should populate shortly after.

If addItem.body.status is "dispatched to forge", that means that your request to mint an Item has been received and should be processed soon.

The amount of time it takes to mint an Item depends on the current network conditions. It can range from a few seconds, 10-30 seconds, and sometimes even a few minutes.

From the response, copy the itemId. We will use this in the next section.

getItem

To check on the status of the Item, navigate to the getItem query, then click the Body tab. Update the itemId in the GRAPHQL VARIABLES section with the itemId you copied in addItem.

If your Item has been minted, getItem.body.status should have the value "succeeded".

You successfully minted an Item. Great job!

You can find detailed information about individual API functions, examples, and more in the Real Items API Postman collection: Postman documentation

Get your testnet contract ID