{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sharedforest-com/json-schema/sharedforest-com-create-order-request-schema.json",
  "title": "CreateOrderRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sharedforest-com-openapi.json#/components/schemas/CreateOrderRequest",
  "type": "object",
  "required": [
    "quantity",
    "designIds",
    "displayName",
    "email",
    "channel"
  ],
  "properties": {
    "quantity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "designIds": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "string",
        "pattern": "^dsn_"
      },
      "description": "One id for all trees, or one per tree."
    },
    "holdIds": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^hld_"
      },
      "description": "Omit and the server picks free spots."
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    },
    "link": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://",
      "description": "Goes live after manual review."
    },
    "linkText": {
      "type": "string",
      "maxLength": 50,
      "description": "Optional public link label; requires link and goes live with it after review."
    },
    "shortDescription": {
      "type": "string",
      "maxLength": 160,
      "description": "Optional public tree description; requires link and goes live with it after review."
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "channel": {
      "type": "string",
      "enum": [
        "web",
        "mcp",
        "api"
      ],
      "description": "Agents send api (REST) or mcp."
    },
    "billingChoice": {
      "type": "string",
      "enum": [
        "one_time",
        "subscription"
      ],
      "description": "Required for web orders. Agent orders are one_time."
    },
    "acceptTerms": {
      "type": "boolean",
      "description": "Web only. Agent orders confirm on confirmUrl."
    },
    "waiveWithdrawal": {
      "type": "boolean",
      "description": "Web only. Agent orders confirm on confirmUrl."
    }
  }
}