{
  "openapi": "3.1.0",
  "info": {
    "title": "Netter Intelligence Control API",
    "version": "0.1.0",
    "description": "API gestionale. Modifiche con sessione cookie e Origin autorizzato. Incassi con bonifico confermati da Netter Srl; pagamenti Stripe confermati da eventi firmati e riletti da Stripe."
  },
  "servers": [
    {
      "url": "https://admin.llm.netter.io/api/v1"
    }
  ],
  "security": [
    {
      "session": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "get_me",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/tenants": {
      "get": {
        "operationId": "get_tenants",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_tenants",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyRequest"
              }
            }
          }
        }
      }
    },
    "/dashboard": {
      "get": {
        "operationId": "get_dashboard",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/groups": {
      "get": {
        "operationId": "get_groups",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_groups",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/groups/{id}/members": {
      "post": {
        "operationId": "post_groups_id_members",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/members": {
      "get": {
        "operationId": "get_members",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_members",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/keys": {
      "get": {
        "operationId": "get_keys",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_keys",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyRequest"
              }
            }
          }
        }
      }
    },
    "/keys/{id}": {
      "delete": {
        "operationId": "delete_keys_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/policies": {
      "get": {
        "operationId": "get_policies",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "operationId": "put_policies",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Policy"
              }
            }
          }
        }
      }
    },
    "/providers": {
      "get": {
        "operationId": "get_providers",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_providers",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderWrite"
              }
            }
          }
        }
      }
    },
    "/routes": {
      "get": {
        "operationId": "get_routes",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_routes",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "profile": {
                    "$ref": "#/components/schemas/Profile"
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "switchyard": {
                        "$ref": "#/components/schemas/SwitchyardTarget"
                      }
                    }
                  },
                  "public_name": {
                    "type": "string",
                    "description": "Nome servito ai client; se omesso o vuoto usa upstream_model."
                  },
                  "upstream_model": {
                    "type": "string",
                    "description": "ID esatto inviato al provider. Indipendente dal nome pubblico."
                  }
                },
                "description": "Mapping da un nome pubblico al target upstream nativo, con tariffa e tag Switchyard. profile rimane un sinonimo legacy del nome pubblico."
              }
            }
          }
        }
      }
    },
    "/billing": {
      "get": {
        "operationId": "get_billing",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/billing/topups": {
      "post": {
        "operationId": "post_billing_topups",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopupRequest"
              }
            }
          }
        },
        "description": "Crea una richiesta di ricarica. Con Stripe configurato l’IVA è calcolata da Stripe Tax anche per i bonifici."
      }
    },
    "/billing/allocations": {
      "post": {
        "operationId": "post_billing_allocations",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Allocation"
              }
            }
          }
        }
      }
    },
    "/billing/schedules": {
      "post": {
        "operationId": "post_billing_schedules",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Allocation"
              }
            }
          }
        }
      }
    },
    "/billing/transfers": {
      "post": {
        "operationId": "post_billing_transfers",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Transfer"
              }
            }
          }
        }
      }
    },
    "/billing/commission-agreements": {
      "post": {
        "operationId": "post_billing_commission_agreements",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/payments": {
      "get": {
        "operationId": "get_admin_payments",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/admin/payments/{id}/confirm": {
      "post": {
        "operationId": "post_admin_payments_id_confirm",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentConfirmation"
              }
            }
          }
        }
      }
    },
    "/admin/payments/{id}/report": {
      "post": {
        "operationId": "post_admin_payments_id_report",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/payments/{id}/reverse": {
      "post": {
        "operationId": "post_admin_payments_id_reverse",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/invoices/{id}/issue": {
      "post": {
        "operationId": "post_admin_invoices_id_issue",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/users": {
      "get": {
        "operationId": "get_admin_users",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/admin/users/{id}/role": {
      "post": {
        "operationId": "post_admin_users_id_role",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/audit": {
      "get": {
        "operationId": "get_audit",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/chat": {
      "post": {
        "operationId": "post_chat",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "reasoning_effort": {
                    "$ref": "#/components/schemas/ReasoningEffort"
                  }
                },
                "description": "Con model=switchyard la selezione genera un consumo distinto dalla risposta, entro il budget complessivo. I target e le tariffe sono controllati dal server."
              }
            }
          }
        }
      }
    },
    "/conversations": {
      "get": {
        "operationId": "get_conversations",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_conversations",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/conversations/{id}": {
      "get": {
        "operationId": "get_conversations_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "delete_conversations_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/files": {
      "post": {
        "operationId": "post_files",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/files/{id}": {
      "get": {
        "operationId": "get_files_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "delete_files_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/consultations": {
      "get": {
        "operationId": "get_consultations",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_consultations",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/consultations/{id}/{action}": {
      "post": {
        "operationId": "post_consultations_id_action",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/slots": {
      "get": {
        "operationId": "get_slots",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_slots",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/privacy/export": {
      "get": {
        "operationId": "get_privacy_export",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/privacy/delete": {
      "post": {
        "operationId": "post_privacy_delete",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/embeddings/reindex-completed": {
      "post": {
        "operationId": "post_embeddings_reindex_completed",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/members/{id}": {
      "delete": {
        "operationId": "delete_members_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "operationId": "put_members_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/tenants/{id}": {
      "post": {
        "operationId": "post_admin_tenants_id",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/usage": {
      "get": {
        "operationId": "get_admin_usage",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/admin/usage/{id}/reconcile": {
      "post": {
        "operationId": "post_admin_usage_id_reconcile",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "operationId": "get_notifications",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/notifications/{id}/read": {
      "post": {
        "operationId": "post_notifications_id_read",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/notifications/settings": {
      "get": {
        "operationId": "get_notification_settings",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Sessione richiesta"
          }
        }
      },
      "put": {
        "operationId": "update_notification_settings",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Sessione richiesta"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ntfy_enabled"
                ],
                "properties": {
                  "ntfy_enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/notifications/prompt-dismiss": {
      "post": {
        "operationId": "dismiss_notification_prompt",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Sessione richiesta"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/notifications/test": {
      "post": {
        "operationId": "test_notifications",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Sessione richiesta"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/notifications/stream": {
      "get": {
        "operationId": "stream_notifications",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Sessione richiesta"
          }
        }
      }
    },
    "/api/v1/admin/system": {
      "get": {
        "operationId": "getSystemConfiguration",
        "summary": "Configurazione mascherata, revisioni e stato VPS (Netter admin)",
        "responses": {
          "200": {
            "description": "Configurazione e stato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "Ruolo non autorizzato"
          }
        }
      },
      "put": {
        "operationId": "updateSystemConfiguration",
        "summary": "Accoda configurazione, ripristino o riavvio con versione ottimistica",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "version"
                ],
                "properties": {
                  "version": {
                    "type": "integer"
                  },
                  "patch": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "rollback_revision": {
                    "type": "integer"
                  },
                  "restart_service": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revisione accodata"
          },
          "400": {
            "description": "Configurazione non valida"
          },
          "403": {
            "description": "Ruolo o origine non autorizzati"
          },
          "409": {
            "description": "Conflitto versione o operazione in corso"
          },
          "503": {
            "description": "Agente indisponibile"
          }
        }
      }
    },
    "/models": {
      "get": {
        "operationId": "get_public_models",
        "responses": {
          "200": {
            "description": "Modelli pubblicati, abilitati e consentiti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicModel"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/models/{name}": {
      "put": {
        "operationId": "rename_public_model",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "public_name"
                ],
                "properties": {
                  "public_name": {
                    "$ref": "#/components/schemas/Profile"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Nome e riferimenti aggiornati atomicamente; riservato agli amministratori Netter"
          },
          "409": {
            "description": "Nome già utilizzato"
          }
        }
      }
    },
    "/chat-exports": {
      "get": {
        "operationId": "get_chat_exports",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatExportSettings"
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "summary": "Destinazione S3 e stato esportazioni; solo amministratori del tenant"
      },
      "put": {
        "operationId": "put_chat_exports",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "integer"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "pii_masked": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "summary": "Configura archivio Parquet Zstd delle chat completate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatExportUpdate"
              }
            }
          }
        }
      }
    },
    "/chat-exports/test": {
      "post": {
        "operationId": "test_chat_exports",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reachable": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "summary": "Verifica accesso al bucket salvato (HeadBucket)"
      }
    },
    "/billing/topups/{id}/stripe": {
      "post": {
        "operationId": "post_billing_topups_id_stripe",
        "description": "Rilegge la sessione Stripe Checkout della ricarica e applica lo stato; restituisce checkout_url finché il pagamento è aperto.",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Operazione non autorizzata"
          },
          "409": {
            "description": "Conflitto o stato non modificabile"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/stripe/webhook": {
      "post": {
        "operationId": "post_stripe_webhook",
        "security": [],
        "description": "Endpoint eventi Stripe. Autenticato solo dalla firma Stripe-Signature (HMAC-SHA256, tolleranza 5 minuti). Eventi gestiti: checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, checkout.session.expired, charge.refunded, charge.dispute.created.",
        "parameters": [
          {
            "name": "Stripe-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Firma o evento non validi"
          },
          "503": {
            "description": "Stripe non configurato o servizio temporaneamente non disponibile; Stripe ritenta"
          }
        }
      }
    },
    "/company-verification": {
      "get": {
        "operationId": "get_company_verification",
        "summary": "Dati ed esito per amministratori effettivamente membri del tenant",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyVerification"
                }
              }
            }
          },
          "400": {
            "description": "Dati non validi"
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Ruolo o titolarità non autorizzati"
          },
          "404": {
            "description": "Azienda non trovata"
          },
          "409": {
            "description": "Revisione superata o dichiarazione mancante"
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "operationId": "submit_company_verification",
        "summary": "Corregge i dati e riporta la pratica in attesa con nuova dichiarazione",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Dati non validi"
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Ruolo o titolarità non autorizzati"
          },
          "404": {
            "description": "Azienda non trovata"
          },
          "409": {
            "description": "Revisione superata o dichiarazione mancante"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySubmission"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/admin/company-verifications": {
      "get": {
        "operationId": "list_company_verifications",
        "summary": "Coda verifiche, solo amministratori Netter",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CompanyVerification"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Dati non validi"
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Ruolo o titolarità non autorizzati"
          },
          "404": {
            "description": "Azienda non trovata"
          },
          "409": {
            "description": "Revisione superata o dichiarazione mancante"
          }
        }
      }
    },
    "/admin/company-verifications/{id}": {
      "get": {
        "operationId": "get_company_review",
        "summary": "Dettaglio con evidenze decifrate, solo amministratori Netter",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyVerification"
                }
              }
            }
          },
          "400": {
            "description": "Dati non validi"
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Ruolo o titolarità non autorizzati"
          },
          "404": {
            "description": "Azienda non trovata"
          },
          "409": {
            "description": "Revisione superata o dichiarazione mancante"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "review_company",
        "summary": "Registra una revisione umana e l’audit nella stessa transazione",
        "responses": {
          "200": {
            "description": "Operazione completata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Dati non validi"
          },
          "401": {
            "description": "Autenticazione richiesta"
          },
          "403": {
            "description": "Ruolo o titolarità non autorizzati"
          },
          "404": {
            "description": "Azienda non trovata"
          },
          "409": {
            "description": "Revisione superata o dichiarazione mancante"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyReviewRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "netter_session"
      }
    },
    "schemas": {
      "Profile": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]*$",
        "description": "Nome pubblico esatto del modello o alias configurato; switchyard è riservato al routing intelligente."
      },
      "Money": {
        "type": "string",
        "pattern": "^\\d+(\\.\\d{1,9})?$",
        "description": "Importo decimale esatto in euro; non usare floating point."
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "code": {
                "type": "string"
              }
            }
          }
        }
      },
      "Principal": {
        "type": "object",
        "required": [
          "user_id",
          "tenant_id",
          "wallet_id",
          "role",
          "allowed_profiles",
          "pii_enabled"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "wallet_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string"
          },
          "netter_role": {
            "type": [
              "string",
              "null"
            ]
          },
          "allowed_profiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Profile"
            }
          },
          "pii_enabled": {
            "type": "boolean"
          },
          "default_profile": {
            "$ref": "#/components/schemas/Profile"
          }
        }
      },
      "TopupRequest": {
        "type": "object",
        "required": [
          "amount_eur"
        ],
        "properties": {
          "amount_eur": {
            "$ref": "#/components/schemas/Money"
          },
          "method": {
            "type": "string",
            "enum": [
              "bank_transfer",
              "stripe"
            ],
            "default": "bank_transfer",
            "description": "stripe restituisce checkout_url (Stripe Checkout); il credito è accreditato solo dopo l’evento Stripe verificato. bank_transfer resta soggetto a conferma dell’incasso."
          }
        }
      },
      "PaymentConfirmation": {
        "type": "object",
        "required": [
          "bank_reference",
          "bank_date",
          "received_eur"
        ],
        "properties": {
          "bank_reference": {
            "type": "string",
            "minLength": 6,
            "maxLength": 120
          },
          "bank_date": {
            "type": "string",
            "format": "date"
          },
          "received_eur": {
            "$ref": "#/components/schemas/Money"
          }
        }
      },
      "APIKeyRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "allowed_profiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Profile"
            }
          },
          "max_request_eur": {
            "$ref": "#/components/schemas/Money"
          },
          "budget_eur": {
            "$ref": "#/components/schemas/Money"
          },
          "expires_in_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          },
          "wallet_id": {
            "type": "string",
            "format": "uuid"
          },
          "allow_all_models": {
            "type": "boolean",
            "default": false,
            "description": "Consente anche i modelli pubblicati in futuro, sempre entro le policy superiori."
          }
        }
      },
      "Policy": {
        "type": "object",
        "required": [
          "scope_kind",
          "scope_id",
          "allowed_profiles",
          "default_profile",
          "pii_required",
          "max_request_eur"
        ],
        "properties": {
          "scope_kind": {
            "type": "string",
            "enum": [
              "netter",
              "reseller",
              "tenant",
              "group",
              "user"
            ]
          },
          "scope_id": {
            "type": "string",
            "format": "uuid"
          },
          "allowed_profiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Profile"
            },
            "minItems": 1
          },
          "default_profile": {
            "$ref": "#/components/schemas/Profile"
          },
          "pii_required": {
            "type": "boolean"
          },
          "max_request_eur": {
            "$ref": "#/components/schemas/Money"
          },
          "allow_all_models": {
            "type": "boolean",
            "default": false,
            "description": "Consente anche i modelli pubblicati in futuro, sempre entro le policy superiori."
          }
        }
      },
      "Transfer": {
        "type": "object",
        "required": [
          "id",
          "source_id",
          "destination_id",
          "amount_eur"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_id": {
            "type": "string",
            "format": "uuid"
          },
          "destination_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount_eur": {
            "$ref": "#/components/schemas/Money"
          }
        }
      },
      "Allocation": {
        "type": "object",
        "required": [
          "id",
          "parent_id",
          "allocations"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_id": {
            "type": "string",
            "format": "uuid"
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "wallet_id",
                "basis_points"
              ],
              "properties": {
                "wallet_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "basis_points": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 10000
                }
              }
            }
          },
          "frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "on_topup"
            ]
          }
        }
      },
      "ProviderWrite": {
        "type": "object",
        "required": [
          "name",
          "kind",
          "base_url",
          "api_key",
          "enabled"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "deepseek",
              "typesafe",
              "compatible",
              "openrouter"
            ]
          },
          "base_url": {
            "type": "string",
            "format": "uri",
            "description": "Base HTTPS senza slash finale. OpenRouter: https://openrouter.ai/api; path del mapping: /v1/chat/completions."
          },
          "api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "Credenziale cifrata dal server, mai restituita in lettura."
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "ReasoningEffort": {
        "type": "string",
        "enum": [
          "none",
          "minimal",
          "low",
          "medium",
          "high",
          "xhigh",
          "max"
        ],
        "default": "medium",
        "description": "Switchyard cerca il livello più vicino, preferendo quello superiore a parità di distanza."
      },
      "SwitchyardTarget": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Target candidato per Switchyard."
          },
          "judge": {
            "type": "boolean",
            "description": "Classificatore Chat Completions con output JSON."
          },
          "fallback": {
            "type": "boolean",
            "description": "Target capace approvato per classificazioni non utilizzabili."
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "efforts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReasoningEffort"
            }
          },
          "effort_parameters": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "description": "Parametri nativi approvati per livello: reasoning_effort, reasoning, thinking, output_config."
          }
        }
      },
      "PublicModel": {
        "type": "object",
        "required": [
          "id",
          "display_name",
          "operations"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Profile"
          },
          "display_name": {
            "type": "string"
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChatExportUpdate": {
        "type": "object",
        "required": [
          "version",
          "enabled",
          "pii_masked"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "pii_masked": {
            "type": "boolean",
            "default": true
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "bucket": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "default": "eu-central-1"
          },
          "prefix": {
            "type": "string",
            "default": "netter-chat/"
          },
          "access_key_id": {
            "type": "string",
            "writeOnly": true,
            "description": "Omettere per conservare il valore salvato"
          },
          "secret_access_key": {
            "type": "string",
            "writeOnly": true,
            "description": "Omettere per conservare il valore salvato"
          },
          "session_token": {
            "type": "string",
            "writeOnly": true,
            "description": "Omettere per conservare il valore salvato"
          }
        }
      },
      "ChatExportSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "pii_masked": {
            "type": "boolean",
            "default": true
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "bucket": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "default": "eu-central-1"
          },
          "prefix": {
            "type": "string",
            "default": "netter-chat/"
          },
          "access_key_id": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              }
            }
          },
          "secret_access_key": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              }
            }
          },
          "session_token": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              }
            }
          },
          "stats": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "batches": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "CompanyRequest": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "name",
          "vat_number",
          "address",
          "city",
          "contact_name",
          "accepted_terms",
          "accepted_privacy",
          "declared_truthful",
          "contact_capacity"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 240
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "default": "IT",
            "description": "ISO 3166-1 alpha-2.",
            "maxLength": 240
          },
          "vat_number": {
            "type": "string",
            "description": "IT: 11 cifre con cifra di controllo corretta (non prova di attribuzione). UE: numero IVA con prefisso facoltativo. Altri paesi: identificativo fiscale.",
            "maxLength": 240
          },
          "address": {
            "type": "string",
            "maxLength": 240
          },
          "city": {
            "type": "string",
            "maxLength": 240
          },
          "postal_code": {
            "type": "string",
            "description": "Obbligatorio per paesi UE, US, CA e IN.",
            "maxLength": 240
          },
          "state": {
            "type": "string",
            "description": "Provincia o stato.",
            "maxLength": 240
          },
          "contact_name": {
            "type": "string",
            "maxLength": 240
          },
          "pec": {
            "type": "string",
            "maxLength": 240
          },
          "recipient_code": {
            "type": "string",
            "description": "Codice destinatario SDI (solo IT).",
            "maxLength": 240
          },
          "accepted_terms": {
            "type": "boolean",
            "const": true
          },
          "accepted_privacy": {
            "type": "boolean",
            "const": true
          },
          "declared_truthful": {
            "type": "boolean",
            "const": true,
            "description": "Dichiarazione di dati corretti e aggiornati e poteri per rappresentare l’azienda. Non equivale a verifica."
          },
          "contact_capacity": {
            "type": "string",
            "enum": [
              "legal_representative",
              "authorized_delegate"
            ],
            "maxLength": 240
          }
        },
        "description": "Crea un’azienda in attesa di verifica umana su fonti ufficiali. Ignora eventuali esiti di verifica inviati dal client."
      },
      "CompanySubmission": {
        "type": "object",
        "required": [
          "name",
          "vat_number",
          "address",
          "city",
          "contact_name",
          "declared_truthful",
          "contact_capacity",
          "revision"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 240
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "default": "IT",
            "description": "ISO 3166-1 alpha-2.",
            "maxLength": 240
          },
          "vat_number": {
            "type": "string",
            "description": "IT: 11 cifre con cifra di controllo corretta (non prova di attribuzione). UE: numero IVA con prefisso facoltativo. Altri paesi: identificativo fiscale.",
            "maxLength": 240
          },
          "address": {
            "type": "string",
            "maxLength": 240
          },
          "city": {
            "type": "string",
            "maxLength": 240
          },
          "postal_code": {
            "type": "string",
            "description": "Obbligatorio per paesi UE, US, CA e IN.",
            "maxLength": 240
          },
          "state": {
            "type": "string",
            "description": "Provincia o stato.",
            "maxLength": 240
          },
          "contact_name": {
            "type": "string",
            "maxLength": 240
          },
          "pec": {
            "type": "string",
            "maxLength": 240
          },
          "recipient_code": {
            "type": "string",
            "description": "Codice destinatario SDI (solo IT).",
            "maxLength": 240
          },
          "declared_truthful": {
            "type": "boolean",
            "const": true,
            "description": "Dichiarazione di dati corretti e aggiornati e poteri per rappresentare l’azienda. Non equivale a verifica."
          },
          "contact_capacity": {
            "type": "string",
            "enum": [
              "legal_representative",
              "authorized_delegate"
            ],
            "maxLength": 240
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CompanyVerification": {
        "type": "object",
        "required": [
          "id",
          "name",
          "company",
          "revision",
          "state"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "revision": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "unreviewed",
              "pending",
              "verified",
              "needs_correction"
            ]
          },
          "submitted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "reviewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "submitted_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Solo nel dettaglio amministrativo."
          },
          "reviewed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Solo nel dettaglio amministrativo."
          },
          "attestation_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "correction_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "review": {
            "$ref": "#/components/schemas/CompanyReviewEvidence"
          }
        }
      },
      "CompanyReviewEvidence": {
        "type": "object",
        "required": [
          "source",
          "checked_on",
          "evidence_reference"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "italian_official_sources",
              "national_official_sources"
            ]
          },
          "checked_on": {
            "type": "string",
            "format": "date",
            "description": "Data non futura e non precedente all’invio (Europe/Rome)."
          },
          "evidence_reference": {
            "type": "string",
            "minLength": 8,
            "maxLength": 500
          },
          "tax_confirmed": {
            "type": "boolean"
          },
          "company_matched": {
            "type": "boolean"
          },
          "authority_confirmed": {
            "type": "boolean"
          },
          "correction_message": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          }
        }
      },
      "CompanyReviewRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CompanyReviewEvidence"
          },
          {
            "type": "object",
            "required": [
              "revision",
              "state"
            ],
            "properties": {
              "revision": {
                "type": "integer",
                "minimum": 0
              },
              "state": {
                "type": "string",
                "enum": [
                  "verified",
                  "needs_correction"
                ]
              }
            }
          }
        ],
        "description": "Solo netter_admin diverso dal dichiarante. Per verified richiede tutti e tre i riscontri veri. Per needs_correction richiede una spiegazione di 8–1000 caratteri. Nessun esito VIES equivale automaticamente alla verifica aziendale."
      }
    }
  }
}
