openapi: 3.0.0
info:
  description: |
    Events published to the Homepage.  
    Production server URL: https://api.schedulr.ch  
    Development server URL: https://api.dev.schedulr.ch
  version: 1.0.0
  title: Homepage Events API
  contact:
    email: tech@interactionpartners.ch
paths:
  /homepage-events:
    get:
      summary: List of future events published to the homepage
      responses:
        '200':
          description: Events list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
        '401':
          $ref: '#/components/responses/unauthorized'
components:
  responses:
    unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                      example: Unauthorized
  schemas:
    Event:
      type: object
      properties:
        id:
          type: integer
          example: 2776
        translations:
          type: object
          additionalProperties:
            type: object
            properties:
              name:
                type: string
              subtitle:
                type: string
                nullable: true
          example:
            en:
              name: Annual General Meeting
              subtitle: Very important for investors
            de:
              name: Jahreshauptversammlung
              subtitle: null
        details_url:
          type: string
          format: uri
          nullable: true
          example: null
        country:
          type: string
          nullable: true
          example: null
        address:
          type: object
          properties:
            city:
              type: string
              nullable: true
            street:
              type: string
              nullable: true
            postcode:
              type: string
              nullable: true
          example:
            city: null
            street: null
            postcode: null
        get_invite_url:
          type: string
          format: uri
          nullable: true
          example: https://example.com/investor-request/event/2776/2368
        ics_url:
          type: string
          format: uri
          example: https://example.com/calendar-links/ics?type=event&entity-id=2776
        categories:
          type: object
          additionalProperties:
            type: string
          example:
            reporting: Reporting
            agm: AGM
        dates:
          type: array
          items:
            type: string
            format: date<yyyy-MM-dd>
          example:
            - '2036-03-31'
        start_time:
          type: string
          nullable: true
          format: time<HH:mm:ss+TZ>
          example: 16:00:00+02:00
        end_time:
          type: string
          format: time<HH:mm:ss+TZ>
          nullable: true
          example: 18:45:00+02:00
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Authorization
security:
  - apiKeyAuth: []
servers:
  - description: Dev server
    url: https://api.dev.schedulr.ch/
  - description: Production server
    url: https://api.schedulr.ch/
