{
 "openapi": "3.1.0",
 "info": {
  "title": "Home Gift Factory inquiry API",
  "version": "1.0",
  "description": "Submit wholesale quote requests and newsletter sign-ups to Shanghai Mars Industrial Co., Ltd. Intended for AI agents acting on behalf of a buyer with the buyer's consent."
 },
 "servers": [
  {
   "url": "https://www.home-gift-factory.com"
  }
 ],
 "paths": {
  "/api/inquiry": {
   "post": {
    "operationId": "requestWholesaleQuote",
    "summary": "Send a wholesale quote request",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "name",
         "email",
         "message",
         "consent"
        ],
        "properties": {
         "name": {
          "type": "string"
         },
         "email": {
          "type": "string",
          "format": "email"
         },
         "company": {
          "type": "string"
         },
         "country": {
          "type": "string"
         },
         "phone": {
          "type": "string"
         },
         "topic": {
          "type": "string",
          "enum": [
           "quote",
           "custom",
           "sample",
           "sourcing",
           "other"
          ]
         },
         "quantity": {
          "type": "string"
         },
         "products": {
          "type": "string",
          "description": "Product names/URLs and quantities"
         },
         "message": {
          "type": "string",
          "minLength": 10
         },
         "consent": {
          "type": "string",
          "enum": [
           "yes"
          ],
          "description": "Buyer agrees to be contacted about this inquiry"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Accepted",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "id": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "422": {
      "description": "Validation error"
     },
     "429": {
      "description": "Rate limited"
     }
    }
   }
  },
  "/api/subscribe": {
   "post": {
    "operationId": "subscribeNewsletter",
    "summary": "Subscribe to seasonal buying notes",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "email"
        ],
        "properties": {
         "email": {
          "type": "string",
          "format": "email"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Subscribed"
     }
    }
   }
  }
 }
}