openapi: 3.1.0
info:
  title: Wunder Points-Of-Interest User API
  description: |
    Retrieve end user relevant information about Points of interest.

    Points of interest provide additional location of particular interest, which can be displayed to the user.
  version: 1.0.0
  contact:
    name: Wunder Mobility GmbH
    url: 'https://wundermobility.com'
    email: info@wundermobility.com
servers:
  - url: 'https://{environment}.api.gourban.services/v1/{tenant}/points-of-interest'
    description: Wunder Points-Of-Interest User API
    variables:
      environment:
        default: go
        enum:
          - go
          - go-staging
      tenant:
        default: demo
        description: Tenant identifier of your system. Usually 8 characters.
paths:
  /pois:
    get:
      summary: GET /pois
      operationId: getAllPointsOfInterest
      parameters:
        - name: app
          in: query
          required: true
          allowEmptyValue: true
          schema:
            type: boolean
          description: Must be set to true to request Points of Interest for user.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PoiDto'
  /categories:
    get:
      summary: GET /categories
      operationId: getAllPoiCategories
      parameters:
        - name: searchText
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PoiCategoryDto'
components:
  schemas:
    PoiCategoryDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        type:
          type: string
          enum:
            - PARKING
            - DOCKING_STATION
            - CHARGING_STATION
            - FUEL_STATION
            - TOURISTIC_SPOT
            - BUSINESS
        name:
          type: string
        displayOnRental:
          type: boolean
        enabled:
          type: boolean
        mapZoomLevel:
          type: integer
          format: int32
        sizeFactor:
          type: integer
          format: int32
        useCustomIcon:
          type: boolean
        images:
          type: string
        defaultTranslationKeys:
          type: string
        poiCount:
          type: integer
          format: int64
    Point:
      type: object
      x-stoplight:
        id: 6xzpeqt63bufx
      x-examples:
        Vienna:
          type: Point
          coordinates:
            - 16.363449
            - 48.210033
      description: Describes a single point on a coordinate system
      properties:
        type:
          type: string
          default: Point
          description: The type is always set to 'Point'
        coordinates:
          type: array
          description: 'Contains two values: `[lng,lat]`'
          items:
            type: number
            format: double
    OpeningTimeEntry:
      type: object
      properties:
        day:
          type: string
          enum:
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
            - SATURDAY
            - SUNDAY
        slotNumber:
          type: integer
          format: int32
        state:
          type: string
          enum:
            - OPEN
            - CLOSED
        time:
          type: string
          format: partial-time
        prettyString:
          type: string
    OpeningInformation:
      type: object
      properties:
        openingTimeEntries:
          type: array
          items:
            $ref: '#/components/schemas/OpeningTimeEntry'
    PoiDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        categoryId:
          type: integer
          format: int64
        branchId:
          type: string
        name:
          type: string
        position:
          $ref: '#/components/schemas/Point'
        address:
          type: string
        url:
          type: string
        city:
          type: string
        phoneNumber:
          type: string
        displayOnRental:
          type: boolean
        enabled:
          type: boolean
        useCustomIcon:
          type: boolean
        mapZoomLevel:
          type: integer
          format: int32
        sizeFactor:
          type: integer
          format: int32
        categoryName:
          type: string
        category:
          $ref: '#/components/schemas/PoiCategoryDto'
        openingInformation:
          $ref: '#/components/schemas/OpeningInformation'
        images:
          type: string
        translationKeys:
          type: string
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - jwtAuth: []
