> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Section types

> The two shapes of sections returned by the stream and the Live Availability API.

Both the [real-time stream](/stream/messages) and `POST /events/scrape` describe an
event's inventory in a `sections` object whose shape is announced by `sections_type`.
There are two shapes. Write one parser for each and dispatch on the type.

| `sections_type`   | Used by                                                                               | Shape                                                          |
| ----------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| `OfferSections`   | DICE, Eventim, fansale, SeatGeek, StubHub, Ticketek, Ticketportal, TickPick, viagogo. | Flat map keyed by offer.                                       |
| `SeatMapSections` | Ticketmaster (`tm`) and AXS.                                                          | Nested map keyed by tier or section, then by section or offer. |

`GET /events/platforms` tells you which shape each platform returns.

## `OfferSections`

A flat object. Each key is an offer id or name; each value is one ticket tier.

```json theme={null}
{
  "FINAL RELEASE - Entrance Before 5pm": {
    "offer_name": "FINAL RELEASE - Entrance Before 5pm",
    "available": true,
    "price": 21.4,
    "price_label": "EUR 21.40",
    "stock": null,
    "general_admission": null,
    "atc": null
  }
}
```

| Field               | Type            | Description                                                         |
| ------------------- | --------------- | ------------------------------------------------------------------- |
| `offer_name`        | string \| null  | Display name of the tier.                                           |
| `available`         | boolean \| null | Whether the tier is currently on sale.                              |
| `price`             | number          | Price as a number.                                                  |
| `price_label`       | string          | Formatted price with currency, e.g. `EUR 21.40`.                    |
| `stock`             | integer \| null | Remaining tickets. `null` when the platform does not expose counts. |
| `general_admission` | boolean \| null | `true` for standing or GA tiers. `null` if unknown.                 |
| `atc`               | string \| null  | Direct add-to-cart link, if the platform provides one.              |

## `SeatMapSections`

A nested object. The top-level keys group offers; inside each group, `stock` is the
aggregate for the group and **every other key is a section detail object**. `stock`
is the only reserved key.

<Note>
  The two APIs group the same detail objects differently. The **stream** keys the top
  level by section id and the inner level by offer id. The **Live Availability API** keys
  the top level by offer name (ticket tier) and the inner level by venue section id.
  In both cases the leaf object has the fields below, and `section` always names the
  venue section.
</Note>

```json theme={null}
{
  "Standard Admission": {
    "stock": 3929,
    "101": {
      "offer_name": "Standard Admission",
      "price_label": "$426.40",
      "price": 426.4,
      "price_without_fees": 349.5,
      "section": "101",
      "inventory_type": "primary",
      "is_active": true,
      "stock": 67,
      "stock_not_available": 0,
      "atc": null,
      "longest_adjacent_seats": 1,
      "general_admission": false,
      "rows": null,
      "seats": null
    }
  }
}
```

| Field                    | Type            | Description                                                                                          |
| ------------------------ | --------------- | ---------------------------------------------------------------------------------------------------- |
| `offer_name`             | string          | The ticket tier this entry belongs to.                                                               |
| `price`                  | number          | Price including fees.                                                                                |
| `price_without_fees`     | number          | Face value before service fees.                                                                      |
| `price_label`            | string          | Formatted price with currency.                                                                       |
| `section`                | string          | Section identifier as shown on the venue map.                                                        |
| `inventory_type`         | string          | `primary` (box office) or `resale`.                                                                  |
| `is_active`              | boolean         | Whether this entry is currently purchasable.                                                         |
| `stock`                  | integer         | Available seats.                                                                                     |
| `stock_not_available`    | integer         | Sold or held seats.                                                                                  |
| `atc`                    | string \| null  | Direct add-to-cart link, if available.                                                               |
| `longest_adjacent_seats` | integer \| null | Longest run of consecutive available seats.                                                          |
| `general_admission`      | boolean         | `true` for standing or GA sections.                                                                  |
| `rows`                   | array \| null   | Row identifiers available, e.g. `["A", "B"]`. Live Availability only; `null` if not tracked.         |
| `seats`                  | object \| null  | Map of row to seat numbers, e.g. `{"A": ["1", "2"]}`. Live Availability only; `null` if not tracked. |

## Parsing pattern

```javascript theme={null}
function parseSections(msg) {
  switch (msg.sections_type) {
    case "OfferSections":
      return Object.entries(msg.sections).map(([id, offer]) => ({ id, ...offer }));

    case "SeatMapSections":
      return Object.entries(msg.sections).flatMap(([groupId, group]) =>
        Object.entries(group)
          .filter(([key]) => key !== "stock")
          .map(([id, detail]) => ({ group: groupId, id, ...detail }))
      );

    default:
      throw new Error(`unknown sections_type ${msg.sections_type}`);
  }
}
```

Treat both shapes as additive: a new field may appear without notice, and any field
can be `null` on platforms that do not expose it.
