Marketplace
Create Storefront

Create Storefront

Once you have created Items, you can display them on your game or website. This guide will show you how to fetch your items from the Fractal API.

💡

Requests to server APIs require a valid auth token scoped to your project. For a guide on how to get your auth token, see this guide.


Get Templates

To get a list of item templates you have defined, you can use the /inventory/solana/items (opens in a new tab) GET endpoint. Requests require a valid API authentication token to be passed in the Authorization header.

The request's body can be empty. The endpoint will automatically fetch all templates defined for your project.



Example
curl --request GET \
     --url 'https://api.fractal.is/sdk/v1/inventory/solana/items' \
     --header 'Authorization: Bearer <PROJECT_API_TOKEN>'
Response

This will return a JSON with various collections and their respective templates. For each template, you will get the following information:

AttributeContent
idUnique identifier for the template.
metadataMetadata for the template. (name, description, image URL, and attributes array)
pricePrice for the template. (amount and unit of currency)
{
  "collections": {
    "templates": [
      {
        "id": "5fe6d9aa-3959-46be-b499-866ee1ba3185",
        "metadata": {
          "name": "Spec Ops Soldier",
          "description": "A super awesome spec ops soldier to use in our game",
          "imageUrl": "https://storage.googleapis.com/fractal-studios/673a38ab-980b-4cba-ab60-3bfc0b16a2ba/aaea772c-6d09-49a9-a6cd-cdeffe94e96a",
          "attributes": []
        },
        "price": { "amount": "1", "unit": "SOL" }
      },
      {
        "id": "676846a7-97bf-45b2-90f4-f55f9880e0aa",
        "metadata": {
          "name": "Spec Ops Soldier",
          "description": "A fractal devex Spec Ops soldier",
          "imageUrl": "https://storage.googleapis.com/fractal-studios/673a38ab-980b-4cba-ab60-3bfc0b16a2ba/f0f4c983-5879-4bed-8a64-fec193f50c25",
          "attributes": []
        },
        "price": { "amount": "1", "unit": "SOL" }
      },
      {
        "id": "5f52bf14-c95b-43cb-aa38-8ba5e136df01",
        "metadata": {
          "name": "Demo NFT",
          "description": "Super awesome Fractal Developer experience NFT",
          "imageUrl": "https://storage.googleapis.com/fractal-studios/673a38ab-980b-4cba-ab60-3bfc0b16a2ba/19ba3b35-e893-41fb-9617-adeea75d7838",
          "attributes": []
        },
        "price": { "amount": "5", "unit": "SOL" }
      },
      {
        "id": "bfb604ec-5e8b-4dc5-8106-1bec16b07bd9",
        "metadata": {
          "name": "Ocotopus NFT",
          "description": "Super Awesome Octopus NFT",
          "imageUrl": "https://storage.googleapis.com/fractal-studios/673a38ab-980b-4cba-ab60-3bfc0b16a2ba/d7d87121-5077-42e4-8544-f46cef8c1062",
          "attributes": []
        },
        "price": { "amount": "1", "unit": "SOL" }
      }
    ]
  }
}