openapi: 3.0.0
info:
  title: OneBasket Kiosks
  version: "2023"
  description: The Kiosks service provides modelling and management of locations
    where products can be purchased on location. Typically these products are of
    type consumable. Examples of kiosks include F&B outlets in stadiums (both
    internal on concourses and food vans outside), as well as stalls at
    festivals.
tags:
  - name: Query
paths:
  /kiosks:
    get:
      tags:
        - Query
      operationId: Queries_getKiosks
      summary: Get one or more kiosks by id
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.pageSize"
        - $ref: "#/components/parameters/OneBasket.Rest.PagedRequest.page"
        - name: id
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                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/KioskDto"
                    description: The results for the current page
        "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"
  /kiosks/{id}:
    get:
      tags:
        - Query
      operationId: Queries_getKioskById
      summary: Get a kiosk 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/KioskDto"
        "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:
    KioskDto:
      type: object
      description: A kiosk is a location where a customer can pick up their order
      required:
        - id
        - name
        - description
        - location
      properties:
        id:
          type: string
          description: The id of the kiosk
        name:
          type: string
          description: The name of the kiosk
        description:
          type: string
          description: The description of the kiosk
        location:
          type: string
          description: The location of the kiosk
    OneBasket.Rest.BadRequestProblem:
      type: object
      description: The response model when the request is invalid
      required:
        - errors
      allOf:
        - type: object
          description: ""
      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
    OneBasket.Rest.NotFoundProblem:
      type: object
      description: The response model when the requested resource is not found
      allOf:
        - type: object
          description: ""
      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.
    OneBasket.Rest.UnauthorizedProblem:
      type: object
      description: The response model when the request is unauthorized
      allOf:
        - type: object
          description: ""
      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.
servers:
  - url: https://storefrontapi.sandbox.onebasket.io
    description: Sandbox
    variables: {}
  - url: https://storefrontapi.live.onebasket.io
    description: Live
    variables: {}
