{
    "openapi": "3.1.0",
    "info": {
        "title": "Hardeman Motorsport — AI Agent Inquiry & Technical Gateway",
        "version": "1.1.0",
        "description": "Drivetrain specialist in the Netherlands: custom limited slip differentials (LSD), differential & transfer case rebuilds (revisie), motorsport clutches, flywheels, and performance drivetrain engineering. Use this API (or the Remote MCP Server at https://hardemanmotorsport.nl/wp-json/ai-agent/v1/mcp) to gather technical requirements and submit structured customer inquiries directly to our engineers."
    },
    "servers": [
        {
            "url": "https://hardemanmotorsport.nl"
        }
    ],
    "paths": {
        "/wp-json/ai-agent/v1/info": {
            "get": {
                "operationId": "getGatewayInfo",
                "summary": "Get AI Agent Gateway capabilities and endpoints",
                "responses": {
                    "200": {
                        "description": "Gateway overview JSON"
                    }
                }
            }
        },
        "/wp-json/ai-agent/v1/requirements": {
            "get": {
                "operationId": "getInquiryRequirements",
                "summary": "Get recommended technical questions to ask the customer before submitting an inquiry",
                "parameters": [
                    {
                        "name": "topic",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Optional topic ID to filter technical questions"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Structured intake checklist JSON"
                    }
                }
            }
        },
        "/wp-json/ai-agent/v1/inquiry": {
            "post": {
                "operationId": "submitInquiry",
                "summary": "Submit a structured technical or quote inquiry directly to the Hardeman Motorsport engineering team",
                "description": "Delivers a structured email directly to our team with Reply-To set to the customer email. No automatic reply is sent to the customer.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "name",
                                    "email",
                                    "message"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 120,
                                        "description": "Customer full name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 160,
                                        "description": "Valid customer email address for our personal reply"
                                    },
                                    "message": {
                                        "type": "string",
                                        "minLength": 20,
                                        "maxLength": 4000,
                                        "description": "Detailed technical question or quote request"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "maxLength": 50,
                                        "description": "Optional phone or WhatsApp number with country code"
                                    },
                                    "company": {
                                        "type": "string",
                                        "maxLength": 120,
                                        "description": "Optional workshop, company, or race team name"
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 60,
                                        "description": "Customer country (e.g. NL, BE, DE, UK)"
                                    },
                                    "language": {
                                        "type": "string",
                                        "maxLength": 10,
                                        "description": "Preferred reply language (nl, en, de, fr)"
                                    },
                                    "topic": {
                                        "type": "string",
                                        "enum": [
                                            "sperdifferentieel",
                                            "differentieel_revisie",
                                            "tussenbak_revisie",
                                            "koppeling_vliegwiel",
                                            "versnellingsbak",
                                            "algemeen"
                                        ],
                                        "description": "Inquiry category"
                                    },
                                    "vehicle": {
                                        "type": "string",
                                        "maxLength": 140,
                                        "description": "Vehicle make and model (e.g. BMW M3, Nissan Skyline GT-R)"
                                    },
                                    "year": {
                                        "type": "string",
                                        "maxLength": 20,
                                        "description": "Vehicle model year"
                                    },
                                    "chassis_code": {
                                        "type": "string",
                                        "maxLength": 60,
                                        "description": "Chassis code (e.g. E46, F82, BNR34, AP1)"
                                    },
                                    "engine": {
                                        "type": "string",
                                        "maxLength": 80,
                                        "description": "Engine code or specification"
                                    },
                                    "transmission": {
                                        "type": "string",
                                        "maxLength": 80,
                                        "description": "Transmission type (OEM manual/auto/DCT or swap)"
                                    },
                                    "power_torque": {
                                        "type": "string",
                                        "maxLength": 80,
                                        "description": "Peak power and torque (e.g. 520 hp / 680 Nm)"
                                    },
                                    "usage": {
                                        "type": "string",
                                        "maxLength": 100,
                                        "description": "Driving discipline & tires (street, trackday, rally, drift, cup)"
                                    },
                                    "part_number": {
                                        "type": "string",
                                        "maxLength": 80,
                                        "description": "Known OEM or OS Giken part number"
                                    },
                                    "agent_name": {
                                        "type": "string",
                                        "maxLength": 80,
                                        "description": "AI assistant name submitting on behalf of the customer"
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "default": false,
                                        "description": "Set true to validate payload without sending email"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Inquiry delivered to the technical team"
                    },
                    "200": {
                        "description": "Dry-run validation succeeded or duplicate inquiry acknowledged"
                    },
                    "400": {
                        "description": "Validation error or anti-spam rejection"
                    },
                    "429": {
                        "description": "Rate limit exceeded"
                    }
                }
            }
        },
        "/wp-json/ai-agent/v1/applications/search": {
            "get": {
                "operationId": "searchLsdAndRevisieApplications",
                "summary": "Read-only search of live LSD, differential rebuild, transfer case, clutch & gearbox applications on motorsportparts.nl (links only, no orders or binding prices)",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Search terms in NL or EN (e.g. \"BMW E46 M3 LSD\", \"F87 M2 sper\", \"Mercedes 4matic revisie\", \"GR Yaris clutch\")"
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "lsd",
                                "diff_revisie",
                                "tussenbak",
                                "clutch_flywheel",
                                "gearbox_final_drive",
                                "drivetrain_other"
                            ]
                        }
                    },
                    {
                        "name": "brand",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Optional brand filter (e.g. OS Giken, Quaife, Drexler, Wavetrac, Gripper)"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15,
                            "minimum": 1,
                            "maximum": 30
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching motorsportparts.nl product URLs (read-only)"
                    }
                }
            }
        },
        "/wp-json/ai-agent/v1/services": {
            "get": {
                "operationId": "getWorkshopServices",
                "summary": "Get Hardeman Motorsport workshop rebuild capabilities (differential overhaul, welded crown-wheel conversion, transfer case rebuild, live rebuild counter)",
                "responses": {
                    "200": {
                        "description": "Structured workshop services JSON"
                    }
                }
            }
        },
        "/wp-json/ai-agent/v1/lsd-dimensions/check": {
            "post": {
                "operationId": "checkLsdDimensions",
                "summary": "Match measured differential dimensions (>= 2 fields) against Hardeman Motorsport LSD database (returns matching brands & hit counts only; zero confidential part numbers disclosed)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "measurements"
                                ],
                                "properties": {
                                    "measurements": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "Map of >= 2 measured dimensions (cg_pcd, cg_bolt_dia, cg_bolts, cg_spigot_dia, bearing_dia_pin, bearing_dia_cg, halfshaft_dia_pin, halfshaft_dia_cg, bearing_dist, total_length, bearing_to_cg, cg_to_pin_bearing, bearing_seat_pin, bearing_seat_cg, dist_middle, splines)"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Matching LSD brands and counts"
                    }
                }
            }
        }
    }
}