{
 "openapi": "3.1.0",
 "info": {
  "title": "SilkVin agent API — wholesale parts for Chinese vehicles",
  "version": "1.0.0",
  "description": "For AI agents and procurement software. SilkVin (UAE) sells parts for Chinese vehicle brands wholesale only, shipped direct from China. Search by OE number, model or part; no prices are published. A request for quotation creates a case that a person reviews; the written quote follows within 48 working hours. Same tools over MCP at https://silkvin.com/mcp. No API key.",
  "contact": {
   "name": "SilkVin sales",
   "email": "sales@silkvin.com",
   "url": "https://silkvin.com/agents/"
  }
 },
 "servers": [
  {
   "url": "https://silkvin.com/api/v1"
  }
 ],
 "paths": {
  "/terms": {
   "get": {
    "operationId": "getTerms",
    "summary": "Trade terms",
    "responses": {
     "200": {
      "description": "Terms",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/search": {
   "get": {
    "operationId": "searchParts",
    "summary": "Search catalogue lines and core-range references by OE, model, brand or part",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "example": "Jolion brake pads"
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 10,
       "maximum": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Matches",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/oe/{number}": {
   "get": {
    "operationId": "lookupOe",
    "summary": "Which line or core reference carries this OE number (ignores dashes and spaces)",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "480-1012010"
     }
    ],
    "responses": {
     "200": {
      "description": "Found",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not listed (can still be requested)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/parts/{id}": {
   "get": {
    "operationId": "getPart",
    "summary": "One catalogue line: models, years, OE numbers, aftermarket equivalents, measurements",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Line",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown id",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/catalog": {
   "get": {
    "operationId": "getCatalog",
    "summary": "The whole machine-readable catalogue (also at /agents/catalog.json)",
    "responses": {
     "200": {
      "description": "Catalogue",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/quote": {
   "post": {
    "operationId": "requestQuote",
    "summary": "Send a request for quotation on behalf of a trade buyer (with consent). Creates a case reviewed by a person.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "buyer",
         "lines"
        ],
        "properties": {
         "lines": {
          "type": "array",
          "minItems": 1,
          "maxItems": 60,
          "items": {
           "type": "object",
           "properties": {
            "oe": {
             "type": "string",
             "description": "OE / OEM part number, e.g. T11-2906030"
            },
            "line_id": {
             "type": "string",
             "description": "Catalogue line id from search_parts"
            },
            "part": {
             "type": "string",
             "description": "Free text: part name, brand, model and year"
            },
            "quantity": {
             "type": "integer",
             "minimum": 0,
             "description": "Estimated quantity (0 = to confirm)"
            }
           }
          }
         },
         "buyer": {
          "type": "object",
          "required": [
           "company",
           "name",
           "email",
           "country",
           "business_type"
          ],
          "properties": {
           "company": {
            "type": "string"
           },
           "name": {
            "type": "string"
           },
           "email": {
            "type": "string",
            "format": "email"
           },
           "phone": {
            "type": "string"
           },
           "country": {
            "type": "string"
           },
           "business_type": {
            "type": "string",
            "enum": [
             "distributor",
             "reexporter",
             "retailer",
             "workshop",
             "other"
            ],
            "description": "distributor/importer, re-exporter, parts store or chain, workshop network, other trade buyer"
           }
          }
         },
         "incoterm": {
          "type": "string"
         },
         "destination_port": {
          "type": "string"
         },
         "notes": {
          "type": "string",
          "maxLength": 1500
         },
         "agent": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "platform": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Case registered",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "403": {
      "description": "Destination not served",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "Invalid",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Daily limit",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 }
}