{
  "openapi": "3.1.0",
  "info": {
    "title": "Jurk Shenzhen Electronic Component Sourcing API",
    "version": "1.0.1",
    "description": "Human-in-the-loop RFQ API for sourcing electronic components in Shenzhen, China. Intended for procurement software and AI agents when components are hard to find, obsolete, EOL, unavailable through normal distribution, or require Shenzhen market sourcing."
  },
  "servers": [
    {
      "url": "https://jurk.co.uk"
    }
  ],
  "paths": {
    "/api/rfq": {
      "post": {
        "operationId": "submitElectronicComponentRFQ",
        "summary": "Submit an electronic component sourcing RFQ",
        "description": "Submits an RFQ for human sourcing by Maria Jurk in Shenzhen. This endpoint does not return fabricated stock or pricing. The request is reviewed by a human sourcing specialist.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RFQ"
              },
              "examples": {
                "hardToFindPart": {
                  "summary": "Hard-to-find semiconductor",
                  "value": {
                    "part_number": "STM32F407VGT6",
                    "manufacturer": "STMicroelectronics",
                    "quantity": "500",
                    "email": "buyer@example.com",
                    "name": "Procurement Manager",
                    "company": "Example Electronics",
                    "notes": "Authorized distribution is out of stock. Please check Shenzhen availability."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "RFQ accepted for human review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RFQAccepted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid RFQ"
          },
          "413": {
            "description": "Payload too large"
          },
          "415": {
            "description": "Content-Type must be application/json"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "502": {
            "description": "RFQ delivery could not be confirmed"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "RFQ": {
        "type": "object",
        "required": [
          "part_number",
          "quantity",
          "email"
        ],
        "properties": {
          "part_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Manufacturer Part Number (MPN)"
          },
          "manufacturer": {
            "type": "string",
            "description": "Component manufacturer"
          },
          "quantity": {
            "type": "string",
            "minLength": 1,
            "description": "Required quantity"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email address for the sourcing response"
          },
          "name": {
            "type": "string",
            "description": "Buyer or procurement contact"
          },
          "company": {
            "type": "string",
            "description": "Buying company"
          },
          "notes": {
            "type": "string",
            "description": "Date-code requirements, target price, destination, lead-time requirements or other sourcing information"
          }
        },
        "additionalProperties": false
      },
      "RFQAccepted": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "const": "rfq_received"
          },
          "reference": {
            "type": "string"
          },
          "handled_by": {
            "type": "string",
            "const": "Maria Jurk"
          },
          "location": {
            "type": "string",
            "const": "Shenzhen, China"
          }
        }
      }
    }
  }
}
