Skip to content
DonutStatsAPI
Sign up
Object

Product

One kind of item on the market, down to its enchantments.

Every listing, order, price and flip points at a product. A product is an item id plus everything that changes its value: enchantments, potion type, spawner mob, shulker box contents and so on. Two diamond swords with different enchantments are two products with two prices.

The key is stable and safe to store. It is built from the item id and the variant, so you can also construct it yourself.

Fields

  • keystring

    Unique product key: the item id, plus the variant in square brackets when there is one. Examples: diamond, elytra[mending,unbreaking:3], potion[poison]. Use it with product= filters and /v1/items/{key}.

  • itemstring

    Minecraft item id without the minecraft: namespace, for example netherite_sword. Many products can share one item id.

  • namestring

    Display name, for example Potion of Poison.

  • variantstring

    What sets this product apart from the plain item. Empty for plain items. See variants for the rules.

  • categorystring | null

    One of combat, tools, valuables, drops, food, potions, blocks or misc.

  • Structured extras such as enchantments, shulker box contents or a custom name.

    Show5 child fields
    • enchantmentsEnchantment[]

      Enchantments on the item itself, sorted by id. Left out when there are none.

      Show2 child fields
      • idstring

        Enchantment id without the minecraft: namespace, for example sharpness.

      • levelinteger

        Enchantment level, starting at 1.

    • storedEnchantmentsEnchantment[]

      Enchantments stored in an enchanted book. Left out for every other item.

      Show2 child fields
      • idstring

        Enchantment id without the minecraft: namespace, for example sharpness.

      • levelinteger

        Enchantment level, starting at 1.

    • contentsContainerEntry[]

      What a shulker box holds, one entry per item id with counts added together, largest first.

      Show2 child fields
      • itemstring

        Item id, for example netherite_sword.

      • countinteger

        Total number of that item in the box.

    • customNamestring

      The name shown in game when it differs from the default item name. DonutSMP renames some items, for example Dried Ghast on a skeleton skull.

    • flightDurationinteger

      Flight duration of a firework rocket, from 1 to 3.