{
  "openapi": "3.1.0",
  "info": {
    "title": "Tensile Base Technical Materials Catalog & RFQ API",
    "version": "1.0.0",
    "description": "Machine-readable product discovery and Request-for-Quote (RFQ) API for high-purity ceramics, fused quartz, graphite, thin-film PVD materials, refractory metals, and battery labware."
  },
  "servers": [
    {
      "url": "https://tensilebase.com"
    }
  ],
  "paths": {
    "/api/products": {
      "get": {
        "summary": "Search and filter technical materials catalog",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text query matching name, SKU, formula, CAS #, or synonym"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Category name or slug"
          },
          {
            "name": "element",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Periodic element symbol, e.g. Al, B, C, Si, Ti, W, Zr"
          },
          {
            "name": "cas",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "CAS Registry Number, e.g. 1344-28-1"
          },
          {
            "name": "sku",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact SKU code, e.g. TB-HBN-MC"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching catalog items with specifications and quote URLs"
          }
        }
      }
    },
    "/api/products/{slugOrSku}": {
      "get": {
        "summary": "Get complete technical specification for a single product line by slug or SKU",
        "parameters": [
          {
            "name": "slugOrSku",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full product record"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/quote": {
      "post": {
        "summary": "Submit a specification-based Request for Quote (RFQ)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "product",
                  "quantity",
                  "specifications"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "company": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "product": {
                    "type": "string",
                    "description": "Product slug, SKU code, or \"other\""
                  },
                  "quantity": {
                    "type": "string"
                  },
                  "delivery": {
                    "type": "string"
                  },
                  "specifications": {
                    "type": "string",
                    "description": "Purity grade, dimensions, tolerances, atmosphere, and COA needs"
                  },
                  "details": {
                    "type": "string"
                  },
                  "docsRequested": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "RFQ saved and routed to sourcing desk"
          }
        }
      }
    }
  }
}
