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.types resource gives you access to the entity type system in the Star Wars Combine universe. Every in-game entity — ships, vehicles, items, facilities, and more — belongs to a class and has a specific type definition. Use the types resource to enumerate those definitions for display purposes, type lookups, or building entity catalogs.
Both types.classes.list() and types.entities.list() return a 404 if you call them without passing start_index and item_count. Always include explicit pagination parameters.

Entity classes

Classes are the top-level groupings within each entity category. For example, the ships category contains classes like “Capital Ship” and “Freighter”.

types.classes.list()

Returns a paginated list of entity classes for the given entity type.
entityType
string
required
The entity category to list classes for. Must be one of: ships, vehicles, stations, cities, facilities, planets, items, npcs, droids, creatures, materials, factionmodules.
start_index
number
required
1-based index of the first class to return. Required — omitting this causes a 404.
item_count
number
required
Number of classes per page. Required — omitting this causes a 404.
const shipClasses = await client.types.classes.list({
  entityType: 'ships',
  start_index: 1,
  item_count: 50,
});

for await (const cls of shipClasses) {
  console.log(cls.name, cls.uid);
}

Entity types

Entity types are the specific definitions within a class — the individual blueprints for ships, items, and so on.

types.entities.list()

Returns a paginated list of entity type definitions for the given category.
entityType
string
required
The entity category. Same set of values as types.classes.list().
start_index
number
required
1-based index of the first type to return. Required — omitting this causes a 404.
item_count
number
required
Number of types per page. Required — omitting this causes a 404.
const itemTypes = await client.types.entities.list({
  entityType: 'items',
  start_index: 1,
  item_count: 100,
});

for await (const type of itemTypes) {
  console.log(type.name, type.uid, type.class);
}

types.entities.get()

Retrieves the full definition of a single entity type by category and UID.
entityType
string
required
The entity category the type belongs to.
uid
string
required
The entity type UID in "type:id" format.
const shipType = await client.types.entities.get({
  entityType: 'ships',
  uid: '8:1234',
});

console.log(shipType.name);
console.log(shipType.class);
console.log(shipType.stats);

Supported entity types

The entityType parameter accepts the following values across all types methods:
ValueDescription
shipsSpacecraft definitions
vehiclesGround and repulsorlift vehicle definitions
stationsSpace station blueprints
citiesCity type definitions
facilitiesGround facility blueprints
planetsPlanet type definitions
itemsEquipment, weapons, and item definitions
npcsNon-player character type definitions
droidsDroid type definitions
creaturesCreature type definitions
materialsRaw material definitions
factionmodulesFaction module type definitions (classes only)

Full example

import { SWCombine } from 'swcombine-sdk';

const client = new SWCombine({ token: process.env.SWC_ACCESS_TOKEN! });

// List all ship classes
const classes = await client.types.classes.list({
  entityType: 'ships',
  start_index: 1,
  item_count: 50,
});

console.log(`${classes.total} ship classes`);

// List all ship types
const types = await client.types.entities.list({
  entityType: 'ships',
  start_index: 1,
  item_count: 100,
});

console.log(`${types.total} ship types`);

// Get a specific ship type
const ywing = await client.types.entities.get({
  entityType: 'ships',
  uid: '8:7',
});

console.log(ywing.name); // "Y-Wing BTL-A4"
Entity types are the building blocks for understanding what is in a character’s inventory. Pair types.entities.get() with inventory entity data to enrich your application with full type specs.

Inventory

List entities owned by a character and map them to their type definitions.

Datacard

List production datacards, which reference entity types.

Market

Browse vendor listings that reference entity types.

Galaxy

Browse the galaxy — stations and cities correspond to types here.