Skip to main content

Documentation Index

Fetch the complete documentation index at: https://swc-sdk.zeltros.dev/llms.txt

Use this file to discover all available pages before exploring further.

The client.inventory resource lets you list and inspect entities — ships, vehicles, facilities, items, NPCs, and more — that belong to a character or a faction. The uid parameter on every method accepts either a character UID (e.g. 1:12345) or a faction UID (e.g. 20:123); the SDK does not have a separate client.faction.entities accessor — faction-owned entities are queried through this resource.

inventory.get()

Get inventory summary by UID. Returns the inventory summary object directly — not wrapped in a Page. Accepts either a character UID or a faction UID.
uid
string
required
The uid parameter.
// Character inventory summary
const characterOverview = await client.inventory.get({ uid: '1:12345' });

// Faction inventory summary
const factionOverview = await client.inventory.get({ uid: '20:123' });
console.log(factionOverview); // access properties directly, not factionOverview.data

Entities

inventory.entities.addTag()

Add tag to entity
entityType
string
required
The entityType parameter.
tag
string
required
The tag parameter.
uid
string
required
The uid parameter.

inventory.entities.get()

Get a specific inventory entity by type and UID. Returns the Entity object directly — not wrapped in a Page.
entityType
string
required
The entityType parameter.
uid
string
required
The uid parameter.
const ship = await client.inventory.entities.get({ entityType: 'ships', uid: '8:123' });
console.log(ship.name); // access properties directly, not ship.data

inventory.entities.list()

List entities in inventory (paginated with optional filtering) Supports filtering by various entity properties. Filter arrays must have matching lengths. The uid argument accepts either a character UID (e.g. 1:12345) or a faction UID (e.g. 20:123) — there is no separate client.faction.entities accessor; faction-owned entities are queried through this method.
assignType
InventoryAssignType
required
Assignment type: ‘owner’, ‘commander’, or ‘pilot’
entityType
T
required
Entity type: ‘ships’, ‘vehicles’, ‘stations’, ‘cities’, ‘facilities’, ‘planets’, ‘items’, ‘npcs’, ‘droids’, ‘creatures’, or ‘materials’
filter_inclusion
**filter\_inclusion**: InventoryFilterInclusion[]
Whether each filter should include or exclude matches. Default: ‘includes’
filter_type
**filter\_type**: InventoryFilterType[]
Filter types to apply to the query
filter_value
**filter\_value**: string[]
Values corresponding to each filter type
item_count
**item\_count**: number
default:"50"
Number of items to retrieve. Default: 50, Max: 200
pageDelay
number
Milliseconds to wait before fetching each subsequent page. Helps avoid rate limits during auto-pagination.
start_index
**start\_index**: number
default:"1"
Starting position for pagination (1-based). Default: 1
uid
string
required
The uid parameter.
// Character-owned ships
const myShips = await client.inventory.entities.list({ uid: '1:12345', entityType: 'ships', assignType: 'owner' });

// Faction-owned ships — pass a faction UID instead of a character UID
const factionShips = await client.inventory.entities.list({ uid: '20:123', entityType: 'ships', assignType: 'owner' });

// Faction facilities
const factionFacilities = await client.inventory.entities.list({ uid: '20:123', entityType: 'facilities', assignType: 'owner' });

// Vehicles a character is piloting
const pilotedVehicles = await client.inventory.entities.list({ uid: '1:12345', entityType: 'vehicles', assignType: 'pilot' });

// Fetch up to 200 entities at once
const moreEntities = await client.inventory.entities.list({ uid: '1:12345', entityType: 'vehicles', assignType: 'pilot', start_index: 1, item_count: 200 });

// Filter by multiple criteria
const multiFiltered = await client.inventory.entities.list({
  uid: '1:12345',
  entityType: 'ships',
  assignType: 'owner',
  filter_type: ['class', 'powered'],
  filter_value: ['Fighter', '1'],
  filter_inclusion: ['includes', 'includes']
});

inventory.entities.removeAllTags()

Remove all tags from entity
entityType
string
required
The entityType parameter.
uid
string
required
The uid parameter.

inventory.entities.removeTag()

Remove tag from entity
entityType
string
required
The entityType parameter.
tag
string
required
The tag parameter.
uid
string
required
The uid parameter.

inventory.entities.updateProperty()

Update entity property
entityType
string
required
Entity type (ships, vehicles, stations, etc.)
new_value
string
required
New value for the property
property
'name' \| 'owner' \| 'infotext' \| 'commander' \| 'pilot' \| 'open-to' \| 'action' \| 'crewlist-add' \| 'crewlist-remove' \| 'crewlist-clear'
required
Property to update
reason
string
Optional reason for the change
uid
string
required
Entity UID

Character

Access the character who owns or pilots these entities.

Faction

Access the faction whose entities you are listing.

Types

Look up entity type details and stats.

Location

Look up entity locations.