{
  "openapi": "3.1.0",
  "info": {
    "title": "Osmanth China Business Services — Request for Quote API",
    "version": "2026-11-03",
    "description": "Lets an AI agent submit a request for quote (RFQ) on behalf of a human buyer. A person reviews every request and replies to the buyer by email. We aim to respond to business inquiries within one business day. No prices are returned: every job is quoted individually. Use dry_run=true to validate without sending.",
    "contact": {
      "email": "support@osmanth.com",
      "url": "https://osmanth.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://osmanth.com"
    }
  ],
  "paths": {
    "/api/rfq": {
      "get": {
        "operationId": "describeRfq",
        "summary": "Field list and usage notes",
        "responses": {
          "200": {
            "description": "Field list (JSON)"
          }
        }
      },
      "post": {
        "operationId": "submitRfq",
        "summary": "Submit a request for quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RFQ"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "dry_run: validated, nothing sent"
          },
          "202": {
            "description": "Received and forwarded to the Osmanth team for human review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ack"
                }
              }
            }
          },
          "400": {
            "description": "Validation error; see errors[]"
          },
          "413": {
            "description": "Body too large (max 20 KB)"
          },
          "502": {
            "description": "Could not forward; email support@osmanth.com instead"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "RFQ": {
        "type": "object",
        "required": [
          "name",
          "company",
          "email",
          "country_timezone",
          "service_type",
          "background",
          "privacy_consent"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Full name of the human buyer (the person we will reply to)."
          },
          "company": {
            "type": "string",
            "maxLength": 200,
            "description": "Company name of the buyer."
          },
          "email": {
            "type": "string",
            "maxLength": 200,
            "format": "email",
            "description": "Reply-to email of the human buyer. We reply by email only."
          },
          "country_timezone": {
            "type": "string",
            "maxLength": 200,
            "description": "Buyer country and time zone, e.g. \"USA / Pacific Time\"."
          },
          "service_type": {
            "type": "string",
            "enum": [
              "supplier-background-verification",
              "business-communication-negotiation",
              "factory-site-visits",
              "production-order-follow-up",
              "china-business-assistance",
              "custom-business-tasks",
              "not-sure"
            ],
            "description": "One of: supplier-background-verification, business-communication-negotiation, factory-site-visits, production-order-follow-up, china-business-assistance, custom-business-tasks, not-sure."
          },
          "background": {
            "type": "string",
            "maxLength": 4000,
            "description": "Who the supplier or partner is, what stage the buyer is at, and what has happened so far."
          },
          "privacy_consent": {
            "type": "boolean",
            "description": "true = the human buyer agrees Osmanth may use the submitted information to review and reply, per https://osmanth.com/privacy."
          },
          "items_to_check": {
            "type": "string",
            "maxLength": 4000,
            "description": "What should be checked or handled (e.g. registration, bank-account name match, a factory visit before the balance payment)."
          },
          "target_location": {
            "type": "string",
            "maxLength": 200,
            "description": "Target city / province in China, if known (e.g. \"Foshan, Guangdong\")."
          },
          "onsite_needed": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "not-sure"
            ],
            "description": "yes | no | not-sure (default not-sure)."
          },
          "preferred_date": {
            "type": "string",
            "maxLength": 200,
            "description": "Preferred date or deadline, free text (e.g. \"by Nov 20\")."
          },
          "budget_range": {
            "type": "string",
            "maxLength": 200,
            "description": "Optional: the buyer's own budget range, free text. This is not an Osmanth price; every job is quoted individually."
          },
          "supplier_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Supplier / counterparty company name, if known (Chinese or English)."
          },
          "reference_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 10,
            "description": "Up to 10 public links (supplier website, marketplace listing, etc.). Files cannot be uploaded via the API; the buyer can email them after we reply."
          },
          "agent_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Name of the AI agent or tool submitting on behalf of the buyer."
          },
          "agent_operator": {
            "type": "string",
            "maxLength": 200,
            "description": "Who operates the agent (product or company), for our records."
          },
          "dry_run": {
            "type": "boolean",
            "description": "true = validate only; nothing is sent. Use this to test your integration."
          }
        },
        "additionalProperties": false
      },
      "Ack": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "next_steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
