This page documents every data structure used by the Designer and Picker SDKs. Types are referenced from the Designer API Reference and Picker API Reference .
The root schema returned by the Designer's onSave callback and accepted by the Picker's loadLayout() method.
{
type : 'seatSquirrelLayout' ,
version : '1.0.0' ,
layout : {
sections : Section[],
rows : Row[],
areas ?: Area[],
tables ?: Table[],
pricingCategories : PricingCategory[],
drawing ?: Drawing,
metadata : {
name ?: string,
exportedAt : string, // ISO 8601 timestamp
dimensions : { width : number, height : number },
currency ?: string, // ISO 4217 currency code (e.g., 'USD', 'EUR')
locale ?: string, // BCP 47 locale code (e.g., 'en-US', 'de-DE')
permissions ?: DesignerPermissions // Feature restrictions stored with layout
}
}
}
Defines a pricing tier that can be assigned to seats, rows, sections, or areas.
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: price_{16chars} (e.g., price_x7k2m9p4q1B2c3D4). Globally unique across all layouts. labelstring Yes Customisable display label visible to end users in the Picker (e.g., "Adult", "VIP", "Early Bird") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., pricing-vip, pricing-early_bird) pricenumber Yes Price in your currency's smallest unit (cents) colorstring Yes Hex color for visual representation customerNotesstring No Notes visible to customers during booking
{
id : "price_x7k2m9p4q1B2c3D4" ,
label : "VIP" ,
slug : "vip" ,
price : 15000 , // e.g., $150.00
color : "#8b5cf6" ,
customerNotes : "Includes complimentary drinks"
}
Organizes rows and areas into named venue sections with optional hierarchy.
Full functionality coming coon
Sections are not fully implemented in SeatSquirrel yet and will be in a future version. Sections will eventually be able to recursively contain layouts eg:
//...
sections : [{
sections: Section[],
rows: Row[],
areas?: Area[],
tables?: Table[],
pricingCategories: PricingCategory[],
drawing?: Drawing,
}, {
// ...
}]
//...
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: section_{16chars} (e.g., section_a1B2c3D4e5F6g7H8). Globally unique across all layouts. labelstring Yes Customisable display label visible to end users in the Picker (e.g., "Orchestra", "Balcony", "Mezzanine") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., section-orchestra, section-balcony_left) parentSectionIdstring No Parent section ID for nested hierarchy bounds{ x, y, width, height }No Visual bounds of the section on canvas pricingCategoryIdsstring[] Yes Pricing categories for this section entrancesstring[] No Entrance identifiers for this section isCollapsedboolean No Whether the section is collapsed in the UI ordernumber No Display order among sibling sections colorstring No Section color (hex) metadataRecord<string, any>No Arbitrary key-value metadata
A row of seats with positioning and labeling configuration. Seats are nested inside the row in the seats array.
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: row_{16chars} (e.g., row_a1B2c3D4e5F6g7H8). Globally unique across all layouts. labelstring Yes Customisable display label visible to end users in the Picker (e.g., "A", "1", "AA") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., row-a, row-aa) seatCountnumber Yes Number of seats in row seatLabelType'numeric' | 'alphabetic-upper' | 'alphabetic-lower' | 'custom'Yes How seats are labeled seatLabelStartnumber | string No Starting label (default: 1 or 'A') seatLabelOrder'forward' | 'reverse'No Label direction sectionIdstring No Parent section ID entranceToUsestring No Preferred entrance for this row pricingCategoryIdsstring[] Yes Pricing categories (inherited by seats) rowSeatsRowSeat []Yes Array of seats in this row drawingRowDrawing Yes Position and curve data
Property Type Required Description startXnumber Yes Row start X coordinate startYnumber Yes Row start Y coordinate endXnumber Yes Row end X coordinate endYnumber Yes Row end Y coordinate curvenumber Yes Curve factor (-1 to 1, 0 = straight) anglenumber Yes Row angle in radians seatSpacingnumber No Custom spacing between seats rowLabelPlacement'start' | 'end' | 'both' | 'none'No Where to show row labels seatDrawingSeatDrawing No Default seat color overrides
Property Type Required Description fillstring No Row seat fill color strokestring No Row seat stroke color
An individual seat within a row.
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: rowseat_{16chars} (e.g., rowseat_a1B2c3D4e5F6g7H8). Globally unique across all layouts. rowIdstring Yes Parent row ID indexInRownumber Yes Position index within the row (0-based) labelstring Yes Customisable display label visible to end users in the Picker (e.g., "1", "A", "12") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., rowseat-row_a-1, rowseat-row_b-12) pricingCategoryIdsstring[] Yes Available pricing categories for this seat isAvailableboolean No Whether seat can be booked (picker mode) isUnbookableboolean No Permanently unbookable (e.g., removed seat) isAccessibleboolean No Wheelchair accessible hasRestrictedViewboolean No Has obstructed or limited view drawingSeatDrawing No Optional color overrides
{
id : "rowseat_x7k2m9p4q1B2c3D4" ,
rowId : "row_d5E6f7G8h9I0j1K2" ,
indexInRow : 0 ,
label : "1" ,
slug : "rowseat-row_a-1" ,
pricingCategoryIds : [ "price_x7k2m9p4q1B2c3D4" ],
isAccessible : true
}
A bookable area (general admission, tables, VIP sections) with flexible pricing models.
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: area_{16chars} (e.g., area_a1B2c3D4e5F6g7H8). Globally unique across all layouts. labelstring Yes Customisable display label visible to end users in the Picker (e.g., "General Admission", "VIP Lounge", "Standing Room") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., area-general_admission, area-vip_lounge) purchaseType'multiple-customer' | 'single-customer'Yes Multiple tickets vs. exclusive booking pricingMethod'per-person' | 'as-whole'Yes Price per person or flat rate for entire area sectionIdstring No Parent section ID pricingCategoryIdsstring[] Yes Available pricing categories minOccupancynumber No Minimum people required maxOccupancynumber Yes Maximum capacity displayUnit'seat' | 'standing' | 'sofa' | nullNo How capacity is labeled entranceToUsestring No Preferred entrance showMaxOccupancyboolean No Show capacity to customers showMinOccupancyboolean No Show minimum to customers showOccupancyInfoboolean No Show current availability isUnbookableboolean No Permanently unavailable isAccessibleboolean No Wheelchair accessible hasRestrictedViewboolean No Has obstructed view currentOccupancynumber No Current bookings (for availability display) availableCountnumber No Remaining capacity isAvailableboolean No Single-customer area: is it available? bookedByCustomerIdstring No Single-customer: who booked it lockedboolean No Prevent editing in designer drawingAreaDrawing Yes Shape and visual properties
Property Type Required Description shape'rectangle' | 'circle' | 'polygon' | 'custom'Yes Shape type shapeDataAreaShapeData Yes Shape-specific dimensions fillstring Yes Fill color (hex) strokestring No Stroke color strokeWidthnumber No Stroke width in pixels opacitynumber No Opacity (0-1) rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale labelstring No Label overlay shown on area labelFontSizenumber No Font size for label labelXnumber No Label X position (% 0-100) labelYnumber No Label Y position (% 0-100) labelColorstring No Label color labelAlign'left' | 'center' | 'right'No Label alignment
Properties vary by shape type:
Property Type Used By Description xnumber All X position ynumber All Y position widthnumber rectangle Width heightnumber rectangle Height radiusnumber circle (if equal radii) Circle radius radiusXnumber circle (ellipse) Horizontal radius radiusYnumber circle (ellipse) Vertical radius sidesnumber polygon Number of sides (3-20) pointsnumber[] custom Array of [x,y,x,y,...] points cornerRadiusnumber rectangle Rounded corner radius
A table with seats arranged around its perimeter. Tables are a hybrid between rows (individual bookable seats) and areas (a visible shape on the canvas).
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: table_{16chars} (e.g., table_a1B2c3D4e5F6g7H8). Globally unique across all layouts. labelstring Yes Customisable display label visible to end users in the Picker (e.g., "Table 1", "VIP Table", "Corner Booth") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., table-table_1, table-vip_table) seatCountnumber Yes Number of seats around the table seatLabelType'numeric' | 'alphabetic-upper' | 'alphabetic-lower' | 'custom'Yes How seats are labeled seatLabelStartnumber | string No Starting label (default: 1 or 'A') seatLabelOrder'clockwise' | 'counter-clockwise'No Seat label direction around table purchaseType'multiple-customer' | 'single-customer'Yes Multiple individual seat bookings vs. exclusive whole-table booking pricingMethod'per-person' | 'as-whole'Yes Price per person or flat rate for the whole table pricingCategoryIdsstring[] Yes Pricing categories for this table minOccupancynumber No Minimum number of people required showMinOccupancyboolean No Show min occupancy in picker (single-customer) showMaxOccupancyboolean No Show max occupancy (seat count) in picker (single-customer) sectionIdstring No Parent section ID entranceToUsestring No Preferred entrance for this table isUnbookableboolean No Permanently unavailable isAccessibleboolean No Wheelchair accessible hasRestrictedViewboolean No Has obstructed view isAvailableboolean No Single-customer table: is it available? bookedByCustomerIdstring No Single-customer table: who booked it lockedboolean No Prevent editing in designer tableSeatsTableSeat []Yes Array of seats around this table drawingTableDrawing Yes Shape and visual properties
Property Type Required Description shape'circular' | 'rectangular'Yes Table shape xnumber Yes X position ynumber Yes Y position radiusnumber No Radius (circular tables) widthnumber No Width (rectangular tables) heightnumber No Height (rectangular tables) cornerRadiusnumber No Corner radius (rectangular tables) fillstring Yes Fill color (hex) strokestring No Stroke color strokeWidthnumber No Stroke width opacitynumber No Opacity (0-1) rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale labelstring No Label shown on table surface labelFontSizenumber No Font size for label labelColorstring No Label color seatDrawingSeatDrawing No Default seat color overrides
An individual seat belonging to a table.
Property Type Required Description idstring Yes Machine-generated unique identifier. Format: tableseat_{16chars} (e.g., tableseat_a1B2c3D4e5F6g7H8). Globally unique across all layouts. tableIdstring Yes Parent table ID indexInTablenumber Yes Position index around the table (0-based) labelstring Yes Customisable display label visible to end users in the Picker (e.g., "1", "A", "Seat 3") slugstring Yes URL-safe identifier for API integrations. Auto-generated from the label but fully customisable. Must be unique within each layout. (e.g., tableseat-table_1-1, tableseat-vip_table-a) pricingCategoryIdsstring[] Yes Available pricing categories for this seat isAvailableboolean No Whether seat can be booked (picker mode) isUnbookableboolean No Permanently unbookable isAccessibleboolean No Wheelchair accessible hasRestrictedViewboolean No Has obstructed or limited view drawingSeatDrawing No Optional color overrides
Visual annotations that are not bookable (decorative shapes, labels, stage outlines).
Property Type Required Description backgroundColorstring No Canvas background color linesLine []No Line elements textElementsTextElement []No Text labels rectanglesRectangle []No Rectangle shapes circlesCircle []No Circle/ellipse shapes polygonsPolygon []No Regular polygon shapes customShapesCustomShape []No Freeform shapes
Property Type Required Description idstring Yes Machine-generated ID pointsnumber[] Yes [x1,y1,x2,y2,...] points strokeWidthnumber Yes Line width strokeColorstring Yes Line color strokeStyle'solid' | 'dashed' | 'dotted'Yes Line style dashArraynumber[] No Custom dash pattern opacitynumber Yes Opacity (0-1) labelstring No Optional label lockedboolean No Prevent editing closedboolean No Connect last to first point
Property Type Required Description idstring Yes Machine-generated ID xnumber Yes X position ynumber Yes Y position textstring Yes Text content fontSizenumber Yes Font size colorstring Yes Text color boldboolean No Bold text italicboolean No Italic text rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale widthnumber No Text box width align'left' | 'center' | 'right'No Text alignment lockedboolean No Prevent editing labelstring No Optional identifier
Property Type Required Description idstring Yes Machine-generated ID xnumber Yes X position ynumber Yes Y position widthnumber Yes Width heightnumber Yes Height fillstring Yes Fill color cornerRadiusnumber Yes Corner radius strokestring No Stroke color strokeWidthnumber No Stroke width rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale opacitynumber No Opacity (0-1) lockedboolean No Prevent editing labelstring No Display label labelFontSizenumber No Label font size labelXnumber No Label X offset labelYnumber No Label Y offset labelColorstring No Label color labelAlign'left' | 'center' | 'right'No Label alignment
Supports both circles (equal radii) and ellipses (different radiusX/radiusY).
Property Type Required Description idstring Yes Machine-generated ID xnumber Yes Center X position ynumber Yes Center Y position radiusXnumber Yes Horizontal radius radiusYnumber Yes Vertical radius fillstring Yes Fill color strokestring No Stroke color strokeWidthnumber No Stroke width rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale opacitynumber No Opacity (0-1) lockedboolean No Prevent editing labelstring No Display label labelFontSizenumber No Label font size labelXnumber No Label X offset labelYnumber No Label Y offset labelColorstring No Label color labelAlign'left' | 'center' | 'right'No Label alignment
Regular polygons (triangles, hexagons, etc.).
Property Type Required Description idstring Yes Machine-generated ID xnumber Yes Center X position ynumber Yes Center Y position radiusnumber Yes Distance to vertices sidesnumber Yes Number of sides (3-20) fillstring Yes Fill color strokestring No Stroke color strokeWidthnumber No Stroke width rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale opacitynumber No Opacity (0-1) lockedboolean No Prevent editing labelstring No Display label labelFontSizenumber No Label font size labelXnumber No Label X offset labelYnumber No Label Y offset labelColorstring No Label color labelAlign'left' | 'center' | 'right'No Label alignment
Freeform shapes defined by arbitrary points.
Property Type Required Description idstring Yes Machine-generated ID xnumber Yes Origin X position ynumber Yes Origin Y position pointsnumber[] Yes [x1,y1,x2,y2,...] points fillstring Yes Fill color strokestring No Stroke color strokeWidthnumber No Stroke width rotationnumber No Rotation in degrees scaleXnumber No Horizontal scale scaleYnumber No Vertical scale opacitynumber No Opacity (0-1) lockedboolean No Prevent editing labelstring No Display label labelFontSizenumber No Label font size labelXnumber No Label X offset labelYnumber No Label Y offset labelColorstring No Label color labelAlign'left' | 'center' | 'right'No Label alignment
Configuration object to control which features are enabled in the Designer. All fields are optional — omitted fields default to enabled (true).
Used with the permissions option in the Designer constructor to restrict functionality (e.g., pre-supply pricing categories and prevent users from creating/editing them).
Key Principle: Default to full access. Permissions are opt-in restrictions, not opt-in grants.
Property Type Default Description readOnlyboolean falseGlobal read-only mode — disables all editing assignmentOnlyboolean falsePricing assignment-only mode — blocks structural/visual edits while allowing pricing assignment toolsobject — Tool-level permissions (see below) propertiesobject — Properties panel permissions (see below)
Property Type Default Description rowboolean trueAllow seat row creation tool tableboolean trueAllow table creation tools areaboolean trueAllow area creation tools shapeboolean trueAllow shape tools (rectangle, circle, polygon, custom, line) textboolean trueAllow text creation tool traceImageboolean trueAllow trace image upload tool
Property Type Default Description showPropertiesboolean trueShow greyed-out (non-editable) properties when an element is selected in readOnly or assignmentOnly mode. Set false to hide properties entirely (restoring pre-1.4 behavior). settingsTabboolean trueAllow access to the Settings tab in Properties Panel pricingCategoriesCrudboolean trueAllow creating/editing/deleting pricing categories currencySettingsboolean trueAllow changing currency and locale settings
Property Type Default Description pricingCategoriesAssignmentSaveWarningboolean trueShow warning when rows, areas, or tables don't have pricing categories assigned pricingCategoriesAssignmentPanelWarningboolean trueShow "Missing Pricing Categories" warning in the properties panel when nothing is selected
// Example: All permissions with defaults shown
{
readOnly : false ,
assignmentOnly : false ,
tools : {
row : true ,
table : true ,
area : true ,
shape : true ,
text : true ,
traceImage : true
},
properties : {
showProperties : true ,
settingsTab : true ,
pricingCategoriesCrud : true ,
currencySettings : true
},
warnings : {
pricingCategoriesAssignmentSaveWarning : true ,
pricingCategoriesAssignmentPanelWarning : true
}
}
readOnly takes precedence over assignmentOnly when both are set to true.
The data structure returned by onSelectionChanged and onComplete callbacks. Each item in the selections array is one of four subtypes: RowSeatSelection , AreaSelection , TableSeatSelection , or WholeTableSelection .
Property Type Description selectionsSelectionItem[]Array of selection items — see subtypes below totalsobject { count: number, amount: number }
{
selections : [
{ type: 'row-seat' , ... },
{ type: 'area' , ... },
{ type: 'table-seat' , ... },
{ type: 'whole-table' , ... }
],
totals : {
count : 5 , // Total items selected
amount : 25000 // Total price in cents (e.g., $250.00)
}
}
Returned when a user selects a seat.
Property Type Required Description idstring Yes Unique seat identifier type'row-seat'Yes Discriminator for selection type rowIdstring Yes Parent row identifier rowLabelstring Yes Row label (e.g., "A", "1") seatLabelstring Yes Seat label (e.g., "1", "12") slugstring Yes Seat slug rowSlugstring Yes Row slug sectionIdstring No Section identifier sectionNamestring No Section display name sectionSlugstring No Section slug categoryIdstring Yes Selected pricing category ID categoryLabelstring No Pricing category display label categorySlugstring No Pricing category slug pricenumber Yes Price in cents
Returned when a user selects spots in an area.
Property Type Required Description idstring Yes Unique area identifier type'area'Yes Discriminator for selection type areaLabelstring Yes Area display label slugstring Yes Area slug sectionIdstring No Section identifier sectionNamestring No Section display name sectionSlugstring No Section slug categoryIdstring Yes Selected pricing category ID categoryLabelstring No Pricing category display label categorySlugstring No Pricing category slug quantitynumber Yes Number of spots selected pricePerUnitnumber Yes Price per spot in cents totalPricenumber Yes Total price in cents (quantity x pricePerUnit)
Returned when a user selects an individual seat at a table (multiple-customer purchase type).
Property Type Required Description idstring Yes Unique table seat identifier type'table-seat'Yes Discriminator for selection type tableIdstring Yes Parent table identifier tableLabelstring Yes Table display label seatLabelstring Yes Seat label within the table slugstring Yes Table seat slug tableSlugstring Yes Table slug sectionIdstring No Section identifier sectionNamestring No Section display name sectionSlugstring No Section slug categoryIdstring Yes Selected pricing category ID categoryLabelstring No Pricing category display label categorySlugstring No Pricing category slug pricenumber Yes Price in cents
Returned when a user books an entire table (single-customer purchase type).
Property Type Required Description idstring Yes Unique table selection identifier type'whole-table'Yes Discriminator for selection type tableIdstring Yes Table identifier tableLabelstring Yes Table display label tableSlugstring Yes Table slug sectionIdstring No Section identifier sectionNamestring No Section display name sectionSlugstring No Section slug categoryIdstring Yes Selected pricing category ID categoryLabelstring No Pricing category display label categorySlugstring No Pricing category slug quantitynumber Yes Number of people / units selected pricePerUnitnumber Yes Price per unit in cents totalPricenumber Yes Total price in cents (quantity x pricePerUnit)
Set availability using machine-generated IDs. Used with setAvailability({ mode: 'by-id', ... }).
Property Type Description rowSeatsRecord<string, boolean>Map of seat ID to availability (true = available) areasRecord<string, number | boolean>Map of area ID to available count (number), or boolean (true = 1, false = 0) tableSeatsRecord<string, boolean>Map of table seat ID to availability tablesRecord<string, boolean>Map of table ID to availability (true = available)
picker. setAvailability ({
mode: 'by-id' ,
rowSeats: {
"rowseat_a1B2c3D4e5F6g7H8" : true ,
"rowseat_h8G7f6E5d4C3b2A1" : false
},
areas: {
"area_j9K0l1M2n3O4p5Q6" : 50 ,
"area_x1Y2z3A4b5C6d7E8" : false // boolean: false = 0 (unavailable)
},
tables: {
"table_x1Y2z3" : false
}
});
Set availability using user-defined slugs. Used with setAvailability({ mode: 'by-slug', ... }). Recommended.
Property Type Description rowSeatsRecord<string, boolean>Map of seat slug to availability areasRecord<string, number | boolean>Map of area slug to available count (number), or boolean (true = 1, false = 0) tableSeatsRecord<string, boolean>Map of table seat slug to availability tablesRecord<string, boolean>Map of table slug to availability (true = available)
picker. setAvailability ({
mode: 'by-slug' ,
rowSeats: {
"row-a-seat-1" : false ,
"row-a-seat-2" : true
},
areas: {
"standing-room" : 50 ,
"vip-lounge" : 0 ,
"private-booth" : false // boolean: false = 0 (unavailable)
},
tables: {
"vip-table-1" : false
}
});
Set availability using display labels. Used with setAvailability({ mode: 'dangerously-by-labels', ... }).
⚠️ Warning: Labels can clash if duplicated across sections. Prefer slugs.
Property Type Required Description sectionIdstring No Section ID (required if row/seat is ambiguous) rowLabelstring Yes Row label (e.g., "A", "1") seatLabelstring Yes Seat label (e.g., "1", "12") isAvailableboolean Yes Whether the seat is available
Property Type Required Description sectionIdstring No Section ID (required if area name is ambiguous) areaLabelstring Yes Area label as defined in the layout availableCountnumber | boolean Yes Number of available spots (0 = sold out), or boolean (true = 1, false = 0)
Property Type Required Description sectionIdstring No Section ID (required if table name is ambiguous) tableLabelstring Yes Table label as defined in the layout isAvailableboolean Yes Whether the table is available
picker. setAvailability ({
mode: 'dangerously-by-labels' ,
rowSeats: [
{ rowLabel: "A" , seatLabel: "1" , isAvailable: false },
{ rowLabel: "A" , seatLabel: "2" , isAvailable: true }
],
areas: [
{ areaLabel: "Standing Room" , availableCount: 50 }
],
tables: [
{ tableLabel: "VIP Table" , isAvailable: false }
]
});
Partially update pricing categories using machine-generated IDs. Used with updatePricingCategoriesById(). Merges provided fields into matching categories — unmentioned categories are untouched. All-or-nothing: if any ID doesn't match, the call fails with no changes.
Property Type Required Description pricingCategoriesArray<{ id, ...fields }>Yes Array of category partial updates
Property Type Required Description idstring Yes Category ID (must match existing category) labelstring No New display label slugstring No New slug pricenumber No New price in cents colorstring No New hex color customerNotesstring No New customer notes
picker. updatePricingCategoriesById ({
pricingCategories: [
{ id: "price_a1B2c3D4e5F6g7H8" , price: 7500 , label: "Standard (updated)" },
{ id: "price_h8G7f6E5d4C3b2A1" , color: "#10B981" }
]
});
Partially update pricing categories using user-defined slugs. Used with updatePricingCategoriesBySlug(). Recommended. Merges provided fields into matching categories — unmentioned categories are untouched. All-or-nothing: if any slug doesn't match, the call fails with no changes.
Note: The slug field is used only for matching — it is not merged into the category. To change a slug, use updatePricingCategoriesById and pass slug as an update field.
Property Type Required Description pricingCategoriesArray<{ slug, ...fields }>Yes Array of category partial updates
Property Type Required Description slugstring Yes Category slug (used for matching only, not merged) labelstring No New display label pricenumber No New price in cents colorstring No New hex color customerNotesstring No New customer notes
picker. updatePricingCategoriesBySlug ({
pricingCategories: [
{ slug: "standard" , price: 7500 , label: "Standard (updated)" },
{ slug: "vip" , color: "#10B981" }
]
});
Input for assignPricingCategories() on both the Designer and Picker APIs. Allows programmatic assignment of pricing categories to layout objects. Uses a mode discriminator to control how objects and categories are identified.
Atomic semantics: If any assignment fails validation, none are applied.
Property Type Required Description mode'by-id' | 'by-slug' | 'dangerously-by-labels'Yes How to identify objects and categories
Each property is a Record<objectId, categoryId[]> map:
Property Type Required Description rowsRecord<string, string[]>No Map of row ID to category IDs rowSeatsRecord<string, string[]>No Map of seat ID to category IDs areasRecord<string, string[]>No Map of area ID to category IDs tablesRecord<string, string[]>No Map of table ID to category IDs tableSeatsRecord<string, string[]>No Map of table seat ID to category IDs
Same shape as 'by-id', but keys are user-defined slugs for both objects and categories.
Each property is an array of label-based entries. Categories are always referenced by slug.
Property Type Required Description rowsArray<{ sectionId?, rowLabel, pricingCategorySlugs }>No Row assignments by label rowSeatsArray<{ sectionId?, rowLabel, seatLabel, pricingCategorySlugs }>No Seat assignments by label areasArray<{ sectionId?, areaLabel, pricingCategorySlugs }>No Area assignments by label tablesArray<{ sectionId?, tableLabel, pricingCategorySlugs }>No Table assignments by label tableSeatsArray<{ sectionId?, tableLabel, seatLabel, pricingCategorySlugs }>No Table seat assignments by label
// By slug (recommended)
{
mode : 'by-slug' ,
rows : {
'row-a' : [ 'vip' , 'standard' ],
'row-b' : [ 'standard' ],
},
areas : {
'vip-lounge' : [ 'vip' ],
}
}
// By ID
{
mode : 'by-id' ,
rows : {
'row-uuid-1' : [ 'cat-uuid-1' , 'cat-uuid-2' ],
},
areas : {
'area-uuid-1' : [ 'cat-uuid-2' ],
}
}
// Dangerously by labels
{
mode : 'dangerously-by-labels' ,
rows : [
{ rowLabel: 'A' , pricingCategorySlugs: [ 'vip' , 'standard' ] },
{ sectionId: 'section-uuid' , rowLabel: 'A' , pricingCategorySlugs: [ 'economy' ] },
]
}
Result returned by assignPricingCategories(). Uses atomic semantics — if any assignment fails validation, none are applied and all errors are returned.
Property Type Description successboolean true if all assignments applied, false if any validation failederrorsstring[] Present when success is false. Lists all validation errors (e.g., unknown object slug, unknown category ID)
// Success
{ success : true }
// Failure — no assignments applied
{
success : false ,
errors : [
'No object found with slug "nonexistent-row"' ,
'No pricing category found with slug "unknown-category"'
]
}
A full LayoutOutput JSON showing all structures together:
{
type : 'seatSquirrelLayout' ,
version : '1.0.0' ,
layout : {
sections : [{
id: 'section_a1B2c3D4e5F6g7H8' ,
label: 'Orchestra' ,
slug: 'section-orchestra' ,
pricingCategoryIds: [ 'price_v1I2p7R8s9T0u1W2' , 'price_s3T4d5A6n7D8r9E0' ]
}],
rows : [{
id: 'row_d5E6f7G8h9I0j1K2' ,
label: 'A' ,
slug: 'row-a' ,
seatCount: 10 ,
seatLabelType: 'numeric' ,
seatLabelStart: 1 ,
sectionId: 'section_a1B2c3D4e5F6g7H8' ,
pricingCategoryIds: [ 'price_v1I2p7R8s9T0u1W2' ],
drawing: {
startX: 100 ,
startY: 200 ,
endX: 400 ,
endY: 200 ,
curve: 0.1 ,
angle: 0
},
seats: [
{
id: 'rowseat_x7k2m9p4q1B2c3D4' ,
rowId: 'row_d5E6f7G8h9I0j1K2' ,
indexInRow: 0 ,
label: '1' ,
slug: 'rowseat-row_a-1' ,
pricingCategoryIds: [ 'price_v1I2p7R8s9T0u1W2' ]
}
// ... more seats
]
}],
areas : [{
id: 'area_g1H2i3J4k5L6m7N8' ,
label: 'General Admission' ,
slug: 'area-general_admission' ,
purchaseType: 'multiple-customer' ,
pricingMethod: 'per-person' ,
pricingCategoryIds: [ 'price_s3T4d5A6n7D8r9E0' ],
maxOccupancy: 200 ,
displayUnit: 'standing' ,
drawing: {
shape: 'rectangle' ,
shapeData: { x: 500 , y: 100 , width: 300 , height: 200 },
fill: '#e5e7eb'
}
}],
tables : [{
id: 'table_t1A2b3L4e5S6e7A8' ,
label: 'Table 1' ,
slug: 'table-table_1' ,
seatCount: 6 ,
seatLabelType: 'numeric' ,
seatLabelStart: 1 ,
purchaseType: 'multiple-customer' ,
pricingMethod: 'per-person' ,
pricingCategoryIds: [ 'price_s3T4d5A6n7D8r9E0' ],
sectionId: 'section_a1B2c3D4e5F6g7H8' ,
drawing: {
shape: 'circular' ,
x: 600 ,
y: 400 ,
radius: 40 ,
fill: '#d1d5db'
},
seats: [
{
id: 'tableseat_p1Q2r3S4t5U6v7W8' ,
tableId: 'table_t1A2b3L4e5S6e7A8' ,
indexInTable: 0 ,
label: '1' ,
slug: 'tableseat-table_1-1' ,
pricingCategoryIds: [ 'price_s3T4d5A6n7D8r9E0' ]
}
// ... more seats
]
}],
pricingCategories : [
{ id: 'price_v1I2p7R8s9T0u1W2' , label: 'VIP' , slug: 'vip' , price: 15000 , color: '#8b5cf6' },
{ id: 'price_s3T4d5A6n7D8r9E0' , label: 'Standard' , slug: 'standard' , price: 5000 , color: '#3b82f6' }
],
drawing : {
backgroundColor : '#ffffff' ,
rectangles : [{
id: 'rect_j1K2l3M4n5O6p7Q8' ,
x: 200 ,
y: 50 ,
width: 200 ,
height: 60 ,
fill: '#1f2937' ,
cornerRadius: 4 ,
label: 'STAGE' ,
labelColor: '#ffffff' ,
labelFontSize: 24 ,
labelAlign: 'center'
}],
textElements : [{
id: 'text_m1N2o3P4q5R6s7T8' ,
x: 50 ,
y: 400 ,
text: 'EXIT' ,
fontSize: 16 ,
color: '#ef4444'
}]
},
metadata : {
name : 'Main Theater' ,
exportedAt : '2024-01-15T10:30:00.000Z' ,
dimensions : { width : 800 , height : 600 },
currency : 'USD' ,
locale : 'en-US' ,
permissions : {
properties : { pricingCategoriesCrud : false }
}
}
}
}