Wiki Navigation

API Reference
CRUD Operations

Trader Categories API

Manage trader categories to organize items within sellers. Categories group related items together for easier navigation in trader menus.

Authentication required: All endpoints require a valid Bearer token. See Authentication for details.

GET

List Trader Categories

Retrieve a paginated list of trader categories for a specific instance.

Endpoint

GET /api/instance/{instance_sid}/trader-category

Parameters

instance_sid
string required

The SID of the instance (URL parameter)

like string

Filter categories by name using partial match.

seller_id integer

Filter categories by seller ID.

Response

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "sid": "cat123",
      "name": "Weapons",
      "seller_id": 1,
      "instance_id": 5,
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z"
    }
  ],
  "per_page": 30,
  "total": 10
}
GET

Get Trader Category

Retrieve details of a specific trader category, including its items and seller.

Endpoint

GET /api/instance/{instance_sid}/trader-category/{category_sid}

URL Parameters

instance_sid required

The SID of the instance

category_sid required

The SID of the trader category

Response

{
  "id": 1,
  "sid": "cat123",
  "name": "Weapons",
  "seller_id": 1,
  "instance_id": 5,
  "seller": {
    "id": 1,
    "sid": "seller123",
    "name": "General Trader"
  },
  "items": [
    {
      "id": 1,
      "sid": "item123",
      "classname_id": 456,
      "buy": 5000,
      "sell": 2500
    }
  ],
  "created_at": "2025-01-15T10:30:00.000000Z",
  "updated_at": "2025-01-15T10:30:00.000000Z"
}
POST

Create Trader Category

Create a new trader category for an instance.

Endpoint

POST /api/instance/{instance_sid}/trader-category

Request Body

name
string required

Name of the category (max 255 characters)

seller_id
integer required

ID of the parent trader seller

Example Request

{
  "name": "Assault Rifles",
  "seller_id": 1
}
PATCH

Update Trader Category

PATCH /api/instance/{instance_sid}/trader-category/{category_sid}

Update an existing category's name or seller assignment.

DELETE

Delete Trader Category

DELETE /api/instance/{instance_sid}/trader-category/{category_sid}

Permanently delete a category and all its items.

Pro Tips

Categories help organize items within a seller. Use clear, descriptive names like "Assault Rifles", "Medical Supplies", or "Building Materials". You can move a category to a different seller by updating its seller_id. Filter by seller_id to get all categories for a specific trader.