### Example parameters object structure Source: https://docs.seats.io/docs/renderer/prompts-api/onPlacesWithTicketTypesPrompt An example of the data structure passed to the callback, containing ticket types, current selections, and constraints like min/max places. ```json { ticketTypes: [ { price: 12, ticketType: "Adult", formattedPrice: "12€" }, { price: 8, ticketType: "Child", formattedPrice: "8€" } ], selectedPlacesByTicketType: { "Adult": 1 }, minPlaces: 0, maxPlaces: 10, objectToSelect: { label: "General Admission" } } ``` -------------------------------- ### Go: Managing Event Object Status, Booking, and Holding Source: https://docs.seats.io/docs/api/best-available Go language examples for the Seats.io client, demonstrating how to change object status, book, and hold best available seats. These examples show parameter usage for number of seats, categories, and custom statuses. ```Go // custom status bestAvailableResult, err := client.Events.ChangeBestAvailableObjectStatus("eventKey", &events.BestAvailableStatusChangeParams{ Status: "myCustomStatus", BestAvailable: events.BestAvailableParams{ Number: 10, Categories: []events.CategoryKey{{Key: "balcony", "stalls"}}, }, }) // book bestAvailableResult, err := client.Events.BookBestAvailable("eventKey", BestAvailable: events.BestAvailableParams{ Number: 10, Categories: []events.CategoryKey{ {Key: "balcony"}, {Key: "stalls"}, }, }) _, err = client.Events.HoldBestAvailable("eventKey", events.BestAvailableParams{ Number: 10, Categories: []events.CategoryKey{ {Key: "balcony"}, {Key: "stalls"}, }, }, holdToken) ``` -------------------------------- ### onPlacesPrompt Parameters Example - JavaScript Source: https://docs.seats.io/docs/renderer/prompts-api/onPlacesPrompt An example of the parameters object passed to the onPlacesPrompt callback. It includes `selectedPlaces`, `minPlaces`, `maxPlaces`, and `objectToSelect`, providing context for building custom prompts. ```javascript { selectedPlaces: 1, minPlaces: 0, maxPlaces: 10, objectToSelect: { // ... label: "General Admission", // ... } } ``` -------------------------------- ### Example parameter structure Source: https://docs.seats.io/docs/renderer/prompts-api/onTicketTypePrompt An example of the object structure passed to the onTicketTypePrompt callback, containing the available ticket types and the target object label. ```json { ticketTypes: [ { price: 12, ticketType: "Adult", formattedPrice: "12€" }, { price: 8, ticketType: "Child", formattedPrice: "8€" } ], objectToSelect: { label: "K-7" } } ``` -------------------------------- ### Get Event Report by Zone (cURL) Source: https://docs.seats.io/docs/api/events-reports/detail Example of how to retrieve an event report by zone using cURL. This command-line request targets the Seats.io API, specifying the event key and the desired zone. Authentication is handled via basic authentication with a secret key. ```Shell curl https://api-{region}.seatsio.net/reports/events/event34/byZone -u aSecretKey: ``` -------------------------------- ### Install @seatsio/seatsio-types for TypeScript Source: https://docs.seats.io/docs/renderer/embed-a-floor-plan Instructions for manually installing type definitions for Seats.io in a TypeScript project when not using a frontend SDK. This involves installing the package as a dev dependency and configuring `tsconfig.json` to include the type definitions. ```bash npm install @seatsio/seatsio-types --save-dev ``` -------------------------------- ### Example Curl Request for Partial Season Source: https://docs.seats.io/docs/api/create-partial-season An example of how to create a partial season using a curl command. This demonstrates the HTTP method, headers, and data payload. ```bash curl https://api-{region}.seatsio.net/seasons/aTopLevelSeason/partial-seasons \ -u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"key": "aPartialSeason"}' ``` -------------------------------- ### Get Summary Report by Availability Reason (Go) Source: https://docs.seats.io/docs/api/events-reports/summary This Go code example demonstrates retrieving a summary report by availability reason for an event using the seatsio client. It calls the `SummaryByAvailabilityReason` method, which returns the report data and an error object. ```go report, err := client.EventReports.SummaryByAvailabilityReason("eventKey") ``` -------------------------------- ### JSON Request Body Examples Source: https://docs.seats.io/docs/api/book-objects Payload examples for the booking request, demonstrating minimal requests, held seats, and mixed ticket type structures. ```JSON { "objects": ["A-3", "A-5"] } { "objects": ["A-3", "A-5"], "holdToken": "wvXbB9MlHt" } { "objects": [ {"objectId": "A-1", "ticketType": "adult"}, {"objectId": "A-2", "ticketType": "child"} ] } ``` -------------------------------- ### Get Chart Reports by Object Type (Javascript) Source: https://docs.seats.io/docs/api/chart-reports/detail This Javascript code example shows how to fetch chart reports by object type using the Seats.io client library. It includes examples for both basic retrieval and passing optional parameters. ```Javascript await client.chartReports.byObjectType('chartKey'); await client.chartReports.byObjectType('chartKey', 'chart', 'draft'); ``` -------------------------------- ### GET Request for Usage Report Source: https://docs.seats.io/docs/api/usage-report-all-months This snippet shows the GET request format for the /reports/usage endpoint. It is used to retrieve a report of used seats aggregated per month. No specific input parameters are shown in this example, but authentication with a company admin key is required. ```http GET /reports/usage?version=2 ``` -------------------------------- ### List Workspaces (cURL) Source: https://docs.seats.io/docs/api/workspaces-list cURL command to list workspaces with pagination. This example shows how to set a limit and start after a specific ID. ```bash curl https://api-{region}.seatsio.net/workspaces?limit=100&start_after_id=34 \ -u anAdminKey: ``` -------------------------------- ### Fetch Detailed Report by Channel (Go) Source: https://docs.seats.io/docs/api/events-reports/detail This Go code example illustrates fetching detailed event reports by channel using the Seats.io Go SDK. It shows how to retrieve reports for all channels and specific channels, including handling potential errors. ```Go report, err := client.EventReports.ByChannel("eventKey") items, err := client.EventReports.BySpecificChannel("eventKey", "channel1") items, err := client.EventReports.BySpecificChannel("eventKey", reports.NoChannel) ``` -------------------------------- ### Fetch Detailed Report by Channel (Python) Source: https://docs.seats.io/docs/api/events-reports/detail This Python example demonstrates generating detailed reports by channel with the Seats.io Python client. It includes calls to retrieve reports for all channels, a specific channel, and objects without a channel. ```Python client.events.reports.by_channel("eventKey") client.events.reports.by_channel("eventKey", "channelKey1") client.events.reports.by_channel("eventKey", "NO_CHANNEL") ``` -------------------------------- ### Get Summary Report by Availability Reason (Python) Source: https://docs.seats.io/docs/api/events-reports/summary This Python code example shows how to get a summary report by availability reason for an event using the seatsio client. It calls the `summary_by_availability_reason` method within the `events.reports` module, providing the event key. ```python client.events.reports.summary_by_availability_reason("event34") ``` -------------------------------- ### Initialize Seats.io Client SDKs Source: https://docs.seats.io/docs/api/authentication Demonstrates how to instantiate the Seats.io client across different programming languages. Shows patterns for workspace-specific operations and global administrative tasks. ```ruby client = Seatsio::Client.new(Seatsio::Region.EU(), "my-company-admin-key", "my-workspace-public-key") ``` ```javascript import { SeatsioClient, Region } from 'seatsio'; // Workspace specific let client1 = new SeatsioClient(Region.EU(), ''); // Global admin let client2 = new SeatsioClient(Region.EU(), ''); // Combined let client3 = new SeatsioClient(Region.EU(), '', ''); ``` ```go import "github.com/seatsio/seatsio-go" // Workspace specific client := seatsio.NewSeatsioClient(seatsio.EU, "") // Global admin client := seatsio.NewSeatsioClient(seatsio.EU, "") // Combined client := seatsio.NewSeatsioClient(seatsio.EU, "", seatsio.ClientSupport.WorkspaceKey("")) ``` -------------------------------- ### Remove Ticket Buyer IDs - C# Source: https://docs.seats.io/docs/api/remove-ticket-buyer-ids Example of removing ticket buyer IDs using the seats.io C# client library. This function takes an array of Guid objects. ```C# var ticketBuyerId1 = Guid.NewGuid(); var ticketBuyerId2 = Guid.NewGuid(); var ticketBuyerId3 = Guid.NewGuid(); var response = await Client.TicketBuyers.RemoveAsync(new[] {ticketBuyerId1, ticketBuyerId2, ticketBuyerId3}); ``` -------------------------------- ### List Workspaces (Go) Source: https://docs.seats.io/docs/api/workspaces-list Go examples for listing active, inactive, and all workspaces with pagination. Uses the seatsio-go library. Supports filtering and various pagination methods. ```go // active and inactive workspaces page, err := client.Workspaces.ListFirstPage(workspaces.Active, ) page, err := client.Workspaces.ListPageAfter(afterId, workspaces.All, ) page, err := client.Workspaces.ListPageBefore(beforeId, workspaces.Inactive, ) Workspaces, err := client.Workspaces.ListAll(workspaces.Active, ) ``` -------------------------------- ### Retrieve Chart Report by Zone (cURL) Source: https://docs.seats.io/docs/api/chart-reports/detail This example shows how to retrieve a chart report by zone using cURL. It demonstrates making a GET request to the API endpoint with basic authentication. ```bash curl https://api-{region}.seatsio.net/reports/charts/d2aaasb4-e192-454a-9752-e5f1cb479421/byZone -u aSecretKey: ``` -------------------------------- ### Initialize and Access Seating Chart Source: https://docs.seats.io/docs/renderer/rendered-chart-methods Demonstrates the basic initialization of a SeatingChart instance and how to capture the returned object for further interaction. ```javascript var chart = new seatsio.SeatingChart({...}).render(); console.log(chart); ``` -------------------------------- ### Fetch Detailed Report by Channel (C#) Source: https://docs.seats.io/docs/api/events-reports/detail This C# code example illustrates fetching detailed event reports by channel using the Seats.io C# SDK. It includes methods for retrieving reports for all channels, a specific channel, and unassigned objects. ```C# await Client.EventReports.ByChannelAsync("eventKey"); await Client.EventReports.ByChannelAsync("eventKey", "channelKey1"); await Client.EventReports.ByChannelAsync("eventKey", EventObjectInfo.NoChannel); ``` -------------------------------- ### Retrieve Chart Report by Zone (REST API) Source: https://docs.seats.io/docs/api/chart-reports/detail This snippet shows how to make a GET request to the Seats.io API to retrieve a chart report organized by zone. It includes an example with optional parameters for specifying the book whole tables mode and version. ```http GET https://api-{region}.seatsio.net/reports/charts/{chartKey}/byZone GET https://api-{region}.seatsio.net/reports/charts/{chartKey}/byZone?bookWholeTables=chart&version=draft ``` -------------------------------- ### Get Chart Reports by Object Type (Python) Source: https://docs.seats.io/docs/api/chart-reports/detail This Python code example shows how to fetch chart reports by object type using the Seats.io client library. It covers the basic request and how to pass optional parameters for table booking and version. ```Python client.charts.reports.by_object_type("d2aaasb4-e192-454a-9752-e5f1cb479421") client.charts.reports.by_object_type("d2aaasb4-e192-454a-9752-e5f1cb479421", "chart", "draft") ``` -------------------------------- ### Simple Pricing Object Example Source: https://docs.seats.io/docs/renderer/object-properties-objectpricing Demonstrates the structure of a single pricing object, including ticket type, price, formatted price, original price, and formatted original price. This format is used when a single price point is relevant. ```json { "ticketType": "normal", "price": 20, "formattedPrice": "$20", "originalPrice": 30, "formattedOriginalPrice": "$30" } ``` -------------------------------- ### Create Test and Production Workspace in Go Source: https://docs.seats.io/docs/api/workspaces-create Examples of creating test and production workspaces using the Seats.io Go client library. These methods allow for explicit creation of either type of workspace. ```go workspace, err := client.Workspaces.CreateTestWorkspace("a workspace") workspace, err := client.Workspaces.CreateProductionWorkspace("a workspace") ``` -------------------------------- ### Initialize Seating Chart with Simple Pricing Source: https://docs.seats.io/docs/renderer/config-pricing-prices Demonstrates initializing the Seats.io SeatingChart with a custom price formatter and simple category pricing. Requires an HTML container element. ```javascript var chart = new seatsio.SeatingChart({ divId: "chart", workspaceKey: "publicDemoKey", event: "smallTheatreEvent", pricing: { priceFormatter: function(price) { return '$' + price; }, prices: [ {'category': 1, 'price': 30}, {'category': 2, 'price': 40}, {'category': 3, 'price': 50} ]} }).render(); ``` ```html
``` -------------------------------- ### Get Chart Reports by Object Type (C#) Source: https://docs.seats.io/docs/api/chart-reports/detail This C# code demonstrates fetching chart reports by object type using the Seats.io client library. It includes examples for basic retrieval and specifying options like bookWholeTables and version using an enum. ```C# await Client.ChartReports.ByObjectTypeAsync("d2aaasb4-e192-454a-9752-e5f1cb479421"); await Client.ChartReports.ByObjectTypeAsync("d2aaasb4-e192-454a-9752-e5f1cb479421", "chart", ChartReports.Version.Draft); ``` -------------------------------- ### Get Chart Reports by Category Label (Ruby) Source: https://docs.seats.io/docs/api/chart-reports/detail This Ruby code snippet demonstrates how to obtain chart reports grouped by category label via the seats.io client. It provides examples for both a basic call and one specifying book-whole-tables mode and chart version. ```Ruby client.chart_reports.by_category_label("d2aaasb4-e192-454a-9752-e5f1cb479421") client.chart_reports.by_category_label("d2aaasb4-e192-454a-9752-e5f1cb479421", "chart", "draft") ``` -------------------------------- ### Get Chart Reports by Category Label (Java) Source: https://docs.seats.io/docs/api/chart-reports/detail This Java code snippet shows how to retrieve chart reports grouped by category label using the seats.io client. It includes examples for a basic call and one with options for book-whole-tables mode and chart version. ```Java client.chartReports.byCategoryLabel("d2aaasb4-e192-454a-9752-e5f1cb479421"); client.chartReports.byCategoryLabel("d2aaasb4-e192-454a-9752-e5f1cb479421", new ChartReportOptions().bookWholeTablesMode(ChartReportBookWholeTablesMode.CHART).version(ChartReportVersion.DRAFT)); ``` -------------------------------- ### Java: Managing Event Object Status, Booking, and Holding Source: https://docs.seats.io/docs/api/best-available Illustrates the usage of the Seats.io Java client for managing event objects. Code examples cover changing status, booking, and holding best available seats with category and status specifications. ```Java client.events.changeObjectStatus( "event1", new BestAvailable(10, List.of("balcony", "stalls")), "myCustomStatus" ); client.events.book( "event1", new BestAvailable(10, List.of("balcony", "stalls")) ); client.events.hold( "event1", new BestAvailable(10, List.of("balcony", "stalls")), holdToken ); ``` -------------------------------- ### Fetch Detailed Report by Channel (JavaScript) Source: https://docs.seats.io/docs/api/events-reports/detail This JavaScript example demonstrates fetching detailed event reports by channel using the Seats.io JavaScript client. It includes methods for retrieving reports for all channels, a specific channel, and unassigned objects. ```JavaScript await client.eventReports.byChannel('eventKey') await client.eventReports.byChannel('eventKey', 'channel1') await client.eventReports.byChannel('eventKey', 'NO_CHANNEL') ``` -------------------------------- ### Get Chart Reports by Category Label (PHP) Source: https://docs.seats.io/docs/api/chart-reports/detail This PHP code snippet shows how to use the seats.io client library to fetch chart reports categorized by label. It includes examples for both the default call and one with specific book-whole-tables mode and chart version. ```PHP $seatsioClient->chartReports->byCategoryLabel("d2aaasb4-e192-454a-9752-e5f1cb479421"); $seatsioClient->chartReports->byCategoryLabel("d2aaasb4-e192-454a-9752-e5f1cb479421", "chart", "draft"); ``` -------------------------------- ### Create an Event using Seats.io SDKs Source: https://docs.seats.io/docs/api/create-an-event Demonstrates how to create an event by linking it to a chart key, with options to specify an event key or a custom table booking configuration. The examples cover multiple programming languages including PHP, C#, Java, Python, Ruby, Javascript, and Go. ```PHP $seatsioClient->events->create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", CreateEventParams::create()->setKey("event34")); $seatsioClient->events->create( "4250fffc-e41f-c7cb-986a-2c5e728b8c28", CreateEventParams::create()->setTableBookingConfig(TableBookingConfig::custom(["T1" => "BY_TABLE", "T2" => "BY_SEAT"])) ); ``` ```C# await Client.Events.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28", "event34"); await Client.Events.CreateAsync( "4250fffc-e41f-c7cb-986a-2c5e728b8c28", new CreateEventParams().WithTableBookingConfig(new Dictionary {{"T1", "BY_TABLE"}, {"T2", "BY_SEAT"}}) ); ``` ```Java client.events.create( "4250fffc-e41f-c7cb-986a-2c5e728b8c28", new CreateEventParams().withKey("event34") ); client.events.create( "4250fffc-e41f-c7cb-986a-2c5e728b8c28", new CreateEventParams().withTableBookingConfig(TableBookingConfig.custom(Map.of("T1", BY_TABLE, "T2", BY_SEAT))) ); ``` ```Python client.events.create("749b9650-24fb-11e7-93ae-92361f002671", event_key="event34") client.events.create("749b9650-24fb-11e7-93ae-92361f002671", table_booking_config=TableBookingConfig.custom({"T1": "BY_TABLE", "T2": "BY_SEAT"})) ``` ```Ruby client.events.create key: "749b9650-24fb-11e7-93ae-92361f002671", event_key: "event34" client.events.create key: "749b9650-24fb-11e7-93ae-92361f002671", table_booking_config: Seatsio::TableBookingConfig::custom({'T1' => 'BY_TABLE', 'T2' => 'BY_SEAT'}) ``` ```Javascript await client.events.create( 'chartKey', new CreateEventParams().withKey('eventKey') ) await client.events.create( 'chartKey', new CreateEventParams().withTableBookingConfig( TableBookingConfig.custom({ T1: 'BY_TABLE', T2: 'BY_SEAT' }) ) ) ``` ```Go event, err := client.Events.Create(&events.CreateEventParams{ChartKey: "chartKey", EventParams: &events.EventParams{EventKey: "eventKey"}}) event, err := client.Events.Create(&events.CreateEventParams{ ChartKey: "chartKey", EventParams: &events.EventParams{TableBookingConfig: &events.TableBookingConfig{Tables: map[string]events.TableBookingMode{ "T1": events.BY_TABLE, "T2": events.BY_SEAT, }}}, }) ``` -------------------------------- ### Get Summary Report by Availability Reason (C#) Source: https://docs.seats.io/docs/api/events-reports/summary This C# code example shows how to obtain a summary report by availability reason for an event using the seatsio client library. It utilizes an asynchronous method `SummaryByAvailabilityReasonAsync` on the `EventReports` client, requiring the event key. ```csharp await Client.EventReports.SummaryByAvailabilityReasonAsync("event34"); ``` -------------------------------- ### Create a Chart using Seats.io SDKs Source: https://docs.seats.io/docs/api/create-a-chart Demonstrates how to initialize categories and create a new chart with a specific venue type using various programming languages. These methods interact with the Seats.io client libraries to send chart configuration data to the server. ```PHP $cat1 = ['key' => 1, 'label' => 'Category 1', 'color' => '#aaaaaa']; $cat2 = ['key' => 2, 'label' => 'Category 2', 'color' => '#bbbbbb']; $seatsioClient->charts->create("my chart", "SIMPLE", [$cat1, $cat2]); ``` ```C# var category1 = new Category(1, "Category 1", "#aaaaaa"); var category2 = new Category(2, "Category 2", "#bbbbbb"); var drawing = await Client.Charts.CreateAsync("my chart", "SIMPLE", new [] { category1, category2 }); ``` ```Java Category category1 = new Category(1, "Category 1", "#aaaaaa"); Category category2 = new Category(2, "Category 2", "#bbbbbb"); client.charts.create("my chart", "SIMPLE", List.of(category1, category2)); ``` ```Python client.charts.create( categories=[ {"key": 1, "label": "Category 1", "color": "#aaaaaa"}, {"key": 2, "label": "Category 2", "color": "#bbbbbb"} ]) ``` ```Ruby categories = [ {"key": 1, "label": "Category 1", "color": "#aaaaaa"}, {"key": 2, "label": "Category 2", "color": "#bbbbbb"} ] client.charts.create categories: categories ``` ```Javascript let cat1 = {'key': 1, 'label': 'Category 1', 'color': '#aaaaaa'}; let cat2 = {'key': 2, 'label': 'Category 2', 'color': '#bbbbbb'}; await client.charts.create('my chart', 'SIMPLE', [cat1, cat2]); ``` ```Go category1 := events.Category{Key: events.CategoryKey{Key: 1}, Label: "Category 1", Color: "#aaaaaa"} category2 := events.Category{Key: events.CategoryKey{Key: "anotherCat"}, Label: "Category 2", Color: "#bbbbbb"} categories := []events.Category{category1, category2} chart, err := client.Charts.Create(&charts.CreateChartParams{ Name: "My chart", VenueType: "SIMPLE", Categories: categories }) ``` -------------------------------- ### Get Chart Reports by Category Label (JavaScript) Source: https://docs.seats.io/docs/api/chart-reports/detail This JavaScript code snippet shows how to fetch chart reports organized by category label using the seats.io client library. It includes examples for asynchronous calls with and without optional parameters for book-whole-tables mode and chart version. ```JavaScript await client.chartReports.byCategoryLabel('chartKey'); await client.chartReports.byCategoryLabel('chartKey', 'chart', 'draft'); ``` -------------------------------- ### Discard Draft Chart Version using Seats.io Client Libraries Source: https://docs.seats.io/docs/api/discard-a-draft-version Code examples for discarding a draft chart version using the Seats.io client libraries in PHP, C#, Java, Python, Ruby, and Go. Ensure you have the Seats.io client library installed and configured with your secret key. ```php $seatsioClient->charts->discardDraftVersion("4250fffc-e41f-c7cb-986a-2c5e728b8c28"); ``` ```csharp await Client.Charts.DiscardDraftVersionAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28"); ``` ```java client.charts.discardDraftVersion("4250fffc-e41f-c7cb-986a-2c5e728b8c28"); ``` ```python client.charts.discard_draft_version("4250fffc-e41f-c7cb-986a-2c5e728b8c28") ``` ```ruby client.charts.discard_draft_version("4250fffc-e41f-c7cb-986a-2c5e728b8c28") ``` ```javascript await client.charts.discardDraftVersion('chartKey'); ``` ```go err := client.Charts.DiscardDraftVersion("chartKey") ``` -------------------------------- ### Ruby: Managing Event Object Status, Booking, and Holding Source: https://docs.seats.io/docs/api/best-available Shows how to use the Seats.io Ruby client to perform event management actions. Code examples cover changing best available object status, booking, and holding seats, including specifying categories and custom statuses. ```Ruby client.events.change_best_available_object_status 'event1', 10, nil, categories: ['balcony', 'stalls'], status: 'myCustomStatus' client.events.book_best_available 'event1', 10, categories: ['balcony', 'stalls'] client.events.hold_best_available 'event1', 10, holdToken, categories: ['balcony', 'stalls'] ``` -------------------------------- ### Create Partial Season in C# Source: https://docs.seats.io/docs/api/create-partial-season Examples of creating a partial season using the Seats.io C# client library. Shows how to create a partial season with and without a partial season key, and with specific event keys. ```csharp await Client.Seasons.CreatePartialSeasonAsync("aTopLevelSeason"); await Client.Seasons.CreatePartialSeasonAsync("aTopLevelSeason", partialSeasonKey: "aPartialSeason"); await Client.Seasons.CreatePartialSeasonAsync("aTopLevelSeason", eventKeys: new[] {"event1", "event2"}); ``` -------------------------------- ### GET /reports/events/{eventKey}/byLabel Source: https://docs.seats.io/docs/api/events-reports/detail Generates a report for all objects within a specified event, grouped by their labels. This is useful for getting an overview of all items and their statuses. ```APIDOC ## GET /reports/events/{eventKey}/byLabel ### Description Generates a report for all objects within a specified event, grouped by their labels. This is useful for getting an overview of all items and their statuses. ### Method GET ### Endpoint `/reports/events/{eventKey}/byLabel` ### Parameters #### Path Parameters - **eventKey** (string) - Required - The key of the event to generate the report for. #### Query Parameters None ### Request Example ```bash curl https://api-{region}.seatsio.net/reports/events/event34/byLabel -u aSecretKey: ``` ### Response #### Success Response (200) - **object** (object) - A JSON object where keys are labels and values are arrays of objects matching that label. - **label** (string) - The label of the object. - **labels** (object) - Contains own and parent labels. - **ids** (object) - Contains own and parent IDs. - **status** (string) - The current status of the object (e.g., 'free', 'booked'). - **categoryLabel** (string) - The label of the category the object belongs to. - **categoryKey** (string) - The key of the category the object belongs to. - **ticketType** (string) - The type of ticket associated with the object. - **section** (string) - The section the object is in. - **orderId** (string) - The ID of the order associated with the object. - **forSale** (boolean) - Indicates if the object is currently for sale. - **objectType** (string) - The type of the object (e.g., 'seat'). - **isAccessible** (boolean) - Indicates if the object is accessible. - **isCompanionSeat** (boolean) - Indicates if the object is a companion seat. - **hasLiftUpArmrests** (boolean) - Indicates if the object has lift-up armrests. - **isHearingImpaired** (boolean) - Indicates if the object is suitable for hearing-impaired individuals. - **isSemiAmbulatorySeat** (boolean) - Indicates if the object is a semi-ambulatory seat. - **hasSignLanguageInterpretation** (boolean) - Indicates if sign language interpretation is available for the object. - **isPlusSize** (boolean) - Indicates if the object is a plus-size seat. - **hasRestrictedView** (boolean) - Indicates if the object has a restricted view. - **leftNeighbour** (string) - The label of the left neighboring object. - **rightNeighbour** (string) - The label of the right neighboring object. - **isAvailable** (boolean) - Indicates if the object is currently available. - **availabilityReason** (string) - The reason for the object's availability status. - **channel** (string) - The sales channel associated with the object. - **distanceToFocalPoint** (number) - The distance to the focal point. - **seasonStatusOverriddenQuantity** (integer) - The quantity for which the season status has been overridden. - **floor** (object) - Information about the floor the object is on. #### Response Example ```json { "C-11": [ { "label": "C-11", "labels": { "own": { "label": "11", "type": "seat" }, "parent": { "label": "Row C", "type": "row" } "section": "Section 1" }, "ids": { "own": "11", "parent": "C" }, "status": "free", "categoryLabel": "Ground Floor", "categoryKey": "1", "entrance": "Main entrance", "ticketType": "adult", "section": "Section 1", "orderId": "order1", "forSale": true, "objectType": "seat", "isAccessible": true, "isCompanionSeat": false, "hasLiftUpArmrests": false, "isHearingImpaired": false, "isSemiAmbulatorySeat": false, "hasSignLanguageInterpretation": false, "isPlusSize": false, "hasRestrictedView": false, "leftNeighbour": "C-10", "rightNeighbour": "C-12", "isAvailable": true, "availabilityReason": "available", "channel": "channel1", "distanceToFocalPoint": 84.3242, "seasonStatusOverriddenQuantity": 0, "floor": { "name": "1", "displayName": "Ground Floor" } } ], "C-35": [ { "label": "C-35", "labels": { "own": { "label": "35", "type": "seat" }, "parent": { "label": "Row C", "type": "row" } }, "ids": { "own": "35", "parent": "C" }, "status": "reservedByToken", "categoryLabel": "Balcony", "categoryKey": "5", "extraData": {"userId": "123"}, "holdToken": "wvXbB9MlHt", "forSale": true, "objectType": "seat", "isAccessible": true, "isCompanionSeat": false, "hasLiftUpArmrests": false, "isHearingImpaired": false, "isSemiAmbulatorySeat": false, "hasSignLanguageInterpretation": false, "isPlusSize": false, "hasRestrictedView": false, "leftNeighbour": "C-34", "rightNeighbour": "C-36", "isAvailable": false, "availabilityReason": "booked", "channel": "channel1", "distanceToFocalPoint": 62.923, "seasonStatusOverriddenQuantity": 0, "floor": { "name": "1", "displayName": "Ground Floor" } } ] } ``` ``` -------------------------------- ### Create Workspace in PHP Source: https://docs.seats.io/docs/api/workspaces-create Example of creating a workspace using the Seats.io PHP client library. This code initializes the client and calls the create method with the workspace name. ```php $seatsioClient->workspaces->create("a workspace"); ``` -------------------------------- ### List Workspaces (Ruby) Source: https://docs.seats.io/docs/api/workspaces-list Ruby examples for listing active, inactive, and all workspaces with pagination. Uses the seatsio-ruby library. Supports filtering and various pagination methods. ```ruby # active and inactive workspaces client.workspaces.list(filter?).first_page(page_size?) client.workspaces.list(filter?).page_after(after_id, page_size?) client.workspaces.list(filter?).page_before(before_id, page_size?) client.workspaces.list(filter?) # active workspaces client.workspaces.active(filter?).first_page(page_size?) client.workspaces.active(filter?).page_after(after_id, page_size?) client.workspaces.active(filter?).page_before(before_id, page_size?) client.workspaces.active(filter?) # inactive workspaces client.workspaces.inactive(filter?).first_page(page_size?) client.workspaces.inactive(filter?).page_after(after_id, page_size?) client.workspaces.inactive(filter?).page_before(before_id, page_size?) client.workspaces.inactive(filter?) ``` -------------------------------- ### Create Partial Season in Go Source: https://docs.seats.io/docs/api/create-partial-season Examples of creating a partial season using the Seats.io Go client library. Shows how to create a partial season with and without options, including partial season key and event keys. ```go partialSeason, err := client.Seasons.CreatePartialSeason("aTopLevelSeason") partialSeason, err := client.Seasons.CreatePartialSeasonWithOptions( "aTopLevelSeason", &seasons.CreatePartialSeasonParams{Key: "aPartialSeason"}, ) partialSeason, err := client.Seasons.CreatePartialSeasonWithOptions( "aTopLevelSeason", &seasons.CreatePartialSeasonParams{EventKeys: []string{"event1", "event3"}}, ) ``` -------------------------------- ### Migrate Pricing Configuration (JavaScript) Source: https://docs.seats.io/docs/renderer/config-pricing Demonstrates the migration of a legacy pricing configuration to the new object-based format. This involves restructuring the 'pricing' array and moving 'priceFormatter' and 'showSectionPricingOverlay' into the 'pricing' object. ```javascript // From: config = { // ...other config properties, showSectionPricingOverlay: true, priceFormatter: (price) => price + '€', pricing: [ { category: 'Ground Floor', price: 35 }, { category: ''} ] } // To: config = { // ...other config properties, pricing: { showSectionPricingOverlay: true, priceFormatter: (price) => price + '€', prices: [ { category: 'Ground Floor', price: 35 }, { category: ''} ] } } ``` -------------------------------- ### Create Workspace in Java Source: https://docs.seats.io/docs/api/workspaces-create Example of creating a workspace using the Seats.io Java client library. This code demonstrates calling the create method on the workspaces client. ```java client.workspaces.create("a workspace"); ``` -------------------------------- ### GET /reports/charts/{chartKey}/byLabel Source: https://docs.seats.io/docs/api/chart-reports/detail Retrieves a report of chart objects grouped by their labels. This is useful for getting a consolidated view of objects based on their display names. ```APIDOC ## GET /reports/charts/{chartKey}/byLabel ### Description Retrieves a report of chart objects grouped by their labels. Multiple objects can share the same label, so they are returned as an array. ### Method GET ### Endpoint `/reports/charts/{chartKey}/byLabel` ### Parameters #### Path Parameters - **chartKey** (string) - Required - The key of the chart to retrieve the report for. #### Query Parameters - **bookWholeTables** (string) - Optional - Specifies how to handle whole tables. Possible values include 'chart'. - **version** (string) - Optional - The version of the chart to use. Possible values include 'draft'. ### Request Example ```bash curl https://api-{region}.seatsio.net/reports/charts/d2aaasb4-e192-454a-9752-e5f1cb479421/byLabel -u aSecretKey: ``` ### Response #### Success Response (200) - **object** (object) - A map where keys are labels and values are arrays of chart objects. - **label** (string) - The label of the object. - **labels** (object) - Contains different label representations. - **own** (object) - The object's own label and type. - **parent** (object) - The parent object's label and type. - **section** (string) - The section the object belongs to. - **ids** (object) - Contains different ID representations. - **own** (string) - The object's own ID. - **parent** (string) - The parent object's ID. - **section** (string) - The section ID. - **categoryLabel** (string) - The display name of the category. - **categoryKey** (string) - The key of the category. - **entrance** (string) - The entrance associated with the object (if applicable). - **section** (string) - The section name. - **objectType** (string) - The type of the object (e.g., 'seat'). - **leftNeighbour** (string) - The label of the left neighboring object. - **rightNeighbour** (string) - The label of the right neighboring object. - **distanceToFocalPoint** (number) - Distance to the focal point. - **isAccessible** (boolean) - Indicates if the object is accessible. - **isCompanionSeat** (boolean) - Indicates if it's a companion seat. - **hasLiftUpArmrests** (boolean) - Indicates if lift-up armrests are available. - **isHearingImpaired** (boolean) - Indicates if the object is suitable for hearing-impaired individuals. - **isSemiAmbulatorySeat** (boolean) - Indicates if it's a semi-ambulatory seat. - **hasSignLanguageInterpretation** (boolean) - Indicates if sign language interpretation is available. - **isPlusSize** (boolean) - Indicates if it's a plus-size object. - **hasRestrictedView** (boolean) - Indicates if the object has a restricted view. - **floor** (object) - Information about the floor. - **name** (string) - The floor's name. - **displayName** (string) - The floor's display name. #### Response Example ```json { "SEC A-C-11": [ { "label": "SEC A-C-11", "labels": { "own": { "label": "11", "type": "seat" }, "parent": { "label": "Row C", "type": "row" }, "section": "Section A" }, "ids": { "own": "11", "parent": "C", "section": "SEC A" }, "categoryLabel": "Ground Floor", "categoryKey": "1", "entrance": "Main entrance", "section": "Section 1", "objectType": "seat", "leftNeighbour": "SEC A-C-10", "rightNeighbour": "SEC A-C-12", "distanceToFocalPoint": 10.3245, "isAccessible": true, "isCompanionSeat": false, "hasLiftUpArmrests": false, "isHearingImpaired": false, "isSemiAmbulatorySeat": false, "hasSignLanguageInterpretation": false, "isPlusSize": false, "hasRestrictedView": false, "floor": { "name": "1", "displayName": "Ground Floor" } } ], "SEC A-C-35": [ { "label": "SEC A-C-35", "labels": { "own": { "label": "35", "type": "seat" }, "parent": { "label": "Row C", "type": "row" }, "section": "Section A" }, "ids": { "own": "35", "parent": "C", "section": "SEC A" }, "categoryLabel": "Balcony", "categoryKey": "5", "objectType": "seat", "leftNeighbour": "SEC A-C-34", "rightNeighbour": "SEC A-C-36", "distanceToFocalPoint": 12.878, "isAccessible": true, "isCompanionSeat": false, "hasLiftUpArmrests": false, "isHearingImpaired": false, "isSemiAmbulatorySeat": false, "hasSignLanguageInterpretation": false, "isPlusSize": false, "hasRestrictedView": false, "floor": { "name": "1", "displayName": "Ground Floor" } } ] } ``` ``` -------------------------------- ### Create Workspace in C# Source: https://docs.seats.io/docs/api/workspaces-create Example of creating a workspace using the Seats.io C# client library. This code uses an asynchronous method to create the workspace with the provided name. ```csharp await Client.Workspaces.CreateAsync("a workspace"); ``` -------------------------------- ### Example cURL Request for Event Update Source: https://docs.seats.io/docs/api/update-an-event An example cURL command to update an event using the Seats.io API. This demonstrates the HTTP method, endpoint, headers, and data payload for the request. ```bash curl https://api-{region}.seatsio.net/events/event34 \ -u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"eventKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28"}' ``` -------------------------------- ### List Workspaces (Python) Source: https://docs.seats.io/docs/api/workspaces-list Python examples for listing active, inactive, and all workspaces with pagination. Uses the seatsio-python library. Supports filtering and various pagination methods. ```python # active workspaces client.workspaces.active.first_page(page_size?, filter?) client.workspaces.active.page_after(after_id, page_size?, filter?) client.workspaces.active.page_before(before_id, page_size?, filter?) client.workspaces.active.list(filter?) # inactive workspaces client.workspaces.inactive.first_page(page_size?, filter?) client.workspaces.inactive.page_after(after_id, page_size?, filter?) client.workspaces.inactive.page_before(before_id, page_size?, filter?) client.workspaces.inactive.list(filter?) # active and inactive workspaces client.workspaces.list(filter?).first_page(page_size?) client.workspaces.list(filter?).page_after(after_id, page_size?) client.workspaces.list(filter?).page_before(before_id, page_size?) client.workspaces.list(filter?) ``` -------------------------------- ### confirmSelection Function Example - JavaScript Source: https://docs.seats.io/docs/renderer/prompts-api/onPlacesPrompt An example of how to use the `confirmSelection` function within the onPlacesPrompt callback. This function should be called after the user has made their selection in a custom dialog to confirm the number of places. ```javascript confirmSelection(5) ```