{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/soeru-biz/json-schema/soeru-biz-b2-bdocument-request-schema.json",
  "title": "B2BDocumentRequest",
  "description": "B2B帳票生成リクエスト — 注文別帳票タイプ選択対応.\n\norders: 注文データ配列。各注文は document_types フィールドを含めることが可能。\ndocument_types: グローバルのフォールバック（注文に個別指定がない場合に使用）\ninclude_ai_message: AIメッセージを含めるか（設定のオーバーライド用）",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/soeru-biz-openapi.json#/components/schemas/B2BDocumentRequest",
  "properties": {
    "document_types": {
      "items": {
        "type": "string",
        "enum": [
          "packing_slip",
          "invoice",
          "receipt",
          "quotation"
        ]
      },
      "type": "array",
      "title": "Document Types",
      "description": "グローバルの帳票タイプ（注文別指定がない場合のフォールバック）",
      "default": [
        "packing_slip"
      ]
    },
    "orders": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "minItems": 1,
      "title": "Orders",
      "description": "注文データ配列。各注文は document_types を含めることが可能"
    },
    "include_ai_message": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Include Ai Message"
    }
  },
  "type": "object",
  "required": [
    "orders"
  ]
}