{
  "openapi": "3.1.0",
  "info": {
    "title": "Bellerwood Marine public catalog search",
    "version": "1.0.0",
    "description": "Read-only catalog lookup. Results contain public product details and canonical citation URLs, never supplier sources, internal quotes or warehouse data. This API does not create orders or confirm stock."
  },
  "servers": [
    {
      "url": "https://bellerwoodmarine.com"
    }
  ],
  "paths": {
    "/api/catalog-search": {
      "get": {
        "operationId": "searchPublicMarineParts",
        "summary": "Find active public products by brand, model or part number",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 120
            },
            "example": "WIKA A-10"
          },
          {
            "name": "brand",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 80
            },
            "example": "WIKA"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public results with canonical URLs and RFQ links; a listing does not confirm availability.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query or pagination."
          },
          "429": {
            "description": "Maximum 60 lookups per minute per client. Retry after the Retry-After interval."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogSearchResponse": {
        "type": "object",
        "required": [
          "query",
          "page",
          "limit",
          "total",
          "results"
        ],
        "properties": {
          "query": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "maximum": 20
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "description": "Next result page URL, or null."
          },
          "citationPolicy": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/PublicProduct"
            }
          }
        }
      },
      "PublicProduct": {
        "type": "object",
        "required": [
          "id",
          "name",
          "canonicalUrl",
          "rfq",
          "quotation"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "mpn": {
            "type": "string",
            "description": "Manufacturer part number, included only when explicitly known."
          },
          "canonicalUrl": {
            "type": "string",
            "format": "uri"
          },
          "image": {
            "type": "string"
          },
          "quotation": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "pricePolicy": {
                "type": "string"
              },
              "availability": {
                "type": "string"
              }
            }
          },
          "rfq": {
            "type": "object",
            "properties": {
              "whatsapp": {
                "type": "string",
                "format": "uri"
              },
              "email": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}
