openapi: 3.0.3
info:
  title: ZoukKTH public events API
  description: Read-only list of upcoming ZoukKTH courses, parties, and socials in Stockholm. Use checkoutUrl to send a person to the registration form. Payment (Swish, Revolut, or bank transfer) must be completed by the buyer.
  version: "1.0.0"
servers:
  - url: https://zoukkth.se
paths:
  /api/events:
    get:
      operationId: listEvents
      summary: List upcoming events
      parameters:
        - in: query
          name: type
          schema:
            type: string
            enum: [party, social, course]
          description: Optional filter.
      responses:
        "200":
          description: Upcoming events
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    type: object
                  events:
                    type: array
                    items:
                      $ref: "#/components/schemas/Event"
  /api/events/{id}:
    get:
      operationId: getEvent
      summary: Get one upcoming event
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            example: party:11
          description: Catalog id, for example party:11, social:sprallen-socials-2026, or course:8.
      responses:
        "200":
          description: Event
          content:
            application/json:
              schema:
                type: object
                properties:
                  event:
                    $ref: "#/components/schemas/Event"
        "404":
          description: Not found
components:
  schemas:
    Event:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum: [party, social, course]
        name:
          type: string
        description:
          type: string
        startDate:
          type: string
          format: date
          nullable: true
        endDate:
          type: string
          format: date
          nullable: true
        location:
          type: string
        url:
          type: string
          format: uri
        checkoutUrl:
          type: string
          format: uri
        currency:
          type: string
          example: SEK
        priceSek:
          type: number
          nullable: true
        image:
          type: string
          format: uri
          nullable: true