# GraphQL API

A  GraphQL API including a query UI is available at <https://q.instamint.network>. Currently, the service searches through staging data only and will point to production data soon.

### Asset Query & Schema

{% code overflow="wrap" lineNumbers="true" %}

```graphql
type asset {
    xref: String 
    instamint_asset_hashid: String 
    algorand_assetid: Int 
    explorerurl: String 
    created_at: String 
    mint_completed_status: Boolean 
    mint_requestjson: String 
    senderpk: String 
    clawbackpk: String 
    managerpk: String 
    freezepk: String 
    asset_name: String 
    unit_name: String 
    default_frozen: Boolean 
    total: String 
    parties: party
}

type party {
    owner: String 
    client: String 
    custodian: String 
    issuer: String
}

type Query {
    allAssets: [asset] asset(hashid: String): asset
}
```

{% endcode %}

Sample Query

The following sample query illustrates how GraphQL can be used to query asset data. The below query looks up an asset with hash ID a0517...2195/

{% code title="Query" overflow="wrap" lineNumbers="true" %}

```graphql
query sampleQuery {
  asset(hashid:"4cddb4593e5d6a4ecd38bf86bb00e24fdd419cdbd27903b3b939dab10e60da0c") {
    mint_completed_status
    explorerurl
    xref
    algorand_assetid
  }
}

```

{% endcode %}

{% code title="Results" overflow="wrap" lineNumbers="true" %}

```graphql
{
  "data": {
    "asset": {
      "mint_completed_status": true,
      "explorerurl": "https://testnet.algoexplorer.io/tx/BREN32FCVNV6UBT3ZEGNADHVIFDYY5K22V2AFVYZCQHRJMBLEPSQ",
      "xref": "invoice323",
      "algorand_assetid": 111900776
    }
  }
}
```

{% endcode %}

Access to the GraphQL is available via API or user interfaces, as demonstrated below

<figure><img src="/files/unnVZjqhYwqQNx8SDyBa" alt=""><figcaption><p>GraphQL access via UI at https://q.instamint.network</p></figcaption></figure>

<figure><img src="/files/HLPyIYoNa1Df4atz37mI" alt=""><figcaption><p>GraphQL access via Postman / CURL</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scifn.com/instamint/graphql-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
