Niftory GraphQL API Reference

Launch your NFT experience. Learn more at niftory.com!

Contact

Niftory Engineering

support@niftory.com

API Endpoints
https://api.niftory.com/v1/graphql

Developer Documentation

Detailed API documentation is available at docs.niftory.com.

Queries

app

Description

Gets the App for the current application context. Read more here.

Response

Returns an App

Example

Query
query app {
  app {
    contract {
      ...ContractFragment
    }
    id
  }
}
Response
{
  "data": {
    "app": {
      "contract": Contract,
      "id": "4"
    }
  }
}

appById

Description

Gets an App by its ID. Read more here.

Response

Returns an App

Arguments
Name Description
id - ID The ID of the App to retrieve. If unspecified, then 'name' must be specified.
name - String The name of the App to retrieve. If unspecified, then 'id' must be specified.

Example

Query
query appById(
  $id: ID,
  $name: String
) {
  appById(
    id: $id,
    name: $name
  ) {
    contract {
      ...ContractFragment
    }
    id
  }
}
Variables
{"id": 4, "name": "xyz789"}
Response
{
  "data": {
    "appById": {
      "contract": Contract,
      "id": "4"
    }
  }
}

appUser

Description

Gets the currently logged-in AppUser context. Read more here.

Response

Returns an AppUser

Example

Query
query appUser {
  appUser {
    app {
      ...AppFragment
    }
    createdAt
    email
    id
    image
    name
    primaryWallet {
      ...WalletFragment
    }
    updatedAt
    wallet {
      ...WalletFragment
    }
    wallets {
      ...WalletFragment
    }
  }
}
Response
{
  "data": {
    "appUser": {
      "app": App,
      "createdAt": "2007-12-03T10:15:30Z",
      "email": "test@test.com",
      "id": 4,
      "image": "abc123",
      "name": "xyz789",
      "primaryWallet": Wallet,
      "updatedAt": "2007-12-03T10:15:30Z",
      "wallet": Wallet,
      "wallets": [Wallet]
    }
  }
}

appUserById

Description

Gets an AppUser by its ID. Read more here.

Response

Returns an AppUser

Arguments
Name Description
id - ID! The ID of the AppUser to retrieve.

Example

Query
query appUserById($id: ID!) {
  appUserById(id: $id) {
    app {
      ...AppFragment
    }
    createdAt
    email
    id
    image
    name
    primaryWallet {
      ...WalletFragment
    }
    updatedAt
    wallet {
      ...WalletFragment
    }
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "appUserById": {
      "app": App,
      "createdAt": "2007-12-03T10:15:30Z",
      "email": "test@test.com",
      "id": 4,
      "image": "xyz789",
      "name": "xyz789",
      "primaryWallet": Wallet,
      "updatedAt": "2007-12-03T10:15:30Z",
      "wallet": Wallet,
      "wallets": [Wallet]
    }
  }
}

appUsers

Description

Gets the list of users for your app. Read more here.

Response

Returns an AppUserList

Arguments
Name Description
cursor - String The pagination cursor returned by your last call to appUsers
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.

Example

Query
query appUsers(
  $cursor: String,
  $maxResults: PositiveInt
) {
  appUsers(
    cursor: $cursor,
    maxResults: $maxResults
  ) {
    cursor
    items {
      ...AppUserFragment
    }
  }
}
Variables
{"cursor": "xyz789", "maxResults": 123}
Response
{
  "data": {
    "appUsers": {
      "cursor": "abc123",
      "items": [AppUser]
    }
  }
}

contract

Description

Gets the Contract from the currently authenticated app. Read more here.

Response

Returns a Contract

Example

Query
query contract {
  contract {
    address
    blockchain
    id
    name
  }
}
Response
{
  "data": {
    "contract": {
      "address": "abc123",
      "blockchain": "ETHEREUM",
      "id": "4",
      "name": "xyz789"
    }
  }
}

file

Description

Gets a File by its ID.

Response

Returns a SimpleFile

Arguments
Name Description
id - ID! The database ID of the NFTFile to retrieve.

Example

Query
query file($id: ID!) {
  file(id: $id) {
    contentType
    id
    md5
    name
    state
    url
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "file": {
      "contentType": "xyz789",
      "id": "4",
      "md5": "xyz789",
      "name": "abc123",
      "state": "ERROR",
      "url": "http://www.test.com/"
    }
  }
}

invoices

Description

Gets the list of invoices for your app.

Response

Returns an InvoiceList

Arguments
Name Description
appId - ID The ID of the client app.
cursor - String The pagination cursor returned by your last call to appUsers
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.

Example

Query
query invoices(
  $appId: ID,
  $cursor: String,
  $maxResults: PositiveInt
) {
  invoices(
    appId: $appId,
    cursor: $cursor,
    maxResults: $maxResults
  ) {
    cursor
    items {
      ...InvoiceFragment
    }
  }
}
Variables
{
  "appId": "4",
  "cursor": "abc123",
  "maxResults": 123
}
Response
{
  "data": {
    "invoices": {
      "cursor": "xyz789",
      "items": [Invoice]
    }
  }
}

nft

Description

Gets an NFT by database ID. Read more here.

Response

Returns an NFT

Arguments
Name Description
id - ID! The database ID of the NFT to retrieve.

Example

Query
query nft($id: ID!) {
  nft(id: $id) {
    blockchainId
    blockchainState
    id
    metadata
    model {
      ...NFTModelFragment
    }
    saleState
    serialNumber
    status
    transactions {
      ...BlockchainTransactionFragment
    }
    wallet {
      ...WalletFragment
    }
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "nft": {
      "blockchainId": "xyz789",
      "blockchainState": "ERROR",
      "id": "4",
      "metadata": {},
      "model": NFTModel,
      "saleState": "AVAILABLE",
      "serialNumber": 987,
      "status": "AVAILABLE",
      "transactions": [BlockchainTransaction],
      "wallet": Wallet
    }
  }
}

nftListing

Description

Gets an NFTListing by ID.

Response

Returns an NFTListing

Arguments
Name Description
id - ID! The ID of the NFTListing to retrieve.

Example

Query
query nftListing($id: ID!) {
  nftListing(id: $id) {
    appId
    attributes
    createdAt
    description
    id
    nftModel {
      ...NFTModelFragment
    }
    pricing {
      ...FixedPricingFragment
    }
    state
    title
    updatedAt
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "nftListing": {
      "appId": 4,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "abc123",
      "id": 4,
      "nftModel": NFTModel,
      "pricing": FixedPricing,
      "state": "ACTIVE",
      "title": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

nftListings

Description

Gets NFTListings for the current App context

Response

Returns an NFTListingList

Arguments
Name Description
cursor - String The pagination cursor returned by your last call to NFTListings
filter - NFTListingFilterInput Properties to filter NFTListings by.
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.

Example

Query
query nftListings(
  $cursor: String,
  $filter: NFTListingFilterInput,
  $maxResults: PositiveInt
) {
  nftListings(
    cursor: $cursor,
    filter: $filter,
    maxResults: $maxResults
  ) {
    cursor
    items {
      ...NFTListingFragment
    }
  }
}
Variables
{
  "cursor": "abc123",
  "filter": NFTListingFilterInput,
  "maxResults": 123
}
Response
{
  "data": {
    "nftListings": {
      "cursor": "xyz789",
      "items": [NFTListing]
    }
  }
}

nftModel

Description

Gets an NFTModel by database ID. Read more here.

Response

Returns an NFTModel

Arguments
Name Description
id - ID! The database ID of the NFTModel to retrieve.

Example

Query
query nftModel($id: ID!) {
  nftModel(id: $id) {
    attributes
    blockchainId
    content {
      ...NFTContentFragment
    }
    createdAt
    description
    id
    metadata
    nfts {
      ...NFTFragment
    }
    quantity
    quantityMinted
    rarity
    set {
      ...NFTSetFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "nftModel": {
      "attributes": {},
      "blockchainId": "abc123",
      "content": NFTContent,
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "id": 4,
      "metadata": {},
      "nfts": [NFT],
      "quantity": 123,
      "quantityMinted": 123,
      "rarity": "COMMON",
      "set": NFTSet,
      "state": "COMPLETED",
      "status": "DONE",
      "title": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

nftModels

Description

Gets NFTModels for the current App context. Read more here.

Response

Returns an NFTModelList

Arguments
Name Description
appId - ID The ID of the client app.
cursor - String The pagination cursor returned by your last call to nftModels
filter - NFTModelFilterInput Properties to filter NFTModel's by.
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.

Example

Query
query nftModels(
  $appId: ID,
  $cursor: String,
  $filter: NFTModelFilterInput,
  $maxResults: PositiveInt
) {
  nftModels(
    appId: $appId,
    cursor: $cursor,
    filter: $filter,
    maxResults: $maxResults
  ) {
    cursor
    items {
      ...NFTModelFragment
    }
  }
}
Variables
{
  "appId": 4,
  "cursor": "xyz789",
  "filter": NFTModelFilterInput,
  "maxResults": 123
}
Response
{
  "data": {
    "nftModels": {
      "cursor": "abc123",
      "items": [NFTModel]
    }
  }
}

nfts

Description

Gets NFTs associated with the current AppUser context, including those that are transferring or failed to transfer. Read more here.

Response

Returns an NFTList

Arguments
Name Description
appId - ID The ID of the client app.
cursor - String The pagination cursor returned by your last call to nfts
filter - NFTFilterInput Properties to filter NFT's by.
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.
userId - ID The ID of the AppUser to filter by. Can only be the currently logged in user without privileged token.

Example

Query
query nfts(
  $appId: ID,
  $cursor: String,
  $filter: NFTFilterInput,
  $maxResults: PositiveInt,
  $userId: ID
) {
  nfts(
    appId: $appId,
    cursor: $cursor,
    filter: $filter,
    maxResults: $maxResults,
    userId: $userId
  ) {
    cursor
    items {
      ...NFTFragment
    }
  }
}
Variables
{
  "appId": 4,
  "cursor": "xyz789",
  "filter": NFTFilterInput,
  "maxResults": 123,
  "userId": "4"
}
Response
{
  "data": {
    "nfts": {
      "cursor": "xyz789",
      "items": [NFT]
    }
  }
}

nftsByWallet

Description

Gets NFTs associated with the current wallet, including those that are transferring or failed to transfer. Read more here.

Response

Returns an NFTList

Arguments
Name Description
address - String The address of the Wallet to filter by. This query requires the ID or the Wallet Address.
cursor - String The pagination cursor returned by your last call to nfts
filter - NFTFilterInput Properties to filter NFT's by.
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.
walletId - ID The database ID of the Wallet to filter by. This query requires the ID or the Wallet Address.

Example

Query
query nftsByWallet(
  $address: String,
  $cursor: String,
  $filter: NFTFilterInput,
  $maxResults: PositiveInt,
  $walletId: ID
) {
  nftsByWallet(
    address: $address,
    cursor: $cursor,
    filter: $filter,
    maxResults: $maxResults,
    walletId: $walletId
  ) {
    cursor
    items {
      ...NFTFragment
    }
  }
}
Variables
{
  "address": "abc123",
  "cursor": "xyz789",
  "filter": NFTFilterInput,
  "maxResults": 123,
  "walletId": 4
}
Response
{
  "data": {
    "nftsByWallet": {
      "cursor": "xyz789",
      "items": [NFT]
    }
  }
}

set

Description

Gets an NFTSet by database ID.

Response

Returns an NFTSet

Arguments
Name Description
id - ID! The database ID of the NFTSet to retrieve.

Example

Query
query set($id: ID!) {
  set(id: $id) {
    app {
      ...AppFragment
    }
    attributes
    blockchainId
    createdAt
    id
    image
    metadata
    models {
      ...NFTModelFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "set": {
      "app": App,
      "attributes": {},
      "blockchainId": "xyz789",
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "image": "http://www.test.com/",
      "metadata": {},
      "models": [NFTModel],
      "state": "ERROR",
      "status": "DONE",
      "title": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

sets

Description

Gets NFTSets for the current App context.

Response

Returns [NFTSet]

Arguments
Name Description
filter - NFTSetFilterInput Properties to filter NFTSets by.

Example

Query
query sets($filter: NFTSetFilterInput) {
  sets(filter: $filter) {
    app {
      ...AppFragment
    }
    attributes
    blockchainId
    createdAt
    id
    image
    metadata
    models {
      ...NFTModelFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{"filter": NFTSetFilterInput}
Response
{
  "data": {
    "sets": [
      {
        "app": App,
        "attributes": {},
        "blockchainId": "abc123",
        "createdAt": "2007-12-03T10:15:30Z",
        "id": 4,
        "image": "http://www.test.com/",
        "metadata": {},
        "models": [NFTModel],
        "state": "ERROR",
        "status": "DONE",
        "title": "abc123",
        "updatedAt": "2007-12-03T10:15:30Z"
      }
    ]
  }
}

wallet

Description

Gets the primary Wallet belonging to the current AppUser context. Read more here.

Response

Returns a Wallet

Example

Query
query wallet {
  wallet {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Response
{
  "data": {
    "wallet": {
      "address": "xyz789",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "abc123"
    }
  }
}

walletByAddress

Description

Gets a Wallet by its blockchain address. Wallet must be registered using registerWallet before this request succeeds. Read more here.

Response

Returns a Wallet

Arguments
Name Description
address - String! The address of the Wallet to retrieve.

Example

Query
query walletByAddress($address: String!) {
  walletByAddress(address: $address) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{"address": "abc123"}
Response
{
  "data": {
    "walletByAddress": {
      "address": "abc123",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "abc123"
    }
  }
}

walletById

Description

Gets a Wallet by its database ID. Read more here.

Response

Returns a Wallet

Arguments
Name Description
id - ID! The ID of the Wallet to retrieve.

Example

Query
query walletById($id: ID!) {
  walletById(id: $id) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "walletById": {
      "address": "abc123",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "abc123"
    }
  }
}

walletByUserId

Description

Gets the primary Wallet for a given AppUser. Read more here.

Response

Returns a Wallet

Arguments
Name Description
userId - ID! The ID of the AppUser to retrieve the wallet for.

Example

Query
query walletByUserId($userId: ID!) {
  walletByUserId(userId: $userId) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{"userId": "4"}
Response
{
  "data": {
    "walletByUserId": {
      "address": "xyz789",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "xyz789"
    }
  }
}

wallets

Description

Gets all Wallets for a given app. Read more here.

Response

Returns a WalletList

Arguments
Name Description
appId - ID! The ID of the AppUser to retrieve the wallet for.
cursor - String The pagination cursor returned by your last call to nftModels
maxResults - PositiveInt The maximum number of results to return. Defaults to 50, max is 100.

Example

Query
query wallets(
  $appId: ID!,
  $cursor: String,
  $maxResults: PositiveInt
) {
  wallets(
    appId: $appId,
    cursor: $cursor,
    maxResults: $maxResults
  ) {
    cursor
    items {
      ...WalletFragment
    }
  }
}
Variables
{
  "appId": "4",
  "cursor": "xyz789",
  "maxResults": 123
}
Response
{
  "data": {
    "wallets": {
      "cursor": "xyz789",
      "items": [Wallet]
    }
  }
}

Mutations

checkout

Description

Initiates checkout for a reserved NFT.

Response

Returns an InitiateCheckoutResponse

Arguments
Name Description
invoiceId - String! The ID of the Invoice representing the reserved NFT. This can be generated using reserve .
onError - String! The URL to redirect to on payment error.
onSuccess - String! The URL to redirect to on successful payment.

Example

Query
mutation checkout(
  $invoiceId: String!,
  $onError: String!,
  $onSuccess: String!
) {
  checkout(
    invoiceId: $invoiceId,
    onError: $onError,
    onSuccess: $onSuccess
  ) {
    redirectUrl
    status
    statusMessage
  }
}
Variables
{
  "invoiceId": "xyz789",
  "onError": "abc123",
  "onSuccess": "abc123"
}
Response
{
  "data": {
    "checkout": {
      "redirectUrl": "http://www.test.com/",
      "status": "abc123",
      "statusMessage": "abc123"
    }
  }
}

createFileUploadUrl

Description

Generates a pre-signed URL that can then be used to upload a file. Once the file has been uploaded to the URL, it will automatically be uploaded to IPFS (if desired). Use the returned File.state to track the upload.

Response

Returns a File

Arguments
Name Description
description - String Description about the file. If specified, and uploadToIpfs=true, this description will be added to the IPFS file metadata.
name - String! A friendly name for the file.
options - CreateFileOptionsInput File upload options, such as whether to upload to IPFS. Default = {uploadToIPFS: true}

Example

Query
mutation createFileUploadUrl(
  $description: String,
  $name: String!,
  $options: CreateFileOptionsInput
) {
  createFileUploadUrl(
    description: $description,
    name: $name,
    options: $options
  ) {
    contentType
    id
    md5
    name
    state
    url
  }
}
Variables
{
  "description": "xyz789",
  "name": "abc123",
  "options": {"uploadToIPFS": "true"}
}
Response
{
  "data": {
    "createFileUploadUrl": {
      "contentType": "xyz789",
      "id": "4",
      "md5": "abc123",
      "name": "xyz789",
      "state": "ERROR",
      "url": "http://www.test.com/"
    }
  }
}

createNFTModel

Description

Creates a new NFTModel.

Response

Returns an NFTModel

Arguments
Name Description
data - NFTModelCreateInput! The data to create the NFTModel.
setId - ID! The ID of the NFTSet that this model should belong to. This can be created using createNFTSet or retrieved using This can be created using sets.

Example

Query
mutation createNFTModel(
  $data: NFTModelCreateInput!,
  $setId: ID!
) {
  createNFTModel(
    data: $data,
    setId: $setId
  ) {
    attributes
    blockchainId
    content {
      ...NFTContentFragment
    }
    createdAt
    description
    id
    metadata
    nfts {
      ...NFTFragment
    }
    quantity
    quantityMinted
    rarity
    set {
      ...NFTSetFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{
  "data": NFTModelCreateInput,
  "setId": "4"
}
Response
{
  "data": {
    "createNFTModel": {
      "attributes": {},
      "blockchainId": "xyz789",
      "content": NFTContent,
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "id": "4",
      "metadata": {},
      "nfts": [NFT],
      "quantity": 123,
      "quantityMinted": 123,
      "rarity": "COMMON",
      "set": NFTSet,
      "state": "COMPLETED",
      "status": "DONE",
      "title": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

createNFTSet

Description

Creates a new NFTSet.

Response

Returns an NFTSet

Arguments
Name Description
data - NFTSetCreateInput! The input data for the NFTSet.

Example

Query
mutation createNFTSet($data: NFTSetCreateInput!) {
  createNFTSet(data: $data) {
    app {
      ...AppFragment
    }
    attributes
    blockchainId
    createdAt
    id
    image
    metadata
    models {
      ...NFTModelFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{"data": NFTSetCreateInput}
Response
{
  "data": {
    "createNFTSet": {
      "app": App,
      "attributes": {},
      "blockchainId": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "image": "http://www.test.com/",
      "metadata": {},
      "models": [NFTModel],
      "state": "ERROR",
      "status": "DONE",
      "title": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

createNiftoryWallet

Description

Provisions a custodial Niftory Wallet and, if specified, associates it with the given AppUser. Note: The call fails if the user already has a wallet.

Response

Returns a Wallet

Arguments
Name Description
data - CreateNiftoryWalletInput
userId - ID The ID of the AppUser to associate with the created Wallet. If unspecified, the caller is responsible for mapping the Wallet to their user.

Example

Query
mutation createNiftoryWallet(
  $data: CreateNiftoryWalletInput,
  $userId: ID
) {
  createNiftoryWallet(
    data: $data,
    userId: $userId
  ) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{
  "data": CreateNiftoryWalletInput,
  "userId": "4"
}
Response
{
  "data": {
    "createNiftoryWallet": {
      "address": "abc123",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "abc123"
    }
  }
}

mintNFTModel

Description

Initiates minting for a given NFTModel.

Response

Returns an NFTModel

Arguments
Name Description
id - ID! The ID of the NFTModel to mint NFTs from.
quantity - PositiveInt The number of NFTs to mint. Defaults to minting all NFTs in the model. If quantity exceeds the quantity defined in the model, the latter is used.

Example

Query
mutation mintNFTModel(
  $id: ID!,
  $quantity: PositiveInt
) {
  mintNFTModel(
    id: $id,
    quantity: $quantity
  ) {
    attributes
    blockchainId
    content {
      ...NFTContentFragment
    }
    createdAt
    description
    id
    metadata
    nfts {
      ...NFTFragment
    }
    quantity
    quantityMinted
    rarity
    set {
      ...NFTSetFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{"id": 4, "quantity": 123}
Response
{
  "data": {
    "mintNFTModel": {
      "attributes": {},
      "blockchainId": "abc123",
      "content": NFTContent,
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "abc123",
      "id": "4",
      "metadata": {},
      "nfts": [NFT],
      "quantity": 123,
      "quantityMinted": 123,
      "rarity": "COMMON",
      "set": NFTSet,
      "state": "COMPLETED",
      "status": "DONE",
      "title": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

readyWallet

Description

Marks a Wallet as ready, indicating that the wallet is ready to receive NFTs from the app's Contract. The wallet must be verified before this succeeds. Read more here.

Response

Returns a Wallet

Arguments
Name Description
address - String! The address of the wallet.

Example

Query
mutation readyWallet($address: String!) {
  readyWallet(address: $address) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{"address": "abc123"}
Response
{
  "data": {
    "readyWallet": {
      "address": "abc123",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "abc123"
    }
  }
}

registerWallet

Description

Registers a Wallet, associating it with the currently signed-in AppUser if specified. Read more here.

Response

Returns a Wallet

Arguments
Name Description
address - String! The address of the wallet.
data - RegisterWalletInput

Example

Query
mutation registerWallet(
  $address: String!,
  $data: RegisterWalletInput
) {
  registerWallet(
    address: $address,
    data: $data
  ) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{
  "address": "abc123",
  "data": RegisterWalletInput
}
Response
{
  "data": {
    "registerWallet": {
      "address": "xyz789",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "abc123"
    }
  }
}

reserve

Description

Reserves an NFT for an AppUser and returns an Invoice for purchase.

Response

Returns an Invoice

Arguments
Name Description
listingId - ID! The ID of the listing to reserve an NFT from.

Example

Query
mutation reserve($listingId: ID!) {
  reserve(listingId: $listingId) {
    createdAt
    id
    listingId
    state
    total
    updatedAt
    userId
  }
}
Variables
{"listingId": 4}
Response
{
  "data": {
    "reserve": {
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "listingId": "xyz789",
      "state": "COMPLETED",
      "total": 123.45,
      "updatedAt": "2007-12-03T10:15:30Z",
      "userId": "abc123"
    }
  }
}

transfer

Description

Initiates the transfer of an NFT to the currently-logged in AppUser. The NFT is reserved for the user in database, and you can use the NFT.status field to check on the transfer progress.

Response

Returns an NFT

Arguments
Name Description
address - String The address of the Wallet to filter by. This mutation requires the userId, walletId' or the wallet address` to be specified.
id - ID The ID of the NFT to send.
nftModelId - ID Used if NFT ID is unspecified to randomly select an NFT from the NFTModel
userId - ID The ID of the AppUser to send the NFT to. This mutation requires the userId, walletId' or the wallet address` to be specified.
walletId - ID The database ID of the Wallet to filter by. This mutation requires the userId, walletId' or the wallet address` to be specified.

Example

Query
mutation transfer(
  $address: String,
  $id: ID,
  $nftModelId: ID,
  $userId: ID,
  $walletId: ID
) {
  transfer(
    address: $address,
    id: $id,
    nftModelId: $nftModelId,
    userId: $userId,
    walletId: $walletId
  ) {
    blockchainId
    blockchainState
    id
    metadata
    model {
      ...NFTModelFragment
    }
    saleState
    serialNumber
    status
    transactions {
      ...BlockchainTransactionFragment
    }
    wallet {
      ...WalletFragment
    }
  }
}
Variables
{
  "address": "xyz789",
  "id": "4",
  "nftModelId": 4,
  "userId": 4,
  "walletId": 4
}
Response
{
  "data": {
    "transfer": {
      "blockchainId": "abc123",
      "blockchainState": "ERROR",
      "id": 4,
      "metadata": {},
      "model": NFTModel,
      "saleState": "AVAILABLE",
      "serialNumber": 987,
      "status": "AVAILABLE",
      "transactions": [BlockchainTransaction],
      "wallet": Wallet
    }
  }
}

updateNFTModel

Description

Updates an existing NFTModel. Note that if this NFTModel has already been used to mint an NFT, the update operation will fail for any properties that affect the blockchain (such as 'quantity', 'title', 'metadata', etc.), whereas updating 'attributes' will succeed.

Response

Returns an NFTModel

Arguments
Name Description
data - NFTModelUpdateInput! The data to update the NFTModel.
id - ID! The ID of the NFT model to update.

Example

Query
mutation updateNFTModel(
  $data: NFTModelUpdateInput!,
  $id: ID!
) {
  updateNFTModel(
    data: $data,
    id: $id
  ) {
    attributes
    blockchainId
    content {
      ...NFTContentFragment
    }
    createdAt
    description
    id
    metadata
    nfts {
      ...NFTFragment
    }
    quantity
    quantityMinted
    rarity
    set {
      ...NFTSetFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{
  "data": NFTModelUpdateInput,
  "id": "4"
}
Response
{
  "data": {
    "updateNFTModel": {
      "attributes": {},
      "blockchainId": "xyz789",
      "content": NFTContent,
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "abc123",
      "id": "4",
      "metadata": {},
      "nfts": [NFT],
      "quantity": 123,
      "quantityMinted": 123,
      "rarity": "COMMON",
      "set": NFTSet,
      "state": "COMPLETED",
      "status": "DONE",
      "title": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

updateNFTSet

Description

Updates an existing NFTSet.

Response

Returns an NFTSet

Arguments
Name Description
data - NFTSetUpdateInput! The input data for the NFTSet.
id - ID! The ID of the NFTSet to update.

Example

Query
mutation updateNFTSet(
  $data: NFTSetUpdateInput!,
  $id: ID!
) {
  updateNFTSet(
    data: $data,
    id: $id
  ) {
    app {
      ...AppFragment
    }
    attributes
    blockchainId
    createdAt
    id
    image
    metadata
    models {
      ...NFTModelFragment
    }
    state
    status
    title
    updatedAt
  }
}
Variables
{"data": NFTSetUpdateInput, "id": 4}
Response
{
  "data": {
    "updateNFTSet": {
      "app": App,
      "attributes": {},
      "blockchainId": "xyz789",
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "image": "http://www.test.com/",
      "metadata": {},
      "models": [NFTModel],
      "state": "ERROR",
      "status": "DONE",
      "title": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

updateWallet

Description

Update a Wallet of the currently signed-in user. Read more here.

Response

Returns a Wallet

Arguments
Name Description
address - String! The address of the wallet.
data - UpdateWalletInput

Example

Query
mutation updateWallet(
  $address: String!,
  $data: UpdateWalletInput
) {
  updateWallet(
    address: $address,
    data: $data
  ) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{
  "address": "abc123",
  "data": UpdateWalletInput
}
Response
{
  "data": {
    "updateWallet": {
      "address": "xyz789",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "xyz789"
    }
  }
}

uploadNFTContent

Description

Creates an NFTContent object containing pre-signed URLs that can then be used to upload a file and poster. The primary file will automatically be uploaded to IPFS once it's been uploaded to the pre-signed URL. Each returned File has a 'state' property to track the upload.

Response

Returns an NFTContent

Arguments
Name Description
contentType - String The Content-Type (MIME type) of the file to be uploaded. This must match the Content-Type header you will use to upload the file to the returned URL. If this is left empty, your Content-Type header must also be empty.
description - String Description about the file. If specified, this description will be added to the IPFS file metadata.
name - String A friendly name for the file.
posterContentType - String The Content-Type (MIME type) of the poster file to be uploaded. This must match the Content-Type header you will use to upload the poster to the returned URL. If this is left empty, your Content-Type header must also be empty.

Example

Query
mutation uploadNFTContent(
  $contentType: String,
  $description: String,
  $name: String,
  $posterContentType: String
) {
  uploadNFTContent(
    contentType: $contentType,
    description: $description,
    name: $name,
    posterContentType: $posterContentType
  ) {
    files {
      ...NFTFileFragment
    }
    id
    poster {
      ...SimpleFileFragment
    }
  }
}
Variables
{
  "contentType": "abc123",
  "description": "xyz789",
  "name": "abc123",
  "posterContentType": "xyz789"
}
Response
{
  "data": {
    "uploadNFTContent": {
      "files": [NFTFile],
      "id": 4,
      "poster": SimpleFile
    }
  }
}

verifyWallet

Description

Verifies a Wallet to the currently signed-in user. If the signed verification code fails to decode with the wallet's public key or doesn't match the wallet's verification code, the request will fail. Read more here.

Response

Returns a Wallet

Arguments
Name Description
address - String! The address of the wallet.
signedVerificationCode - JSON! The verification code of the wallet signed by the wallet's private key.

Example

Query
mutation verifyWallet(
  $address: String!,
  $signedVerificationCode: JSON!
) {
  verifyWallet(
    address: $address,
    signedVerificationCode: $signedVerificationCode
  ) {
    address
    appUser {
      ...AppUserFragment
    }
    attributes
    createdAt
    id
    nfts {
      ...NFTFragment
    }
    state
    updatedAt
    verificationCode
  }
}
Variables
{
  "address": "xyz789",
  "signedVerificationCode": {}
}
Response
{
  "data": {
    "verifyWallet": {
      "address": "abc123",
      "appUser": AppUser,
      "attributes": {},
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "nfts": [NFT],
      "state": "CREATION_FAILED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "verificationCode": "xyz789"
    }
  }
}

Types

App

Description

An application in the Niftory ecosystem. Read more here.

Fields
Field Name Description
contract - Contract The contract associated with this app.
id - ID! A unique identifier for this object in the Niftory API.
Example
{
  "contract": Contract,
  "id": "4"
}

AppUser

Description

Represents a user of a particular Niftory App. Read more here.

Fields
Field Name Description
app - App The app this user is scoped to.
createdAt - DateTime! Creation date of this item
email - EmailAddress This user's email.
id - ID! A unique identifier for this object in the Niftory API.
image - String The URL for this user's image.
name - String The user's full name.
primaryWallet - Wallet The primary wallet used by this user.
updatedAt - DateTime Most recent updated date of this item, if any
wallet - Wallet The wallet owned by this user. Use primaryWallet or wallets instead.
wallets - [Wallet] All wallets owned by this user.
Example
{
  "app": App,
  "createdAt": "2007-12-03T10:15:30Z",
  "email": "test@test.com",
  "id": 4,
  "image": "xyz789",
  "name": "abc123",
  "primaryWallet": Wallet,
  "updatedAt": "2007-12-03T10:15:30Z",
  "wallet": Wallet,
  "wallets": [Wallet]
}

AppUserList

Description

Represents a list of AppUsers of a particular Niftory App. Read more here.

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
items - [AppUser] The AppUsers in this list.
Example
{
  "cursor": "xyz789",
  "items": [AppUser]
}

Attributable

Description

An interface representing objects that have attributes property for non-blockchain property storage.

Fields
Field Name Description
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
Possible Types
Attributable Types

NFTListing

NFTModel

NFTSet

Wallet

Example
{"attributes": {}}

Blockchain

Description

The blockchains supported by Niftory.

Values
Enum Value Description

ETHEREUM

The Ethereum blockchain. https://ethereum.org/en/

FLOW

The Flow blockchain. https://www.onflow.org/

POLYGON

The Polygon blockchain. https://polygon.technology/
Example
"ETHEREUM"

BlockchainEntity

Description

An interface representing properties common to all objects that exist on the blockchain

Fields
Field Name Description
blockchainId - String The ID of this resource on the blockchain.
metadata - JSONObject A mapping of properties that will be added to the blockchain.
Possible Types
BlockchainEntity Types

NFT

NFTModel

NFTSet

Example
{"blockchainId": "xyz789", "metadata": {}}

BlockchainResource

Description

An interface representing properties common to all objects that exist on the blockchain

Fields
Field Name Description
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
blockchainId - String The ID of this resource on the blockchain.
createdAt - DateTime! Creation date of this item
id - ID! A unique identifier for this object in the Niftory API.
metadata - JSONObject A mapping of properties that will be added to the blockchain.
status - Status The status of this resource. Can be used to track progress in designing and creating resources.
updatedAt - DateTime Most recent updated date of this item, if any
Possible Types
BlockchainResource Types

NFTModel

NFTSet

Example
{
  "attributes": {},
  "blockchainId": "xyz789",
  "createdAt": "2007-12-03T10:15:30Z",
  "id": 4,
  "metadata": {},
  "status": "DONE",
  "updatedAt": "2007-12-03T10:15:30Z"
}

BlockchainTransaction

Description

Transaction performed on a blockchain.

Fields
Field Name Description
blockchain - Blockchain! The blockchain where the transaction was perfomed.
hash - String! The hash of the blockchain transaction.
name - String! Name of the transaction performed
Example
{
  "blockchain": "ETHEREUM",
  "hash": "xyz789",
  "name": "xyz789"
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Contract

Description

A smart contract on the blockchain. Read more here.

Fields
Field Name Description
address - String The address at which this contract is deployed.
blockchain - Blockchain The blockchain in which this contract is deployed.
id - ID! A unique identifier for this object in the Niftory API.
name - String The name of this contract.
Example
{
  "address": "xyz789",
  "blockchain": "ETHEREUM",
  "id": 4,
  "name": "abc123"
}

CreateFileOptionsInput

Fields
Input Field Description
contentType - String

The Content-Type (MIME type) of the file to be uploaded. This must match the Content-Type header you will use to upload the file to the returned URL. If this is left empty, your Content-Type header must also be empty.

posterFileId - ID

Required if the file to be uploaded is a video, and uploadToIPFS=true. In that case a poster must have already been uploaded (so it can be used as the image on IPFS).

uploadToIPFS - Boolean

Whether to asynchronously trigger an IPFS upload after the file has been uploaded to the returned cloud storage URL.

Example
{
  "contentType": "xyz789",
  "posterFileId": 4,
  "uploadToIPFS": false
}

CreateNiftoryWalletInput

Description

The input to create a custodial Niftory Wallet.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

Example
{"attributes": {}}

Currency

Description

A currency that can be accepted for payment.

Values
Enum Value Description

USD

The United States dollar.
Example
"USD"

DateTime

Description

A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.

Example
"2007-12-03T10:15:30Z"

EmailAddress

Description

A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.

Example
"test@test.com"

File

Description

An interface containing common data about files.

Fields
Field Name Description
contentType - String The MIME content type for this file.
id - ID! A unique identifier for this file in the Niftory API.
md5 - String The MD5 hash of this file.
name - String! A friendly name for the file.
state - FileState! The upload state of the file.
url - URL! The cloud storage URL for this file. If state is GENERATED_UPLOAD_URL, then this url is the presigned URL to upload to.
Possible Types
File Types

NFTFile

SimpleFile

Example
{
  "contentType": "abc123",
  "id": 4,
  "md5": "abc123",
  "name": "abc123",
  "state": "ERROR",
  "url": "http://www.test.com/"
}

FileState

Description

The upload state of a File.

Values
Enum Value Description

ERROR

The file failed to ready.

GENERATED_UPLOAD_URL

Niftory has created a pre-signed URL where the file can be uploaded.

PENDING

Niftory has created a file entry in the database table.

READY

The file is ready for use.

UPLOADED_TO_CLOUD_STORAGE

The file has been uploaded to a cloud storage for fast retrieval.

UPLOADED_TO_IPFS

The file (and potentially its corresponding metadata) have been uploaded to IPFS.
Example
"ERROR"

FixedPricing

Description

A simple pricing strategy for listings with fixed prices.

Fields
Field Name Description
currency - Currency! The currency at which this price is set.
price - PositiveFloat! The price in the specified currency at which this item is for sale.
Example
{"currency": "USD", "price": 123.45}

HasTimes

Description

An interface representing objects with a creation and update time

Fields
Field Name Description
createdAt - DateTime! Creation date of this item
updatedAt - DateTime Most recent updated date of this item, if any
Possible Types
HasTimes Types

AppUser

Invoice

NFTListing

NFTModel

NFTSet

Wallet

Example
{
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z"
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

Identifiable

Description

An interface representing objects with unique IDs

Fields
Field Name Description
id - ID! A unique identifier for this object in the Niftory API.
Example
{"id": 4}

InitiateCheckoutResponse

Description

The response from initiating a purchase checkout.

Fields
Field Name Description
redirectUrl - URL The URL to redirect the user to.
status - String The status of the payment
statusMessage - String A message to display to the user which contains checkout information
Example
{
  "redirectUrl": "http://www.test.com/",
  "status": "xyz789",
  "statusMessage": "xyz789"
}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
987

Invoice

Description

A purchase invoice for an NFT. The invoice is created when an NFT is reserved using reserve, and updated when a payment is initiated with checkout

Fields
Field Name Description
createdAt - DateTime! Creation date of this item
id - ID! The ID of the Niftory invoice for an NFT purchase
listingId - String The listing associated with this invoice
state - InvoiceState The state of this invoice
total - PositiveFloat The total spent in USD in this invoice
updatedAt - DateTime Most recent updated date of this item, if any
userId - String The user id associated with this invoice
Example
{
  "createdAt": "2007-12-03T10:15:30Z",
  "id": "4",
  "listingId": "abc123",
  "state": "COMPLETED",
  "total": 123.45,
  "updatedAt": "2007-12-03T10:15:30Z",
  "userId": "xyz789"
}

InvoiceList

Description

A list of completed invoices for this app

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
items - [Invoice] The invoices in this list.
Example
{
  "cursor": "abc123",
  "items": [Invoice]
}

InvoiceState

Description

The state of an invoice.

Values
Enum Value Description

COMPLETED

This invoice is completed.

CREATED

This invoice was created and ready for payment.

ERROR

An error was encountered while performing this payment.

PENDING

This invoice is pending payment.
Example
"COMPLETED"

JSON

Description

The JSON scalar type represents JSON values as specified by ECMA-404.

Example
{}

JSONObject

Description

The JSONObject scalar type represents JSON objects as specified by ECMA-404.

Example
{}

ListingState

Description

The state of a listing.

Values
Enum Value Description

ACTIVE

The listing is active and available for sale.

INACTIVE

The listing is inactive, so it's not open for sale.

SOLD

All NFTs in this listing have been sold.
Example
"ACTIVE"

NFT

Description

Respresentation of a non-fungible token in the Niftory ecosystem (it doesn't have to be minted on the blockchain yet). Read more here.

Fields
Field Name Description
blockchainId - String The ID of this resource on the blockchain.
blockchainState - NFTBlockchainState! The state of this NFT on the blockchain
id - ID! A unique identifier for this object in the Niftory API.
metadata - JSONObject A mapping of properties that will be added to the blockchain.
model - NFTModel The model from which this NFT was created.
saleState - SaleState This state of this object's sale.
serialNumber - Int The serial number for this NFT within its model.
status - TransferState The status of this NFT (e.g. if it is available or being transferred to a user Use blockchainState or saleState instead.
transactions - [BlockchainTransaction] Blockchain transcations for this NFT
wallet - Wallet The wallet containing this NFT, if it is owned by a user.
Example
{
  "blockchainId": "xyz789",
  "blockchainState": "ERROR",
  "id": 4,
  "metadata": {},
  "model": NFTModel,
  "saleState": "AVAILABLE",
  "serialNumber": 987,
  "status": "AVAILABLE",
  "transactions": [BlockchainTransaction],
  "wallet": Wallet
}

NFTBlockchainState

Description

The state of an NFT on the blockchain.

Values
Enum Value Description

ERROR

An error occurred with this item's last blockchain operation.

MINTED

The item is minted, and are no pending operations on it.

MINTING

The item is being minted.

TRANSFERRED

The item has already been transferred to a user's wallet.

TRANSFERRING

The item is being transferred.

UNMINTED

The item hasn't been minted yet.
Example
"ERROR"

NFTContent

Description

The content for an NFT.

Fields
Field Name Description
files - [NFTFile] The file content in this NFT.
id - ID! A unique identifier for this object in the Niftory API.
poster - SimpleFile The poster file for this NFT's content
Example
{
  "files": [NFTFile],
  "id": "4",
  "poster": SimpleFile
}

NFTContentInput

Description

The input to create or update NFTContent.

Fields
Input Field Description
fileId - ID!

The ID of the NFTFile content. This can be created using createFileUploadUrl.

posterId - ID

The ID of the poster File. This can be created using createFileUploadUrl.

Example
{"fileId": 4, "posterId": "4"}

NFTFile

Description

File (with ipfsContentUrl and ipfsMetadataUrl). A file to be included in an NFT. Extends File to includes the IPFS addresses for the content and metadata.

Fields
Field Name Description
contentType - String The MIME content type for this file.
id - ID! A unique identifier for this file in the Niftory API.
ipfsContentAddress - String! The IPFS address for the content of this file.
ipfsMetadataAddress - String! The IPFS address for the metadata of this file.
md5 - String The MD5 hash of this file.
name - String! A friendly name for the file.
state - FileState! The upload state of the file.
url - URL! The cloud storage URL for this file. If state is GENERATED_UPLOAD_URL, then this url is the presigned URL to upload to.
Example
{
  "contentType": "xyz789",
  "id": "4",
  "ipfsContentAddress": "xyz789",
  "ipfsMetadataAddress": "abc123",
  "md5": "abc123",
  "name": "abc123",
  "state": "ERROR",
  "url": "http://www.test.com/"
}

NFTFilterInput

Description

Properties to filter NFTs by when querying them.

Fields
Input Field Description
blockchainIds - [String]

Blockchain IDs of the NFTs to find.

blockchainStates - [NFTBlockchainState]

Blockchain states of the NFTs to find. Defaults to all.

ids - [ID]

Database IDs of the NFTs to find.

nftModelIds - [ID]

The IDs of the NFTModel that the NFT should belong to.

saleStates - [SaleState]

Sale states of the NFTs to find. When querying within a user context, defaults to [PAID, FULFILLED]. Otherwise, defaults to all.

transferStates - [TransferState]

Transfer states of the NFTs to find. Defaults to all.

Example
{
  "blockchainIds": ["abc123"],
  "blockchainStates": ["ERROR"],
  "ids": ["4"],
  "nftModelIds": [4],
  "saleStates": ["AVAILABLE"],
  "transferStates": ["AVAILABLE"]
}

NFTList

Description

A list of NFTs.

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
items - [NFT] The NFTs in this list.
Example
{
  "cursor": "xyz789",
  "items": [NFT]
}

NFTListing

Description

A listing of NFTs for sale.

Fields
Field Name Description
appId - ID! The appId of the app this NFTListing belongs to.
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
createdAt - DateTime! Creation date of this item
description - String The description of the listing.
id - ID! A unique identifier for this object in the Niftory API.
nftModel - NFTModel! The NFT Model for this listing, NFTs from this model will be sold when a user checks out with this listing
pricing - FixedPricing! The pricing for this listing
state - ListingState! The state of this listing.
title - String The title of the listing.
updatedAt - DateTime Most recent updated date of this item, if any
Example
{
  "appId": 4,
  "attributes": {},
  "createdAt": "2007-12-03T10:15:30Z",
  "description": "abc123",
  "id": "4",
  "nftModel": NFTModel,
  "pricing": FixedPricing,
  "state": "ACTIVE",
  "title": "abc123",
  "updatedAt": "2007-12-03T10:15:30Z"
}

NFTListingFilterInput

Fields
Input Field Description
ids - [ID]

The IDs of the NFTListing.

state - ListingState

The ID of the NFTModel that the NFTListing should belong to.

title - String

The title of the NFTListing.

Example
{
  "ids": ["4"],
  "state": "ACTIVE",
  "title": "xyz789"
}

NFTListingList

Description

A list of NFTListings.

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
items - [NFTListing] The NFTListings in this list.
Example
{
  "cursor": "abc123",
  "items": [NFTListing]
}

NFTModel

Description

The blueprint for an NFT, containing everything needed to mint one -- file content, blockchain metadata, etc. Read more here.

Fields
Field Name Description
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
blockchainId - String The ID of this resource on the blockchain.
content - NFTContent This NFT model's content.
createdAt - DateTime! Creation date of this item
description - String! The user-friendly description for this model.
id - ID! A unique identifier for this object in the Niftory API.
metadata - JSONObject A mapping of properties that will be added to the blockchain.
nfts - [NFT] The NFTs created using this model.
quantity - PositiveInt The total quantity of NFTs that will be available for this model.
quantityMinted - UnsignedInt The total quantity of NFTs that have been minted from this model.
rarity - SimpleRarityLevel The rarity of the NFTs in this model.
set - NFTSet! The NFT model set containing this model.
state - NFTModelBlockchainState! The state of this NFT Model on the blockchain
status - Status The status of this resource. Can be used to track progress in designing and creating resources.
title - String! The user-friendly title for this model.
updatedAt - DateTime Most recent updated date of this item, if any
Example
{
  "attributes": {},
  "blockchainId": "abc123",
  "content": NFTContent,
  "createdAt": "2007-12-03T10:15:30Z",
  "description": "abc123",
  "id": "4",
  "metadata": {},
  "nfts": [NFT],
  "quantity": 123,
  "quantityMinted": 123,
  "rarity": "COMMON",
  "set": NFTSet,
  "state": "COMPLETED",
  "status": "DONE",
  "title": "xyz789",
  "updatedAt": "2007-12-03T10:15:30Z"
}

NFTModelBlockchainState

Description

The state of an NFT Model on the blockchain.

Values
Enum Value Description

COMPLETED

All NFTs in this model have been transferred to users.

ERROR

An error occurred with this item's last blockchain operation.

MINTED

The item is minted, and are no pending operations on it.

MINTING

The item is being minted.

UNMINTED

The item hasn't been minted yet.
Example
"COMPLETED"

NFTModelCreateInput

Description

The input to create an NFTModel.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

content - NFTContentInput

The file content for this model. Either 'content' or 'contentId' must be specified.

contentId - ID

The ID of the NFTContent for this model. Either 'content' or 'contentId' must be specified.

description - String

The user-friendly details about this model. This will be added to the blockchain metadata when an NFT is minted.

metadata - JSONObject

Metadata that will be added to the blockchain for any NFTs minted from this model.

quantity - PositiveInt

The total supply of NFTs that can be available for this model. This can be updated until the NFTModel is minted.

status - Status

The status of the model.

subtitle - String

The user-friendly subtitle for this model. This will be added to the blockchain metadata when an NFT is minted.

tags - [String]

String labels to tag this NFTModel with. These will be stored in the Niftory API but will not be added to the blockchain.

title - String!

The user-friendly title for this model. This will be added to the blockchain metadata when an NFT is minted.

Example
{
  "attributes": {},
  "content": NFTContentInput,
  "contentId": "4",
  "description": "xyz789",
  "metadata": {},
  "quantity": 123,
  "status": "DONE",
  "subtitle": "xyz789",
  "tags": ["xyz789"],
  "title": "xyz789"
}

NFTModelFilterInput

Description

Properties to filter NFTModels when querying them.

Fields
Input Field Description
blockchainIds - [String]

Blockchain IDs of the NFTModels to find.

ids - [ID]

Database IDs of the NFTModels to find.

setIds - [ID]

The IDs of the NFTSets that the NFTModel should belong to.

status - Status

Filter by NFTModel status.

tags - [String]

The tags in the NFTModel to find. The models returned will contain every tag specified.

Example
{
  "blockchainIds": ["abc123"],
  "ids": ["4"],
  "setIds": [4],
  "status": "DONE",
  "tags": ["abc123"]
}

NFTModelList

Description

A list of NFTModels.

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
items - [NFTModel] The NFTModels in this list.
Example
{
  "cursor": "abc123",
  "items": [NFTModel]
}

NFTModelUpdateInput

Description

The input to update an NFT model.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

content - NFTContentInput

The file content for this model. This can be updated until the NFTModel is minted.

contentId - ID

The ID of the NFTContent for this model.

description - String

The user-friendly details about this model. This will be added to the blockchain metadata when an NFT is minted.

metadata - JSONObject

Metadata that will be added to the blockchain for any NFTs minted from this model. This can be updated until the NFTModel is minted

quantity - PositiveInt

The total supply of NFTs that can be available for this model. This can be updated until the NFTModel is minted.

status - Status

The status of the model.

subtitle - String

The user-friendly subtitle for this model. This will be added to the blockchain metadata when an NFT is minted.

tags - [String]

String labels to tag this NFTModel with. These will be stored in the Niftory API but will not be added to the blockchain. Updating this will replace the existing tags.

title - String

The user-friendly title for this model. This will be added to the blockchain metadata when an NFT is minted.

Example
{
  "attributes": {},
  "content": NFTContentInput,
  "contentId": 4,
  "description": "xyz789",
  "metadata": {},
  "quantity": 123,
  "status": "DONE",
  "subtitle": "abc123",
  "tags": ["xyz789"],
  "title": "abc123"
}

NFTSet

Description

A set of NFTModels, to help you organize your NFTs. Read more here.

Fields
Field Name Description
app - App The app this set belongs to.
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
blockchainId - String The ID of this resource on the blockchain.
createdAt - DateTime! Creation date of this item
id - ID! A unique identifier for this object in the Niftory API.
image - URL The image to represent this set.
metadata - JSONObject A mapping of properties that will be added to the blockchain.
models - [NFTModel] Models contained in this set.
state - NFTSetBlockchainState! The state of this NFT Set on the blockchain
status - Status The status of this resource. Can be used to track progress in designing and creating resources.
title - String! The display image for this set.
updatedAt - DateTime Most recent updated date of this item, if any
Example
{
  "app": App,
  "attributes": {},
  "blockchainId": "abc123",
  "createdAt": "2007-12-03T10:15:30Z",
  "id": "4",
  "image": "http://www.test.com/",
  "metadata": {},
  "models": [NFTModel],
  "state": "ERROR",
  "status": "DONE",
  "title": "xyz789",
  "updatedAt": "2007-12-03T10:15:30Z"
}

NFTSetBlockchainState

Description

The state of an NFT Set on the blockchain.

Values
Enum Value Description

ERROR

An error occurred with this item's last blockchain operation.

MINTED

The item is minted, and are no pending operations on it.

MINTING

The item is being minted.

UNMINTED

The item hasn't been minted yet.
Example
"ERROR"

NFTSetCreateInput

Description

The input to create an NFTSet.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

tags - [String]

String labels to tag this NFTSet with. These will be stored in the Niftory API but will not be added to the blockchain.

title - String!

The user-friendly title for this model.

Example
{
  "attributes": {},
  "tags": ["abc123"],
  "title": "abc123"
}

NFTSetFilterInput

Fields
Input Field Description
blockchainIds - [String]

Blockchain IDs of the NFTSets to find.

ids - [ID]

Database IDs of the NFTSets to find.

tags - [String]

The tags in the NFTSet to find. The sets returned will contain every tag specified.

title - String

The title of the NFTSet to find.

Example
{
  "blockchainIds": ["abc123"],
  "ids": ["4"],
  "tags": ["xyz789"],
  "title": "abc123"
}

NFTSetUpdateInput

Description

The input to update an NFTSet.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

tags - [String]

String labels to tag this NFTSet with. These will be stored in the Niftory API but will not be added to the blockchain. Updating this will replace the existing tags.

title - String

The user-friendly title for this set.

Example
{
  "attributes": {},
  "tags": ["xyz789"],
  "title": "abc123"
}

Pageable

Description

An interface representing lists that can be paginated with a cursor.

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
Example
{"cursor": "abc123"}

PositiveFloat

Description

Floats that will have a value greater than 0.

Example
123.45

PositiveInt

Description

Integers that will have a value greater than 0.

Example
123

RegisterWalletInput

Description

The input to register a Wallet.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

Example
{"attributes": {}}

Resource

Description

An interface representing properties common to all user-managed resources in the Niftory API.

Fields
Field Name Description
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
createdAt - DateTime! Creation date of this item
id - ID! A unique identifier for this object in the Niftory API.
status - Status The status of this resource. Can be used to track progress in designing and creating resources.
updatedAt - DateTime Most recent updated date of this item, if any
Possible Types
Resource Types

NFTModel

NFTSet

Example
{
  "attributes": {},
  "createdAt": "2007-12-03T10:15:30Z",
  "id": "4",
  "status": "DONE",
  "updatedAt": "2007-12-03T10:15:30Z"
}

SaleState

Description

The state of an item being sold.

Values
Enum Value Description

AVAILABLE

The item has not been reserved or purchased yet.

FULFILLED

The item has been delivered.

PAID

The item has been paid for and is being fulfilled.

RESERVED

The item is reserved for a future purchase.
Example
"AVAILABLE"

SellableEntity

Description

An interface representing properties common to all objects that can be bought and sold

Fields
Field Name Description
saleState - SaleState This state of this object's sale.
Possible Types
SellableEntity Types

NFT

Example
{"saleState": "AVAILABLE"}

SimpleFile

Description

A file uploaded to the Niftory API.

Fields
Field Name Description
contentType - String The MIME content type for this file.
id - ID! A unique identifier for this file in the Niftory API.
md5 - String The MD5 hash of this file.
name - String! A friendly name for the file.
state - FileState! The upload state of the file.
url - URL! The cloud storage URL for this file. If state is GENERATED_UPLOAD_URL, then this url is the presigned URL to upload to.
Example
{
  "contentType": "xyz789",
  "id": "4",
  "md5": "xyz789",
  "name": "abc123",
  "state": "ERROR",
  "url": "http://www.test.com/"
}

SimpleRarityLevel

Description

The default rarity levels in the Niftory API.

Values
Enum Value Description

COMMON

The most common NFTs.

LEGENDARY

The rarest of the rare NFTs, for the most dedicated collectors.

RARE

These are rarer, harder to get and more expensive.
Example
"COMMON"

Status

Description

Status of this resource for user workflows.

Values
Enum Value Description

DONE

"Here you go!"

DRAFT

"I'm just getting started."

IN_PROGRESS

"I'm working on it!"

TO_DO

"I'll get to it eventually..."
Example
"DONE"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

TransferState

Description

The state of an item being transferred.

Values
Enum Value Description

AVAILABLE

The item has been created, but not transferred.

ERROR

The item failed to transfer.

IN_PROGRESS

The item is being transferred.

RESERVED

The item is reserved for a future transfer.

SUCCESS

The item has been transferred.
Example
"AVAILABLE"

URL

Description

A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt.

Example
"http://www.test.com/"

UnsignedInt

Description

Integers that will have a value of 0 or more.

Example
123

UpdateWalletInput

Description

The input to update Wallet data.

Fields
Input Field Description
attributes - JSONObject

A mapping of attributes for this resource. These will be stored in the Niftory API but will not be added to the blockchain.

Example
{"attributes": {}}

UserData

Description

An interface containing common data about users.

Fields
Field Name Description
email - EmailAddress This user's email.
image - String The URL for this user's image.
name - String The user's full name.
Possible Types
UserData Types

AppUser

Example
{
  "email": "test@test.com",
  "image": "xyz789",
  "name": "abc123"
}

Wallet

Description

Represents a blockchain wallet scoped to a particular App and AppUser. Read more here.

Fields
Field Name Description
address - String! This wallet's address on the blockchain.
appUser - AppUser The User who owns the wallet
attributes - JSONObject A mapping of attributes for this object. These will be stored in the Niftory API but will not be added to the blockchain.
createdAt - DateTime! Creation date of this item
id - ID! A unique identifier for this object in the Niftory API.
nfts - [NFT] The NFTs from the current app that are in this wallet.
state - WalletState! The state of this wallet.
updatedAt - DateTime Most recent updated date of this item, if any
verificationCode - String The verification code that can be used to verify this wallet for this user.
Example
{
  "address": "abc123",
  "appUser": AppUser,
  "attributes": {},
  "createdAt": "2007-12-03T10:15:30Z",
  "id": "4",
  "nfts": [NFT],
  "state": "CREATION_FAILED",
  "updatedAt": "2007-12-03T10:15:30Z",
  "verificationCode": "xyz789"
}

WalletList

Description

A list of Wallets.

Fields
Field Name Description
cursor - String The cursor to use to fetch the next page of results, if any.
items - [Wallet] The Wallets in this list.
Example
{
  "cursor": "xyz789",
  "items": [Wallet]
}

WalletState

Description

The state of a wallet.

Values
Enum Value Description

CREATION_FAILED

(Custodial Wallet Only) The Niftory custodial wallet failed to be created on the blockchain.

PENDING_CREATION

(Custodial Wallet Only) The Niftory custodial wallet is in the process of being created on-chain. The address and state of the Wallet object will be updated once complete.

READY

The wallet is ready to receive NFTs from this app's contract.

UNVERIFIED

The wallet has been registered with Niftory, but not yet verified to belong to the signed-in user.

VERIFIED

The wallet is verified to belong to the signed-in user, but not yet ready to receive NFTs from this app's contract.
Example
"CREATION_FAILED"