{
  "openapi": "3.1.0",
  "info": {
    "title": "Rezk Ventures quote service",
    "version": "0.1.0",
    "description": "Search Rezk Ventures' catalogue (car parts for Chinese vehicles, DDR4/DDR5 server memory) and submit requests for quotation. Requests are recorded and answered by a trader by email. No prices are returned automatically and the service never sends email itself. An MCP endpoint (JSON-RPC 2.0, Streamable HTTP, JSON responses) is at POST /mcp with tools search_catalogue, get_product and request_quote."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8080",
      "description": "Local run. The hosted URL is published in llms.txt once live."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/products": {
      "get": {
        "operationId": "searchCatalogue",
        "summary": "Search the catalogue",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Words that must all match"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "car_parts",
                "server_memory"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{product_id}": {
      "get": {
        "operationId": "getProduct",
        "summary": "One catalogue item",
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quote": {
      "post": {
        "operationId": "requestQuote",
        "summary": "Submit a request for quotation (recorded only)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteAck"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body over 32 KB"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP JSON-RPC 2.0 endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          },
          "202": {
            "description": "Notification accepted"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "QuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "ship_to_country",
          "buyer"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "quantity"
              ],
              "description": "One line. Give product_id from the catalogue, or part_description for anything not listed.",
              "properties": {
                "product_id": {
                  "type": "string",
                  "example": "RZ-CP-0095",
                  "description": "Catalogue id"
                },
                "part_description": {
                  "type": "string",
                  "maxLength": 300,
                  "description": "Free text when the item is not in the catalogue (OE number, spec, model)"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1000000
                },
                "vin": {
                  "type": "string",
                  "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                  "description": "17-character VIN, for car parts: we confirm the exact OE number from it"
                }
              }
            }
          },
          "ship_to_country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "example": "AE",
            "description": "ISO 3166-1 alpha-2"
          },
          "incoterm": {
            "type": "string",
            "enum": [
              "CFR",
              "CIF",
              "CIP",
              "CPT",
              "DAP",
              "DDP",
              "DPU",
              "EXW",
              "FAS",
              "FCA",
              "FOB"
            ]
          },
          "needed_by": {
            "type": "string",
            "format": "date"
          },
          "buyer": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "company",
              "email"
            ],
            "properties": {
              "company": {
                "type": "string",
                "maxLength": 200
              },
              "contact_name": {
                "type": "string",
                "maxLength": 200
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "phone": {
                "type": "string",
                "maxLength": 25
              }
            }
          },
          "agent": {
            "type": "object",
            "additionalProperties": false,
            "description": "Optional: the AI agent submitting on the buyer's behalf",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "operator": {
                "type": "string",
                "maxLength": 200
              },
              "callback_url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https://",
                "description": "Recorded for reference; the service never calls it"
              }
            }
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "QuoteItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quantity"
        ],
        "description": "One line. Give product_id from the catalogue, or part_description for anything not listed.",
        "properties": {
          "product_id": {
            "type": "string",
            "example": "RZ-CP-0095",
            "description": "Catalogue id"
          },
          "part_description": {
            "type": "string",
            "maxLength": 300,
            "description": "Free text when the item is not in the catalogue (OE number, spec, model)"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "vin": {
            "type": "string",
            "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
            "description": "17-character VIN, for car parts: we confirm the exact OE number from it"
          }
        }
      },
      "QuoteAck": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "example": "RQ-20261012093000-a1b2c3"
          },
          "status": {
            "type": "string",
            "enum": [
              "recorded"
            ]
          },
          "price": {
            "type": "string",
            "enum": [
              "quote_on_request"
            ]
          },
          "lines": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
