Skip to main content

Floor Plans

A floor plan is a location-level canvas that models a table-based dining layout: named sections (Window, Bar, Patio) that each hold table placements positioned on the canvas. Floor plans power host-stand views, table-assignment workflows, section filtering, and table-slot availability matching.

Table resources are created through floor plans — not directly

Unlike rooms and rentals, you do not create table resources or their instances directly. When you create a floor plan definition, the platform automatically creates the underlying table Resource and ResourceInstance for every table and wires the links. That is why a table resource is the one exception to the "every resource needs at least one instance" rule on Resources & Instances — its instances come from the floor plan. Author the layout here; the catalog records are generated for you.

Floor plan structure and automatic table-resource creationA floor plan contains sections; each section places tables on a canvas. For every table placement, the platform automatically creates a table resource and a resource instance and wires the links.YOU AUTHORcontainsplacesFloor plancanvasSectionnamed areaTableplacementPLATFORM CREATES AUTOMATICALLYTable resourcethe bookable typeInstancethe unit+

So a floor plan is both a visual layout and the source of truth for table inventory: place a table on the canvas and the bookable table resource and its instance exist; remove it and they go with it.

FloorPlan

The location-level canvas.

FieldTypeRequiredDescription
idstringYesUnique floor plan identifier
namestringYesDisplay name
descriptionstringYesDescription for staff or integrations
locationIdstring | nullNoBusiness location scope
imageUrlsstring[] | nullNoOptional background or reference images
isActivebooleanYesWhether the layout can be used (default: true)
canvasDimensionsCanvasDimensionsYesLayout coordinate system (see below)
capacitynumberYesTotal seating capacity
metadataobject | nullNoRenderer or integration metadata

Section

A named area within a floor plan.

FieldTypeRequiredDescription
idstringYesUnique section identifier
floorPlanIdstringYesParent floor plan
locationIdstringYesBusiness location
namestringYesSection name (Window, Bar, Patio)
capacityintegerYesSection seating capacity
colorstringYesHex color #RRGGBB for the host view
isActivebooleanYesWhether the section is usable (default: true)
sortOrderintegerNoDisplay order (default: 0)
tablesTablePlacement[]NoTable placements in this section (default: [])
geometrySectionGeometry | nullNoSection shape on the canvas (see below)

TablePlacement

A single table positioned on the canvas. Each placement links to the table Resource it represents (tableResourceId) and the section it sits in (floorPlanSectionId).

FieldTypeRequiredDescription
idstringYesUnique placement identifier
floorPlanSectionIdstringYesParent section
tableResourceIdstringYesThe table resource this placement represents
numberstringYesTable number/label (e.g. "12", "B1")
x / ynumberYesPosition on the canvas
width / heightnumberYesTable footprint (> 0)
shapeenumYesTable shape (see below)
rotationnumber | nullNoRotation in degrees
minPartyintegerYesMinimum party size
maxPartyintegerYesMaximum party size (used for capacity sums)
combinableWithstring[]NoTables this one can combine with (default: [])
serverSectionIdstring | nullNoServer/waitstaff section assignment

Table shapes

ValueTypical rendering
roundCircular table
squareSquare table
boothBooth seating
rectRectangular table
curvedCurved booth or banquette
high_topHigh-top table
barBar seat or bar area

Canvas & geometry

CanvasDimensions

Defines the coordinate system every x/y/width/height is expressed in.

FieldTypeRequiredDescription
widthnumberYesCanvas width (> 0)
heightnumberYesCanvas height (> 0)
unitenumNopx, ft, or m (default: px)

SectionGeometry

Sections can optionally describe their own shape, discriminated by kind:

  • auto — let the renderer derive the section bounds.
  • rectx, y, width, height, and optional rotation (−360…360).
  • polygon — a points array of 3–64 { x, y } vertices, with optional rotation.

Creating a floor plan

Create the whole layout — floor plan, sections, and tables — in a single atomic request using the floor plan definition (graph). Nested sections and tables are supplied inline; the server assigns and wires all IDs.

Nested tables use number, not tableResourceId

In the create payload, each nested table is identified by its number (and an optional serverSectionId) rather than tableResourceId/floorPlanSectionId — the table resource and section links are created and wired by the server. Within the payload, combinableWith references other table numbers.

import { WiilClient } from 'wiil-js';
import { CanvasUnit, TableShape } from 'wiil-core-js';

const client = new WiilClient({ apiKey: process.env.WIIL_API_KEY! });

const floorPlan = await client.floorPlans.createDefinition({
name: 'Main Dining Room',
description: 'Primary indoor dining layout',
capacity: 12,
canvasDimensions: { width: 1200, height: 800, unit: CanvasUnit.PX },
isActive: true,
sections: [
{
name: 'Window',
capacity: 8,
color: '#2F80ED',
isActive: true,
sortOrder: 1,
tables: [
{ number: 'W1', x: 220, y: 180, width: 80, height: 80, shape: TableShape.ROUND, minParty: 2, maxParty: 4, combinableWith: ['W2'] },
{ number: 'W2', x: 320, y: 180, width: 80, height: 60, shape: TableShape.RECT, minParty: 2, maxParty: 4, combinableWith: ['W1'] },
],
},
{
name: 'Main Floor',
capacity: 4,
color: '#7B68EE',
isActive: true,
sortOrder: 2,
tables: [
{ number: 'M1', x: 200, y: 420, width: 120, height: 80, shape: TableShape.RECT, minParty: 2, maxParty: 4, combinableWith: [] },
],
},
],
});

console.log(`Floor Plan Created: ${floorPlan.id}`);

The response is a hydrated FloorPlanDefinition — the full floor plan plus its sections, each with its full list of table placements (now carrying their server-assigned tableResourceId values).

Validation rules

The nested create enforces capacity and party-size consistency. Capacity is treated as maximum seats, so section and floor-plan totals sum each table's maxParty.

RuleRequirement
Sections presentAt least one section must be defined
Tables presentEach section must have at least one table
Section capacitySection capacity equals the sum of its tables' maxParty
Floor plan capacityFloor plan capacity equals the sum of section capacities
Party sizesEach table's maxPartyminParty

In the example above: Window 8 = 4 + 4; Main Floor 4 = 4; floor plan 12 = 8 + 4.

Query options

ResourceFilters
FloorPlanlocationId, isActive
SectionlocationId, isActive

Both are paginated with page and pageSize.