{
  "openapi": "3.1.0",
  "info": {
    "title": "BERDA Public Data API",
    "summary": "Read-only static API providing structured data about BERDA, its brand portfolio, contact information, opening hours and dealer regions.",
    "description": "This is a static, read-only data API published as JSON files. It is designed for AI agents (Claude, ChatGPT, Perplexity, custom LLM tools), search engines and partner integrations. No authentication is required. All endpoints are publicly cacheable.\n\nThe API surfaces the same canonical data that appears on www.berda-maschinen.de — brands, products, opening hours, contact channels and dealer regions — in machine-readable form.\n\nBERDA GmbH is the exclusive general importer of STARTRAC compact tractors and STAHLHOFF construction machinery for the DACH region (Germany, Austria, Switzerland), and also distributes NEOMACH, KELLFRI and FELDMANN implements.",
    "version": "1.0.0",
    "contact": {
      "name": "BERDA GmbH",
      "url": "https://www.berda-maschinen.de/kontakt.html",
      "email": "info@berda-maschinen.de"
    },
    "license": { "name": "© BERDA GmbH — Inhaltsnutzung mit Quellangabe", "url": "https://www.berda-maschinen.de/impressum.html" },
    "termsOfService": "https://www.berda-maschinen.de/impressum.html"
  },
  "servers": [
    { "url": "https://www.berda-maschinen.de", "description": "Production" }
  ],
  "externalDocs": {
    "url": "https://www.berda-maschinen.de/developers.html",
    "description": "Developer documentation and example payloads"
  },
  "tags": [
    { "name": "company",  "description": "BERDA company and contact data" },
    { "name": "brands",   "description": "Brand portfolio and product lines" },
    { "name": "schedule", "description": "Opening hours and availability" },
    { "name": "dealers",  "description": "Dealer network and regions" }
  ],
  "paths": {
    "/api/brands.json": {
      "get": {
        "tags": ["brands"],
        "summary": "List all brands in the BERDA portfolio",
        "operationId": "listBrands",
        "responses": {
          "200": {
            "description": "Brand catalog",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandsResponse" } } }
          }
        }
      }
    },
    "/api/products.json": {
      "get": {
        "tags": ["brands"],
        "summary": "List product categories sold by BERDA",
        "operationId": "listProducts",
        "responses": {
          "200": {
            "description": "Product catalog",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductsResponse" } } }
          }
        }
      }
    },
    "/api/contact.json": {
      "get": {
        "tags": ["company"],
        "summary": "BERDA contact information",
        "operationId": "getContact",
        "responses": {
          "200": {
            "description": "Company, address, channels, service area",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactResponse" } } }
          }
        }
      }
    },
    "/api/opening-hours.json": {
      "get": {
        "tags": ["schedule"],
        "summary": "Current opening hours for the headquarters in Neu Wulmstorf",
        "operationId": "getOpeningHours",
        "responses": {
          "200": {
            "description": "Per-day opening hours, schema.org spec and RFC 5545 RRULE for calendar systems",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpeningHoursResponse" } } }
          }
        }
      }
    },
    "/api/dealers.json": {
      "get": {
        "tags": ["dealers"],
        "summary": "Dealer network and supported regions",
        "operationId": "listDealers",
        "responses": {
          "200": {
            "description": "Dealer regions (Bundesländer) and major cities",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealersResponse" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BrandsResponse": {
        "type": "object",
        "properties": {
          "updated":      { "type": "string", "format": "date" },
          "company":      { "type": "string" },
          "total":        { "type": "integer" },
          "brands":       { "type": "array", "items": { "$ref": "#/components/schemas/Brand" } }
        },
        "required": ["updated", "brands"]
      },
      "Brand": {
        "type": "object",
        "properties": {
          "slug":              { "type": "string", "example": "startrac" },
          "name":              { "type": "string", "example": "STARTRAC" },
          "category":          { "type": "string", "example": "Kompakttraktoren" },
          "role":              { "type": "string", "example": "Exklusiver Generalimporteur DACH" },
          "description":       { "type": "string" },
          "products":          { "type": "array", "items": { "type": "string" } },
          "url":               { "type": "string", "format": "uri" },
          "logo":              { "type": "string", "format": "uri" },
          "image":             { "type": "string", "format": "uri" },
          "available_in_stock":{ "type": "boolean" }
        },
        "required": ["slug", "name", "category", "url"]
      },
      "ProductsResponse": {
        "type": "object",
        "properties": {
          "updated":    { "type": "string", "format": "date" },
          "categories": { "type": "array", "items": { "$ref": "#/components/schemas/ProductCategory" } }
        }
      },
      "ProductCategory": {
        "type": "object",
        "properties": {
          "slug":          { "type": "string" },
          "name":          { "type": "string" },
          "description":   { "type": "string" },
          "brands":        { "type": "array", "items": { "type": "string" } }
        }
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "updated":      { "type": "string", "format": "date" },
          "company":      { "type": "object" },
          "address":      { "type": "object" },
          "geo":          { "type": "object" },
          "channels":     { "type": "object" },
          "service_area": { "type": "object" }
        }
      },
      "OpeningHoursResponse": {
        "type": "object",
        "properties": {
          "updated":          { "type": "string", "format": "date" },
          "timezone":         { "type": "string", "example": "Europe/Berlin" },
          "regular_hours":    { "type": "array", "items": { "$ref": "#/components/schemas/DayHours" } },
          "machine_readable": { "type": "object" },
          "exception_dates":  { "type": "array", "items": { "type": "string", "format": "date" } }
        }
      },
      "DayHours": {
        "type": "object",
        "properties": {
          "day":     { "type": "string", "example": "monday" },
          "day_de":  { "type": "string", "example": "Montag" },
          "iso_day": { "type": "integer", "minimum": 1, "maximum": 7 },
          "is_open": { "type": "boolean" },
          "opens":   { "type": ["string", "null"], "example": "09:00" },
          "closes":  { "type": ["string", "null"], "example": "18:00" }
        }
      },
      "DealersResponse": {
        "type": "object",
        "properties": {
          "updated":                   { "type": "string", "format": "date" },
          "total_authorized_dealers":  { "type": "string", "example": "30+" },
          "service_area":              { "type": "array", "items": { "type": "string" } },
          "headquarters":              { "type": "object" },
          "regions_hub":               { "type": "string", "format": "uri" },
          "regions":                   { "type": "array", "items": { "$ref": "#/components/schemas/Region" } },
          "cities":                    { "type": "array", "items": { "$ref": "#/components/schemas/Region" } }
        }
      },
      "Region": {
        "type": "object",
        "properties": {
          "slug": { "type": "string" },
          "name": { "type": "string" },
          "url":  { "type": "string", "format": "uri" }
        }
      }
    }
  }
}
