LeaderOS API
  • 👋Getting Started
    • Introduction
    • Authentication
  • 🔐Auth
    • Login
    • Register
    • Sessions
  • 🧑‍🦱Users
    • Profiles
    • Roles
    • Tickets
    • Orders
  • 🛍️Store
    • Listing
    • Products
    • Categories
    • Buy
    • Donations
  • 🍏Bazaar
    • Player Storages
    • Servers
  • 🚨Support
    • Tickets
    • Messages
    • Categories
    • Quick Answers
  • 🪙Credits
    • Show Credits
    • Add Credits
    • Remove Credits
    • Send Credits
    • Set Credits
  • 👍Vote
    • Vote Links
  • 🎮Discord
    • Users
    • Settings
    • Roles
Powered by GitBook
On this page
  • Get user items storage
  • Add items to user storage
  • Remove items to user storage
  1. Bazaar

Player Storages

Get user items storage

GET https://yourwebsite.com/api/bazaar/storages/<user_id>/items

[
    {
        "id": "4",
        "owner": "1",
        "serverID": "3",
        "itemID": "ENCHANTING_TABLE",
        "modelID": null,
        "name": "Enchanting Table",
        "lore": null,
        "amount": "1",
        "durability": "1",
        "maxDurability": "0",
        "enchantments": null,
        "base64": "rO0ABXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFwdAAPTGph\r\ndmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFibGVNYXAk\r\nU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAlsABGtleXN0ABNbTGphdmEvbGFuZy9PYmplY3Q7WwAG\r\ndmFsdWVzcQB+AAR4cHVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAJ0AAI9\r\nPXQABHR5cGV1cQB+AAYAAAACdAAeb3JnLmJ1a2tpdC5pbnZlbnRvcnkuSXRlbVN0YWNrdAARRU5D\r\nSEFOVE1FTlRfVEFCTEU=\r\n",
        "description": null,
        "price": "0.00",
        "sold": "0",
        "creationDate": "2022-08-24 00:15:03"
    },
    {
        "id": "5",
        "owner": "1",
        "serverID": "3",
        "itemID": "BOOKSHELF",
        "modelID": null,
        "name": "Bookshelf",
        "lore": null,
        "amount": "32",
        "durability": "1",
        "maxDurability": "0",
        "enchantments": null,
        "base64": "rO0ABXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFwdAAPTGph\r\ndmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFibGVNYXAk\r\nU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAlsABGtleXN0ABNbTGphdmEvbGFuZy9PYmplY3Q7WwAG\r\ndmFsdWVzcQB+AAR4cHVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAI9\r\nPXQABHR5cGV0AAZhbW91bnR1cQB+AAYAAAADdAAeb3JnLmJ1a2tpdC5pbnZlbnRvcnkuSXRlbVN0\r\nYWNrdAAJQk9PS1NIRUxGc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhy\r\nABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAACA=\r\n",
        "description": null,
        "price": "0.00",
        "sold": "0",
        "creationDate": "2022-08-24 00:17:37"
    }
]
{
    "status": false,
    "error": "USER_NOT_FOUND",
    "message": "User not found!"
}

Add items to user storage

POST https://yourwebsite.com/api/bazaar/storages/<user_id>/items

Request Body

Name
Type
Description

serverID*

int

itemID*

numeric

modelID

numeric

name

string

lore

string

amount*

numeric

durability*

numeric

maxDurability*

numeric

enchantments

string

base64*

string

{
    "success": true
}
{
    "status": false,
    "error": "USER_NOT_FOUND",
    "message": "User not found!"
}
{
    "status": false,
    "error": "INSERT_ERROR",
    "message": "Error while inserting data!"
}

Remove items to user storage

DELETE https://yourwebsite.com/api/bazaar/storages/<user_id>/items/<id>

{
    "success": true
}
{
    "status": false,
    "error": "DELETE_ERROR",
    "message": "Error while deleting data!"
}
PreviousBazaarNextServers

Last updated 4 months ago

🍏