{
  "openapi": "3.1.0",
  "info": {
    "title": "Dezhipei Read-only Product and Store Query",
    "version": "0.3.0",
    "description": "Authenticated read-only queries. Unbound customers use headquarters sale price 2 at both stores. Physical stock and fitment require verification; customer-specific price binding is not enabled."
  },
  "servers": [
    {
      "url": "https://ai.dezhipei.com"
    }
  ],
  "paths": {
    "/v1/products/search": {
      "post": {
        "operationId": "searchDezhipeiProducts",
        "summary": "Find real product candidates by number, OE, name and vehicle hints",
        "description": "Do not infer fitment, price or physical stock. Preserve accessory and position differences. Unknown fields remain unknown. Return real image URLs only.",
        "x-openai-isConsequential": false,
        "security": [
          {
            "productRead": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "additionalProperties": false,
                "properties": {
                  "query": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "vehicle": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "partName": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "year": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Text evidence hint only; never proves fitment."
                  },
                  "engine": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Text evidence hint only; never proves fitment."
                  },
                  "position": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Text evidence hint only; never proves fitment."
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 10
                  },
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "enum": [
                        5,
                        14
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 2,
                    "description": "5 headquarters; 14 Yabang. Default both. Keep each stock distinct; unbound sales price comes from HQ sale price 2."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Candidate results, not confirmed VIN fitment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Rate limited"
          },
          "502": {
            "description": "Upstream unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "productRead": {
        "type": "http",
        "scheme": "bearer",
        "description": "Separate revocable product_reader identity; never ERP or admin credentials."
      }
    }
  }
}
