Wiki Navigation

API Reference
CRUD Operations

Trader Categories API

Manage trader categories to organize items within seller inventories. Categories belong to a seller and contain the actual tradeable items.

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)

seller_id integer

Filter categories by seller ID.

like string

Filter categories by name using partial match.

amount integer

Number of results per page. Defaults to 30.

Response

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "sid": "cat123abc456",
      "name": "Assault Rifles",
      "seller_id": 1,
      "instance_id": 1,
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    }
  ],
  "per_page": 30,
  "total": 12
}
GET

Get Trader Category

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

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

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 trader category (max 255 characters)

seller_id
integer required

ID of the seller this category belongs to

Example Request

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

Update Trader Category

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

Update an existing trader category. Include only fields to change.

DELETE

Delete Trader Category

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

Permanently delete a trader category and all associated items.

Pro Tips

Use the seller_id filter to retrieve categories for a specific trader. Create logical groupings like "Weapons", "Ammunition", "Medical", "Building Supplies" to make it easier for players to find items.