{
  "openapi": "3.1.0",
  "info": {
    "title": "KEW public catalogue — read-only API",
    "version": "1.0.0",
    "description": "Anonymous access to explicitly published products. No prices or exact stock counts. Browser quote requests are described in the public guide, not offered as unattended agent tools."
  },
  "servers": [
    {
      "url": "https://kew-erp-api-dxxg3763qa-ew.a.run.app"
    }
  ],
  "externalDocs": {
    "url": "https://kew.ie/developers/catalogue"
  },
  "security": [],
  "paths": {
    "/catalog/search": {
      "get": {
        "operationId": "search_public_catalogue_catalog_search_get",
        "summary": "Search Public Catalogue",
        "description": "Public-safe search over explicitly published catalogue products.",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 120,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category_code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category Code"
            }
          },
          {
            "description": "Sort by public name or KEW SKU/code.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "sku",
              "description": "Sort by public name or KEW SKU/code.",
              "enum": [
                "name",
                "sku",
                "code"
              ],
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogSearchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Product/category not found or catalogue disabled."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": []
      }
    },
    "/catalog/categories": {
      "get": {
        "operationId": "list_public_catalogue_categories_catalog_categories_get",
        "summary": "List Public Catalogue Categories",
        "description": "Public-safe category list for the catalogue filter UI.",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogPublicCategoryListOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Product/category not found or catalogue disabled."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": []
      }
    },
    "/catalog/product": {
      "get": {
        "operationId": "get_catalog_product_query_catalog_product_get",
        "summary": "Get Catalog Product Query",
        "description": "Query-string product detail for Firebase/static routes and slash SKUs.",
        "parameters": [
          {
            "in": "query",
            "name": "sku",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "title": "Sku",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogProductPublic"
                }
              }
            },
            "description": "Public-safe product detail"
          },
          "404": {
            "description": "Product/category not found or catalogue disabled."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": []
      }
    },
    "/catalog/p/{sku}": {
      "get": {
        "operationId": "get_catalog_product_catalog_p__sku__get",
        "summary": "Get Catalog Product",
        "description": "Public-safe path product detail for SKUs without slash delimiters.",
        "parameters": [
          {
            "in": "path",
            "name": "sku",
            "required": true,
            "schema": {
              "title": "Sku",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogProductPublic"
                }
              }
            },
            "description": "Public-safe product detail"
          },
          "404": {
            "description": "Product/category not found or catalogue disabled."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": []
      }
    },
    "/catalog/c/{category_code}": {
      "get": {
        "operationId": "list_catalog_category_catalog_c__category_code__get",
        "summary": "List Catalog Category",
        "description": "Public-safe category listing for published catalogue products only.",
        "parameters": [
          {
            "in": "path",
            "name": "category_code",
            "required": true,
            "schema": {
              "title": "Category Code",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogCategoryListing"
                }
              }
            },
            "description": "Public-safe category listing"
          },
          "404": {
            "description": "Product/category not found or catalogue disabled."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogSearchOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CatalogProductPublic"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "limit",
          "offset",
          "items"
        ],
        "title": "CatalogSearchOut",
        "type": "object"
      },
      "CatalogProductPublic": {
        "properties": {
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand"
          },
          "bullet_features": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Bullet Features",
            "type": "array"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "category_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Code"
          },
          "datasheet_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datasheet Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "gtin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gtin"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "layperson_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Layperson Description"
          },
          "manufacturer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manufacturer"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "mpn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mpn"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "sku": {
            "title": "Sku",
            "type": "string"
          },
          "stock_status": {
            "anyOf": [
              {
                "enum": [
                  "in_stock",
                  "low_stock",
                  "order_in"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stock Status"
          },
          "technical_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technical Description"
          }
        },
        "required": [
          "sku"
        ],
        "title": "CatalogProductPublic",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "CatalogPublicCategoryListOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CatalogPublicCategory"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "items"
        ],
        "title": "CatalogPublicCategoryListOut",
        "type": "object"
      },
      "CatalogPublicCategory": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "product_count": {
            "title": "Product Count",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "name",
          "product_count"
        ],
        "title": "CatalogPublicCategory",
        "type": "object"
      },
      "CatalogCategoryListing": {
        "properties": {
          "category_code": {
            "title": "Category Code",
            "type": "string"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CatalogProductPublic"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "category_code",
          "total",
          "limit",
          "offset",
          "items"
        ],
        "title": "CatalogCategoryListing",
        "type": "object"
      }
    }
  }
}