Wiki Navigation

API Reference
CRUD Operations

Types API

Manage item types and spawn configurations. Types define how items spawn in your server including nominal values, lifetime, restock rates, and spawn locations.

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

GET

List Types

Retrieve a paginated list of types for a specific instance.

Endpoint

GET /api/instance/{instance_sid}/type

Parameters

instance_sid
string required

The SID of the instance (URL parameter)

page integer

Page number for pagination. Defaults to 1.

like string

Filter types by classname using partial match.

Response

{
  "current_page": 1,
  "data": [
    {
      "sid": "abc123",
      "classname_id": 1,
      "nominal": 10,
      "min": 5,
      "lifetime": 3600,
      "restock": 1800,
      "quantmin": -1,
      "quantmax": -1,
      "cost": 100,
      "classname": {
        "name": "AKM"
      }
    }
  ],
  "per_page": 30,
  "total": 500
}
GET

Get Type

Retrieve details of a specific type with all spawn parameters.

Endpoint

GET /api/instance/{instance_sid}/type/{type_sid}

URL Parameters

instance_sid required

The SID of the instance

type_sid required

The SID of the type

Response

{
  "sid": "abc123",
  "classname_id": 1,
  "nominal": 10,
  "min": 5,
  "lifetime": 3600,
  "restock": 1800,
  "quantmin": -1,
  "quantmax": -1,
  "cost": 100,
  "count_in_cargo": 0,
  "count_in_hoarder": 0,
  "count_in_map": 1,
  "count_in_player": 0,
  "crafted": 0,
  "deloot": 0,
  "classname": {
    "sid": "xyz789",
    "name": "AKM"
  },
  "usages": ["Military"],
  "values": ["Tier3", "Tier4"]
}
POST

Create Type

Create a new type entry for an instance.

Endpoint

POST /api/instance/{instance_sid}/type

Request Body

classname_id
integer required

Associated classname ID

nominal integer

Target spawn count on the map

min integer

Minimum spawn threshold

lifetime integer

Despawn time in seconds

restock integer

Respawn delay in seconds

cost integer

Spawn priority weight

quantmin integer

Min stack quantity (-1 for default)

quantmax integer

Max stack quantity (-1 for default)

usages array

Spawn location tags (e.g., Military)

values array

Tier tags (e.g., Tier1, Tier2)

Flag Parameters

count_in_cargo 0|1

Count items in container cargo

count_in_hoarder 0|1

Count items in stashes

count_in_map 0|1

Count items on the ground

count_in_player 0|1

Count items in player inventory

crafted 0|1

Item is crafted only

deloot 0|1

Dynamic event loot only

PATCH

Update Type

PATCH /api/instance/{instance_sid}/type/{type_sid}

Update an existing type's spawn parameters. Include only fields to change.

DELETE

Delete Type

DELETE /api/instance/{instance_sid}/type/{type_sid}

Permanently delete a type entry from the instance.

Related Documentation

For detailed information about type parameters and their effects on the economy: