{
  "components": {
    "schemas": {
      "Checkout": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "properties": {
              "checkout_url": {
                "format": "uri",
                "type": "string"
              },
              "fulfillment": {
                "type": "string"
              }
            },
            "required": [
              "fulfillment"
            ],
            "type": "object"
          }
        ]
      },
      "Credential": {
        "properties": {
          "license_key": {
            "description": "公式 SDK 専用。この値を調べてアクセスを認可してはいけません。",
            "type": "string",
            "x-sensitive": true
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "valid_until": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "product_id",
          "license_key",
          "valid_until",
          "version"
        ],
        "type": "object"
      },
      "EntitlementStatus": {
        "properties": {
          "account_url": {
            "format": "uri",
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "max_retry_attempts": {
            "minimum": 0,
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "next_action": {
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "retry_after_seconds": {
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "enum": [
              "ready",
              "pending",
              "expired",
              "suspended",
              "not_purchased"
            ],
            "type": "string"
          },
          "synchronized": {
            "type": "boolean"
          },
          "valid_from": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "valid_until": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "product_id",
          "environment",
          "status",
          "code",
          "message",
          "next_action",
          "account_url",
          "synchronized",
          "retry_after_seconds",
          "max_retry_attempts"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestID"
          }
        },
        "required": [
          "error",
          "request_id"
        ],
        "type": "object"
      },
      "ExternalCapabilities": {
        "additionalProperties": false,
        "properties": {
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "delivery_types": {
            "items": {
              "enum": [
                "license_key",
                "activation_url",
                "instructions"
              ],
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "devices": {
            "const": false,
            "type": "boolean"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "identity_exchange": {
            "const": false,
            "type": "boolean"
          },
          "protocol": {
            "const": "launch-external-licensing-v1",
            "type": "string"
          },
          "purchase_types": {
            "items": {
              "enum": [
                "perpetual",
                "fixed_term"
              ],
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "protocol",
          "connection_ref",
          "environment",
          "purchase_types",
          "delivery_types"
        ],
        "type": "object"
      },
      "ExternalCapabilitiesResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalCapabilities"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalConnection": {
        "additionalProperties": false,
        "properties": {
          "activation_origins": {
            "items": {
              "format": "uri",
              "type": "string"
            },
            "type": "array"
          },
          "allow_local_http": {
            "type": "boolean"
          },
          "allow_private_network": {
            "type": "boolean"
          },
          "base_url": {
            "format": "uri",
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/ExternalCapabilities"
          },
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "credential_stored": {
            "type": "boolean"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "key_id": {
            "type": "string"
          },
          "last_check_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_checked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "const": "custom_http",
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "name",
          "base_url",
          "environment",
          "connection_ref",
          "key_id",
          "credential_stored",
          "allow_private_network",
          "allow_local_http",
          "activation_origins",
          "capabilities",
          "last_checked_at",
          "last_check_error"
        ],
        "type": "object"
      },
      "ExternalConnectionInput": {
        "additionalProperties": false,
        "properties": {
          "activation_origins": {
            "items": {
              "format": "uri",
              "type": "string"
            },
            "type": "array"
          },
          "allow_local_http": {
            "default": false,
            "description": "sandbox のループバック HTTP のみ許可されます。",
            "type": "boolean"
          },
          "allow_private_network": {
            "default": false,
            "type": "boolean"
          },
          "base_url": {
            "format": "uri",
            "maxLength": 512,
            "type": "string"
          },
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "key_id": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "maxLength": 160,
            "minLength": 2,
            "type": "string"
          },
          "provider": {
            "const": "custom_http",
            "type": "string"
          },
          "signing_key": {
            "description": "32-128 ランダムバイトの標準 Base64。作成時は必須、編集時は空欄で既存キーを保持します。",
            "maxLength": 180,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "provider",
          "name",
          "base_url",
          "environment",
          "connection_ref",
          "key_id"
        ],
        "type": "object"
      },
      "ExternalConnectionResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalConnection"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalDelivery": {
        "additionalProperties": false,
        "properties": {
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalDeliveryValue"
              },
              {
                "type": "null"
              }
            ]
          },
          "entitlement_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "ready",
              "unavailable"
            ],
            "type": "string"
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "connection_ref",
          "environment",
          "entitlement_ref",
          "version",
          "status",
          "delivery"
        ],
        "type": "object"
      },
      "ExternalDeliveryResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalDelivery"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalDeliveryValue": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "enum": [
              "license_key",
              "activation_url",
              "instructions"
            ],
            "type": "string"
          },
          "value": {
            "description": "機密情報です。上限は 4096 UTF-8 バイトです。ログには絶対に記録しないでください。有効化 URL は設定済みの HTTPS オリジンを使用する必要があります。",
            "maxLength": 4096,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value",
          "expires_at"
        ],
        "type": "object"
      },
      "ExternalError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "request_id"
        ],
        "type": "object"
      },
      "ExternalMapping": {
        "additionalProperties": false,
        "properties": {
          "connection_id": {
            "format": "uuid",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "environment",
          "connection_id",
          "product_ref",
          "plan_ref"
        ],
        "type": "object"
      },
      "ExternalMappingInput": {
        "additionalProperties": false,
        "properties": {
          "plan_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "product_ref",
          "plan_ref"
        ],
        "type": "object"
      },
      "ExternalReceipt": {
        "additionalProperties": false,
        "properties": {
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "entitlement_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "maxLength": 96,
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "payload_sha256": {
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "applied",
              "rejected",
              "manual_review"
            ],
            "type": "string"
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "event_id",
          "connection_ref",
          "environment",
          "entitlement_ref",
          "version",
          "payload_sha256",
          "status",
          "error_code"
        ],
        "type": "object"
      },
      "ExternalReceiptResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalReceipt"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalSnapshot": {
        "additionalProperties": false,
        "properties": {
          "account_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "change_reason": {
            "enum": [
              "purchase",
              "renewal",
              "upgrade",
              "refund",
              "reversal",
              "suspension",
              "resumption",
              "expiry",
              "reconciliation"
            ],
            "type": "string"
          },
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "desired_state": {
            "enum": [
              "active",
              "suspended",
              "expired",
              "revoked"
            ],
            "type": "string"
          },
          "entitlement_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "launch_plan_version_id": {
            "format": "uuid",
            "type": "string"
          },
          "launch_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "plan_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "schema": {
            "const": "launch-external-licensing-v1",
            "type": "string"
          },
          "type": {
            "const": "entitlement.snapshot",
            "type": "string"
          },
          "valid_from": {
            "format": "date-time",
            "type": "string"
          },
          "valid_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "schema",
          "event_id",
          "connection_ref",
          "environment",
          "type",
          "change_reason",
          "account_ref",
          "entitlement_ref",
          "launch_product_id",
          "launch_plan_version_id",
          "product_ref",
          "plan_ref",
          "version",
          "desired_state",
          "valid_from",
          "valid_until"
        ],
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "data": {
            "properties": {
              "status": {
                "const": "ok"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestID"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "type": "object"
      },
      "IntegrationBundle": {
        "properties": {
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "checks": {
            "items": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "status",
                "message"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "config": {
            "additionalProperties": false,
            "properties": {
              "environment": {
                "enum": [
                  "sandbox",
                  "live"
                ],
                "type": "string"
              },
              "launch_product_id": {
                "format": "uuid",
                "type": "string"
              },
              "licentivo_product_id": {
                "anyOf": [
                  {
                    "format": "uuid",
                    "type": "string"
                  },
                  {
                    "const": ""
                  }
                ],
                "description": "失敗したチェックでマッピングを解決できなかった場合のみ空。"
              },
              "merchant_origin": {
                "format": "uri",
                "type": "string"
              },
              "schema_version": {
                "const": 1,
                "type": "integer"
              }
            },
            "required": [
              "schema_version",
              "merchant_origin",
              "launch_product_id",
              "licentivo_product_id",
              "environment"
            ],
            "type": "object"
          },
          "example_path": {
            "type": "string"
          },
          "language": {
            "enum": [
              "go",
              "python",
              "csharp",
              "java",
              "javascript",
              "rust",
              "ruby",
              "c",
              "cpp",
              "web"
            ],
            "type": "string"
          },
          "product_config": {
            "$ref": "#/components/schemas/PublicProductConfig"
          },
          "ready": {
            "type": "boolean"
          }
        },
        "required": [
          "ready",
          "config",
          "checks",
          "language",
          "example_path",
          "checked_at"
        ],
        "type": "object"
      },
      "LaunchIdentity": {
        "additionalProperties": false,
        "properties": {
          "audience": {
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "identity_token": {
            "description": "短期間有効な ID アサーション、最大 120 秒。ランタイム許可ではありません。",
            "type": "string"
          },
          "launch_connection_id": {
            "format": "uuid",
            "type": "string"
          },
          "licentivo_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        },
        "required": [
          "identity_token",
          "token_type",
          "product_id",
          "licentivo_product_id",
          "launch_connection_id",
          "environment",
          "audience",
          "expires_at"
        ],
        "type": "object"
      },
      "LicensingConnections": {
        "additionalProperties": false,
        "properties": {
          "bindings": {
            "items": {
              "$ref": "#/components/schemas/ProductLicensingBinding"
            },
            "type": "array"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/ExternalConnection"
            },
            "type": "array"
          },
          "default_provider": {
            "description": "全製品と両環境に対する単一の有効なライセンスプロバイダー。",
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          },
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/ExternalMapping"
            },
            "type": "array"
          }
        },
        "required": [
          "connections",
          "bindings",
          "mappings",
          "default_provider"
        ],
        "type": "object"
      },
      "LicensingConnectionsResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LicensingConnections"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "LicensingProviderInput": {
        "additionalProperties": false,
        "properties": {
          "provider": {
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider"
        ],
        "type": "object"
      },
      "LicensingSaved": {
        "additionalProperties": false,
        "properties": {
          "saved": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "saved"
        ],
        "type": "object"
      },
      "LicensingSavedResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LicensingSaved"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "LicentivoConnectionInput": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "description": "初回接続に必要です。省略または空欄で保存済みのサーバー側キーを保持します。",
            "type": "string",
            "writeOnly": true
          },
          "webhook_secret": {
            "description": "任意の 32–256 バイトの秘密情報。省略または空欄で保存済みの秘密情報を保持します。",
            "type": "string",
            "writeOnly": true
          }
        },
        "type": "object"
      },
      "Order": {
        "properties": {
          "action": {
            "type": "string"
          },
          "amount_minor": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "paid_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "plan_name": {
            "type": "string"
          },
          "plan_version": {
            "type": "integer"
          },
          "plan_version_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_name": {
            "type": "string"
          },
          "product_slug": {
            "type": "string"
          },
          "purchase_periods": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "product_id",
          "product_name",
          "product_slug",
          "plan_version_id",
          "plan_name",
          "plan_version",
          "action",
          "status",
          "currency",
          "amount_minor",
          "purchase_periods",
          "created_at",
          "paid_at",
          "environment"
        ],
        "type": "object"
      },
      "ProductLicensingBinding": {
        "additionalProperties": false,
        "properties": {
          "connection_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "provider": {
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "environment",
          "provider",
          "connection_id"
        ],
        "type": "object"
      },
      "ProductLicensingInput": {
        "additionalProperties": false,
        "properties": {
          "connection_id": {
            "description": "外部接続 UUID。custom_http に必須。",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/ExternalMappingInput"
            },
            "type": "array"
          },
          "provider": {
            "description": "インスタンス全体で有効なライセンスプロバイダーと一致する必要があります。先に PUT /api/v1/admin/licensing/provider で設定してください。",
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider",
          "environment"
        ],
        "type": "object"
      },
      "PublicLaunchConfig": {
        "additionalProperties": false,
        "properties": {
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "launch_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "licentivo_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "merchant_origin": {
            "format": "uri",
            "type": "string"
          },
          "schema_version": {
            "const": 1,
            "type": "integer"
          }
        },
        "required": [
          "schema_version",
          "merchant_origin",
          "launch_product_id",
          "licentivo_product_id",
          "environment"
        ],
        "type": "object"
      },
      "PublicProductConfig": {
        "additionalProperties": false,
        "description": "機密情報を除去した公開設定。署名キーの出所は事業者が検証する必要があります。",
        "properties": {
          "app_version": {
            "type": "string"
          },
          "base_url": {
            "format": "uri",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "trusted_keys": {
            "additionalProperties": {
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "type": "string"
            },
            "maxProperties": 32,
            "minProperties": 1,
            "propertyNames": {
              "description": "キー識別子は 1–128 UTF-8 バイトです。",
              "minLength": 1,
              "type": "string",
              "x-maxBytes": 128
            },
            "type": "object"
          }
        },
        "required": [
          "product_id",
          "trusted_keys",
          "base_url"
        ],
        "type": "object"
      },
      "PublicProductImport": {
        "additionalProperties": false,
        "description": "公式製品 ID と署名公開鍵から入力された Launch 公開製品設定。license_key/cache_path が空で allow_http が false の旧 JSON は受け入れられ、これらは除去されます。入力済みの秘密情報と不明なフィールドは拒否されます。",
        "properties": {
          "allow_http": {
            "const": false
          },
          "app_version": {
            "description": "最大 80 UTF-8 バイト。",
            "type": "string",
            "x-maxBytes": 80
          },
          "base_url": {
            "format": "uri",
            "type": "string"
          },
          "cache_path": {
            "const": ""
          },
          "device_name": {
            "maxLength": 128,
            "type": "string"
          },
          "license_key": {
            "const": ""
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "trusted_keys": {
            "additionalProperties": {
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "type": "string"
            },
            "maxProperties": 32,
            "minProperties": 1,
            "propertyNames": {
              "description": "キー識別子は 1–128 UTF-8 バイトです。",
              "minLength": 1,
              "type": "string",
              "x-maxBytes": 128
            },
            "type": "object"
          }
        },
        "required": [
          "product_id",
          "trusted_keys"
        ],
        "type": "object"
      },
      "ReadinessResponse": {
        "properties": {
          "data": {
            "properties": {
              "code": {
                "enum": [
                  "DATABASE_NOT_CONFIGURED",
                  "DATABASE_UNAVAILABLE",
                  "DATABASE_SCHEMA_NOT_READY"
                ]
              },
              "status": {
                "enum": [
                  "ready",
                  "not_ready"
                ]
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestID"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "type": "object"
      },
      "RequestID": {
        "description": "X-Request-ID レスポンスヘッダーでも返されます",
        "pattern": "^[a-f0-9]{32}$",
        "type": "string"
      },
      "SessionGrant": {
        "properties": {
          "access_token": {
            "description": "デスクトップログインでのみ返されます。秘密情報として扱い、URL やログに含めないでください。",
            "type": "string",
            "x-sensitive": true
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "kind": {
            "enum": [
              "website",
              "desktop"
            ],
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user",
          "kind",
          "expires_at"
        ],
        "type": "object"
      },
      "SessionView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "website",
              "desktop"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "created_at",
          "expires_at",
          "current"
        ],
        "type": "object"
      },
      "User": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "full_access": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "password_change_required": {
            "type": "boolean"
          },
          "role": {
            "enum": [
              "customer",
              "admin",
              "operations",
              "support"
            ],
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "verified",
          "role",
          "full_access",
          "password_change_required"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "desktopBearer": {
        "description": "kind=desktop の auth/login から取得する不透明なデスクトップセッション。",
        "scheme": "bearer",
        "type": "http"
      },
      "websiteCookie": {
        "description": "ブラウザーセッション。変更操作には launch_csrf から取得した一致する Origin と X-CSRF-Token も必要です。",
        "in": "cookie",
        "name": "launch_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "システム、アカウント、デスクトップライセンス、連携ウィザード、基本購入の API。スタッフ管理／決済 Webhook API の全体ではありません。ランタイムアクセスには引き続き公式 Licentivo SDK を通す必要があります。メール認証は事業者が有効にした場合のみ必要です。カスタムライセンス接続と顧客への配信も説明しています。外部受信側のエンドポイントは external-licensing-openapi.json で別途定義されています。",
    "license": {
      "identifier": "MIT",
      "name": "MIT"
    },
    "title": "Licentivo Launch 連携 API",
    "version": "0.3.4-beta",
    "x-document-language": "ja"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/admin/connections/licentivo": {
      "post": {
        "operationId": "configureLicentivoConnection",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicentivoConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "description": "接続 ID、検証済み機能、カタログ。保存された秘密情報は返されません。",
                      "type": "object"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "websiteCookie": []
          }
        ],
        "summary": "サーバー側の Licentivo 管理接続を検証して保存",
        "tags": [
          "Licentivo connection"
        ]
      }
    },
    "/api/v1/admin/identity-notifications/{id}/retry": {
      "post": {
        "operationId": "retryIdentityNotification",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "maxLength": 500,
                    "minLength": 2,
                    "type": "string"
                  }
                },
                "required": [
                  "reason"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "元の通知は再試行が予約されました"
          },
          "403": {
            "description": "管理者権限が必要です"
          },
          "409": {
            "description": "通知は完了済みまたは処理中です"
          }
        },
        "security": [
          {
            "websiteCookie": []
          }
        ],
        "summary": "アカウントのセキュリティ失効通知を再試行（管理者）"
      }
    },
    "/api/v1/admin/integration/check": {
      "post": {
        "description": "admin ロールが必要です。ウェブサイトの呼び出し元は Origin と X-CSRF-Token を指定する必要があります。ready=false は不完全な設定を示し、秘密フィールドは返されません。不完全なレポートでは licentivo_product_id が空の場合があります。",
        "operationId": "checkApplicationIntegration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  },
                  "language": {
                    "enum": [
                      "go",
                      "python",
                      "csharp",
                      "java",
                      "javascript",
                      "rust",
                      "ruby",
                      "c",
                      "cpp",
                      "web"
                    ],
                    "type": "string"
                  },
                  "product_id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "product_id",
                  "environment",
                  "language"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IntegrationBundle"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "SDK の直接初期化用に選択したソフトウェアのマッピングと署名公開鍵を自動取得",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/admin/integration/context": {
      "get": {
        "description": "admin ロールが必要です。ウェブサイトの呼び出し元は Origin と X-CSRF-Token を指定する必要があります。ready=false は不完全な設定を示し、秘密フィールドは返されません。不完全なレポートでは licentivo_product_id が空の場合があります。",
        "operationId": "getIntegrationContext",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "licensing_origin": {
                          "type": "string"
                        },
                        "merchant_origin": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "merchant_origin",
                        "licensing_origin"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "公開デプロイ情報。非公開の起動設定は含みません"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "設定された事業者オリジンと固定ライセンスオリジンを取得",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/admin/licensing/connections": {
      "get": {
        "operationId": "listLicensingChoices",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensingConnectionsResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "外部接続、製品紐付け、マッピングの一覧。Licentivo 設定は既存 API を保持します",
        "tags": [
          "Custom licensing"
        ]
      },
      "post": {
        "operationId": "createExternalLicensingConnection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalConnectionResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "カスタム HTTP ライセンス接続を検証して保存",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/licensing/connections/{id}": {
      "put": {
        "operationId": "updateExternalLicensingConnection",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalConnectionResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "メタデータ／署名キーを編集。接続先、環境、ネットワークポリシーは変更できません",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/licensing/connections/{id}/check": {
      "post": {
        "operationId": "checkExternalLicensingConnection",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalConnectionResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "機能を更新。200 レスポンス内の last_check_error は失敗したチェックを識別します",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/licensing/provider": {
      "put": {
        "operationId": "selectLicensingProvider",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicensingProviderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensingSavedResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "インスタンス全体で 1 つのライセンスプロバイダーを有効化。他のプロバイダーの注文が存在する場合、切り替えには移行が必要です",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/products/{id}/licensing": {
      "put": {
        "operationId": "configureProductLicensing",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductLicensingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensingSavedResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "有効なライセンスプロバイダーを使用して環境の製品接続とプランマッピングを設定",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/refunds/{id}/reconcile": {
      "post": {
        "description": "管理者は元の返金を照合し、チャネルのレシートの元の取引、金額、通貨を検証して同じ操作を復旧します。レシートがない場合、Stripe/PayPal の元の承認時刻から 23 時間以内に限り元の冪等リクエストを再試行します。期限を過ぎた場合は元のチャネルの返金番号が必要です。操作は監査に記録され、新しい返金操作番号は作成されません。",
        "operationId": "reconcileRefund",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "external_refund_id": {
                    "maxLength": 128,
                    "type": "string"
                  },
                  "reason": {
                    "maxLength": 500,
                    "minLength": 2,
                    "type": "string"
                  }
                },
                "required": [
                  "reason"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "元のタスクがキューに再登録されました"
          },
          "403": {
            "description": "管理者権限と有効な CSRF 認証情報が必要です"
          },
          "409": {
            "description": "状態の競合、レシートの不一致、または元のチャネルの返金番号が必要です"
          },
          "503": {
            "description": "元のチャネルへの照会を一時的に利用できません"
          }
        },
        "security": [
          {
            "websiteCookie": []
          }
        ],
        "summary": "元の返金タスクを照合して復旧"
      }
    },
    "/api/v1/auth/complete-email": {
      "post": {
        "operationId": "completeAccountEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "type": "string",
                    "writeOnly": true
                  },
                  "token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "completed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "completed"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [],
        "summary": "1 回限りのメール認証情報を完了",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/email": {
      "post": {
        "operationId": "requestAccountEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "kind": {
                    "enum": [
                      "verify",
                      "reset"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "kind"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "accepted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "accepted"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [],
        "summary": "確認メールまたはパスワード復旧メールを要求",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/identity-keys": {
      "get": {
        "operationId": "launchIdentityPublicKeys",
        "responses": {
          "200": {
            "description": "Ed25519 公開鍵。署名秘密鍵の内容は含みません"
          }
        },
        "summary": "Launch アカウント ID 用の固定された公開署名鍵"
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "description": "アプリケーションでは kind=desktop を設定し、ブラウザーの Origin ヘッダーを省略します。ウェブサイトのログインは Cookie を設定し、access_token を省略します。",
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "kind": {
                    "default": "website",
                    "enum": [
                      "desktop",
                      "website"
                    ],
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SessionGrant"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [],
        "summary": "ウェブサイトまたはデスクトップにログイン",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "logout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "required": [],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "completed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "completed"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "現在のセッションを失効。SDK のクローズ、ローカルの消去、デバイス解放は別々の操作です",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "operationId": "registerCustomer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "password": {
                    "description": "12–128 UTF-8 バイト（サーバーは Unicode 文字ではなくバイト数を数えます）。",
                    "type": "string",
                    "writeOnly": true,
                    "x-maxBytes": 128,
                    "x-minBytes": 12
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "accepted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "accepted"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [],
        "summary": "顧客を登録。認証は事業者のメール設定に従います",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/licensing/documentation": {
      "get": {
        "operationId": "readExternalLicensingGuide",
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "公開文書"
          }
        },
        "security": [],
        "summary": "公開外部ライセンス文書"
      }
    },
    "/api/v1/licensing/protocol": {
      "get": {
        "operationId": "readExternalLicensingProtocol",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "公開文書"
          }
        },
        "security": [],
        "summary": "公開外部ライセンス文書"
      }
    },
    "/api/v1/me": {
      "get": {
        "operationId": "currentUser",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "session_id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "user": {
                          "$ref": "#/components/schemas/User"
                        }
                      },
                      "required": [
                        "user",
                        "session_id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "認証済みアカウントを取得",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/me/orders": {
      "get": {
        "operationId": "listOrders",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      },
                      "type": "array"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "現在の顧客の注文一覧",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/me/products/{id}/delivery": {
      "get": {
        "operationId": "readOwnedExternalDelivery",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": true,
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalDeliveryResponse"
                }
              }
            },
            "description": "成功レスポンス"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効な設定／入力"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "認証が必要です"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "管理者が必要、無効な CSRF、または禁止された範囲"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "所有するリソースがありません"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "変更不可のマッピング、移行が必要、または購入が未準備"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "レート制限"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ストレージ／外部サービスを利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "現在所有する外部配信を取得。ランタイム認可の判断には使用しません",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/me/sessions": {
      "get": {
        "operationId": "listSessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SessionView"
                      },
                      "type": "array"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "有効なアカウントセッション一覧",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/me/sessions/{id}": {
      "delete": {
        "operationId": "revokeSession",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "completed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "completed"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "自分が所有するセッションを失効",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/orders": {
      "post": {
        "description": "価格はサーバーで計算されます。更新とアップグレードにはサーバー発行の見積もりが必要です。ホスト型チェックアウトに進んでください。リダイレクトからの復帰は支払いの証拠ではありません。",
        "operationId": "createCheckout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "enum": [
                      "purchase",
                      "renew",
                      "upgrade"
                    ],
                    "type": "string"
                  },
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  },
                  "idempotency_key": {
                    "description": "安定した操作識別子、16–80 UTF-8 バイト。同じ操作の再試行には同じキーを再利用します。",
                    "type": "string",
                    "x-maxBytes": 80,
                    "x-minBytes": 16
                  },
                  "plan_version_id": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "product_id": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "provider": {
                    "enum": [
                      "stripe",
                      "paypal",
                      "waffo",
                      "paddle"
                    ],
                    "type": "string"
                  },
                  "purchase_periods": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "quote_token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "product_id",
                  "plan_version_id",
                  "environment",
                  "provider",
                  "idempotency_key"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Checkout"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "安定した冪等性キーを使用して所有するチェックアウトを作成または復旧",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "operationId": "getOrder",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Checkout"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "所有する注文と履行状況を取得",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/orders/{id}/reconcile": {
      "post": {
        "operationId": "reconcileOrder",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "required": [],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Checkout"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "所有する注文について決済プロバイダーに照会",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/software/products/{id}/credential": {
      "post": {
        "deprecated": true,
        "description": "ブラウザーセッションはライセンスキーを取得できません。クライアントが選択したユーザー ID は受け付けません。403 ENTITLEMENT_PENDING には Retry-After: 3 が含まれ、再試行には上限が必要です。EXPIRED/SUSPENDED にはユーザーの操作が必要です。404 ENTITLEMENT_NOT_PURCHASED は所有する権利がないことを意味します。",
        "operationId": "softwareCredential",
        "parameters": [
          {
            "description": "Launch 製品 ID。Licentivo 製品 ID ではありません。",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "environment"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "410": {
            "description": "LICENSE_CREDENTIAL_REMOVED。ライセンスキーは返されません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          }
        ],
        "summary": "削除済み：アカウント SDK は ID 交換を使用する必要があります",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/software/products/{id}/identity": {
      "post": {
        "operationId": "exchangeAccountIdentity",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "environment"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchIdentity"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "ID コンテキストのみ。認可は Licentivo が判断します。"
          },
          "401": {
            "description": "アカウントセッションが拒否されました"
          },
          "503": {
            "description": "ID 接続を利用できません"
          }
        },
        "security": [
          {
            "desktopBearer": []
          }
        ],
        "summary": "公式 SDK 用の短期間有効なアカウント ID アサーションを取得"
      }
    },
    "/api/v1/software/products/{id}/status": {
      "get": {
        "description": "これは購入／同期情報であり、ランタイム認可の許可ではありません。",
        "operationId": "softwareStatus",
        "parameters": [
          {
            "description": "Launch 製品 ID。Licentivo 製品 ID ではありません。",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "default": "live",
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitlementStatus"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功レスポンス。"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "無効なフィールド、製品 ID または環境。"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED（ログイン）または AUTH_REQUIRED（期限切れ／失効済みセッション）。拒否されたセッションを消去し、明示的な拒否後にフォールバックしてはいけません。"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "禁止、メール認証が必要、初期パスワード変更が必要、または明示的な権利拒否。"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED。短い間隔で繰り返し再試行しないでください。",
            "headers": {
              "Retry-After": {
                "description": "次の試行まで待つ秒数。この値を守り、再試行の合計回数に上限を設けてください。",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "一時的なサービスまたはデータベース障害。オフラインアクセスは有効な公式 SDK の署名済み許可によってのみ認められます。"
          }
        },
        "security": [
          {
            "desktopBearer": []
          }
        ],
        "summary": "認証済み顧客と要求された製品について対応可能な状態を取得",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/system/status": {
      "get": {
        "operationId": "getSystemStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "implemented": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "phase": {
                          "const": "local-development"
                        },
                        "product": {
                          "const": "Licentivo Launch"
                        },
                        "sales_enabled": {
                          "const": false
                        },
                        "version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "product",
                        "version",
                        "phase",
                        "sales_enabled",
                        "implemented"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "現在の開発段階と実装範囲"
          }
        },
        "summary": "設定や認証情報を含めずバージョンと実装範囲を公開"
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getLiveness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "HTTP プロセスは稼働中です"
          }
        },
        "summary": "データベースの準備状態とは独立したプロセスの生存確認"
      }
    },
    "/readyz": {
      "get": {
        "operationId": "getReadiness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadinessResponse"
                }
              }
            },
            "description": "データベースは準備完了です。決済やライセンスの受け入れ確認を証明するものではありません"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadinessResponse"
                }
              }
            },
            "description": "データベースが未設定、利用不可、または必要なテーブルがありません"
          }
        },
        "summary": "MySQL 接続と必要な GORM テーブルをチェック"
      }
    }
  },
  "servers": [
    {
      "description": "事業者のオリジンに置き換えてください。HTTP はループバックの sandbox 開発でのみ許可されます。",
      "url": "https://shop.example.com"
    }
  ]
}
