openapi: 3.0.0
info:
  title: Seating
  version: "2023"
  description: The Seating service enables OneBasket to model the seating plans
    for the venues of a given store. This allows API consumers to drill down
    through Stadium seating heirachies, and discover relationships between seats
    and other entities in a stadium, such as Kiosks. This drives features such
    as seat lookups and finding the closest available Kiosks that your seat is
    able to access in order to purchase F&B.
tags:
  - name: Query
paths:
  /seating/roots:
    get:
      tags:
        - Query
      operationId: Queries_getRoots
      summary: Get root seating levels
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.pageSize"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.page"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Models.RootSeatingLevelDto"
                    description: The results for the current page
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
  /seating/search:
    post:
      tags:
        - Query
      operationId: Queries_searchSeating
      summary: Search for seating levels
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.pageSize"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.page"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Models.SeatingLevelDto"
                    description: The results for the current page
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Models.SearchSeatingLevelRequest"
  /seating/{id}:
    get:
      tags:
        - Query
      operationId: Queries_getById
      summary: Get a seating level by id
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Models.SeatingLevelDto"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
  /seating/{id}/children:
    get:
      tags:
        - Query
      operationId: Queries_getChildren
      summary: Get children of a seating level
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.pageSize"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.page"
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Models.ChildSeatingLevelDto"
                    description: The results for the current page
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
components:
  parameters:
    OneBasket.Rest.PagedRequest.page:
      name: page
      in: query
      required: false
      description: The page of results to return
      schema:
        type: integer
        default: 1
    OneBasket.Rest.PagedRequest.pageSize:
      name: pageSize
      in: query
      required: false
      description: The number of results per page
      schema:
        type: integer
        default: 25
    StoreFrontRequest:
      name: x-api-key
      in: header
      required: true
      description: OneBasket API Key
      schema:
        type: string
        format: password
  schemas:
    Models.BaseSeatingLevelDto:
      type: object
      properties:
        id:
          type: string
          description: The id for the seating level
        parentId:
          type: string
          description: The parent of the seating level
        name:
          type: string
          description: The name of the seating level
        tags:
          type: object
          additionalProperties: {}
          description: The tags of the seating level
        isRoot:
          type: boolean
          description: If true the seating level is a root level with no parents
        kiosks:
          type: array
          items:
            type: string
          description: The Kiosks accessible from the seating level
      description: The base model of all seating levels
      required:
        - id
        - parentId
        - name
        - tags
        - isRoot
        - kiosks
    Models.ChildSeatingLevelDto:
      type: object
      properties: {}
      description: A child level node of the seating level hierarchy
      allOf:
        - $ref: "#/components/schemas/Models.BaseSeatingLevelDto"
    Models.RootSeatingLevelDto:
      type: object
      properties: {}
      description: The root level node of the seating level hierarchy
      allOf:
        - $ref: "#/components/schemas/Models.BaseSeatingLevelDto"
    Models.SearchSeatingLevelRequest:
      type: object
      properties:
        parentId:
          type: string
          description: The parent of the seating level
        hasTagValues:
          type: object
          additionalProperties:
            type: string
          description: The tag values to search for
        hasTags:
          type: array
          items:
            type: string
          description: The tag flags to search for
      description: The model to send when searching for seating levels
    Models.SeatingLevelDto:
      type: object
      properties:
        parents:
          type: array
          items:
            $ref: "#/components/schemas/Models.SeatingLevelParentDto"
          description: The parent levels of the seating level
        childCount:
          type: integer
          description: The count of children this level has
        depth:
          type: integer
          description: The depth of the seating level in the hierarchy
        hasChildren:
          type: boolean
          description: If true the seating level has children
      description: A seating level allows traversal of its children and parents
      required:
        - parents
        - childCount
        - depth
        - hasChildren
      allOf:
        - $ref: "#/components/schemas/Models.BaseSeatingLevelDto"
    Models.SeatingLevelParentDto:
      type: object
      properties:
        parentLevel:
          type: integer
          description: The level of the parent between the child and root levels
      description: A parent level node exposes its level in the hierarchy
      required:
        - parentLevel
      allOf:
        - $ref: "#/components/schemas/Models.BaseSeatingLevelDto"
    OneBasket.Rest.BadRequestProblem:
      type: object
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          enum:
            - Bad request
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 400
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
        errors:
          type: object
          additionalProperties:
            type: object
            properties: {}
      description: The response model when the request is invalid
      required:
        - errors
      allOf:
        - type: object
          properties: {}
          description: ""
    OneBasket.Rest.NotFoundProblem:
      type: object
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          enum:
            - Not Found
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 404
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
      description: The response model when the requested resource is not found
      allOf:
        - type: object
          properties: {}
          description: ""
    OneBasket.Rest.UnauthorizedProblem:
      type: object
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          enum:
            - Unauthorized
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 401
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
      description: The response model when the request is unauthorized
      allOf:
        - type: object
          properties: {}
          description: ""
servers:
  - url: https://storefrontapi.sandbox.onebasket.io
    description: Sandbox
    variables: {}
  - url: https://storefrontapi.live.onebasket.io
    description: Live
    variables: {}
