{
  "openapi": "3.1.0",
  "info": {
    "title": "KORKİMYA Product Catalog",
    "version": "1.0.0",
    "description": "Read-only public catalog of chemical products supplied by KORKİMYA. Includes industry groupings, CAS/UN identifiers, formulas, packaging, and shelf-life metadata for each product.",
    "contact": {
      "name": "KORKİMYA",
      "url": "https://korkimya.com/iletisim",
      "email": "info@korkimya.com"
    },
    "license": {
      "name": "Public catalog (attribution required)",
      "url": "https://korkimya.com/aydinlatma-metni"
    }
  },
  "servers": [
    {
      "url": "https://korkimya.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/products": {
      "get": {
        "summary": "Get the full product catalog",
        "description": "Returns the complete KORKİMYA product catalog grouped by industry. Static data, refreshed when the catalog is updated.",
        "operationId": "getProducts",
        "responses": {
          "200": {
            "description": "Catalog payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Catalog": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string",
            "format": "uri"
          },
          "brand": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "industryCount": {
            "type": "integer"
          },
          "productCount": {
            "type": "integer"
          },
          "industries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Industry"
            }
          }
        }
      },
      "Industry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "cas": {
            "type": [
              "string",
              "null"
            ]
          },
          "un": {
            "type": [
              "string",
              "null"
            ]
          },
          "formula": {
            "type": [
              "string",
              "null"
            ]
          },
          "synonyms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "productionAreas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "packaging": {
            "type": [
              "string",
              "null"
            ]
          },
          "shelfLife": {
            "type": [
              "string",
              "null"
            ]
          },
          "en": {
            "type": [
              "object",
              "null"
            ],
            "description": "English overlay for international agents: standard English chemical name + translated production areas, packaging and shelf-life. Null when unavailable; Turkish fields above remain the base.",
            "properties": {
              "name": {
                "type": "string"
              },
              "productionAreas": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "packaging": {
                "type": "string"
              },
              "shelfLife": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}