# Data-chain Base URI

## Base URI

The URI below is the NFT Collection's baseURI generated from the data chain. The {schemaCode} is the code from the schema that was created.

Testnet endpoint

```bash
# Base URI for testnet
https://six-data-chain-backend-api-gateway-7kl45r91.ts.gateway.dev/api/nft/metadata/schema_code}/{tokenId}

#for example
# https://six-data-chain-backend-api-gateway-7kl45r91.ts.gateway.dev/api/nft/metadata/six_rocket_ticket/1
```

Mainnet endpoint

```bash
# Base URI for mainnet
https://six-data-chain-backend-backend-api-sixnet-gateway-3hi29er0.an.gateway.dev/api/nft/metadata/{schema_code}/{tokenId}

#for example
#https://six-data-chain-backend-backend-api-sixnet-gateway-3hi29er0.an.gateway.dev/api/nft/metadata/six_rocket_ticket/1
```

## OpenSea Metadata Standard (example)

```json
{
  image: "https://ipfs.io/ipfs/QmWzf4885QfDquiPra4CdWz15Wys761jfPrfNNNaQTXtmw/1.png",
  name: "NFT #01",
  description: "This is a description for this NFT series.",
  attributes: [
    {
      trait_type: "Background",
      value: "Red"
    },
    {
      trait_type: "Moon",
      value: "Moon 2"
    },
    {
      trait_type: "Plate",
      value: "Plate 1"
    },
    {
      trait_type: "Tail",
      value: "Tail 2"
    },
    {
      trait_type: "Whale",
      value: "Whale 2"
    }
  ]
}

```

## Error Codes

```typescript
REQUEST_SUCCESS: "V:0001",
INVALID_REQUEST: "V:0099",
DATABASE_ERROR: "V:0103",
MAP_SCHEMA_ERROR:"V:0104", // fail to map schema (schema and nft data not match) 
GET_NFT_DATA_CHAIN_ERROR:"V:0105", // get nft data from chain error
CALL_BASE_URI_IN_SCHEMA_FAIL:"V:0106", // incase call in schema base uri or token uri fail 
```


---

# 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://sixnetwork.gitbook.io/nft-gen-2-tech-doc/data-chain-base-uri.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.
