Wiki Navigation

API Reference
CRUD Operations

Trader Sellers API

Manage trader sellers (NPCs/vendors) for your server. Sellers are the top-level entities that contain categories and items for trading.

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

GET

List Trader Sellers

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

Endpoint

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

Parameters

instance_sid
string required

The SID of the instance (URL parameter)

page integer

Page number for pagination. Defaults to 1.

like string

Filter sellers by name using partial match.

Response

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

Get Trader Seller

Retrieve details of a specific trader seller, including its categories.

Endpoint

GET /api/instance/{instance_sid}/trader-seller/{seller_sid}

URL Parameters

instance_sid required

The SID of the instance

seller_sid required

The SID of the trader seller

Response

{
  "id": 1,
  "sid": "abc123",
  "name": "General Trader",
  "instance_id": 5,
  "categories": [
    {
      "id": 1,
      "sid": "cat123",
      "name": "Weapons"
    }
  ],
  "created_at": "2025-01-15T10:30:00.000000Z",
  "updated_at": "2025-01-15T10:30:00.000000Z"
}
POST

Create Trader Seller

Create a new trader seller for an instance.

Endpoint

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

Request Body

name
string required

Name of the trader seller (max 255 characters)

Example Request

{
  "name": "Weapons Dealer"
}
PATCH

Update Trader Seller

PATCH /api/instance/{instance_sid}/trader-seller/{seller_sid}

Update an existing trader seller's name.

DELETE

Delete Trader Seller

DELETE /api/instance/{instance_sid}/trader-seller/{seller_sid}

Permanently delete a trader seller and all its categories/items.

Pro Tips

Trader sellers are the top-level containers for your trading system. Create separate sellers for different trader NPCs or locations. Each seller can have multiple categories, and each category contains the actual tradeable items. Use descriptive names like "Military Trader" or "Coastal Merchant" to organize your economy.