{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/harukibox-com/json-schema/harukibox-com-registration-create-schema.json",
  "title": "RegistrationCreate",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/harukibox-com-agent-openapi.json#/components/schemas/RegistrationCreate",
  "type": "object",
  "required": [
    "productId",
    "buyerName",
    "items"
  ],
  "properties": {
    "productId": {
      "type": "string",
      "description": "Must belong to the calling organization."
    },
    "buyerName": {
      "type": "string",
      "maxLength": 120,
      "description": "Exactly as written in the 喊單."
    },
    "status": {
      "type": "string",
      "description": "Defaults to pending."
    },
    "paymentMethod": {
      "type": "string",
      "maxLength": 40
    },
    "paidAmount": {
      "type": "number",
      "minimum": 0
    },
    "discount": {
      "type": "number",
      "minimum": 0
    },
    "notes": {
      "type": "string",
      "maxLength": 2000,
      "description": "Record anything that could not be determined, so the seller can resolve it."
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "品項名稱，例：娃娃 / 立牌"
          },
          "character": {
            "type": "string",
            "description": "Omit rather than guess."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 999,
            "default": 1
          },
          "price": {
            "type": "number"
          },
          "note": {
            "type": "string",
            "description": "例：尺寸 M"
          }
        }
      }
    }
  }
}