{
  "openapi": "3.1.0",
  "info": {
    "title": "E-Receipts IT API - MF1",
    "description": "The MF1 API is used by Merchants and Cashiers to operate their PEMs: managing cashiers and cash registers, issuing, voiding and returning receipts, closing journals and requesting back-office reports. Fiscal operations (such as receipt issuance and cash closure) require mutual TLS (mTLS) authentication with the certificate of the Cash Register.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://ereceipts-it-sandbox.acubeapi.com",
      "description": "Sandbox environment"
    },
    {
      "url": "https://ereceipts-it.acubeapi.com",
      "description": "Production environment"
    }
  ],
  "paths": {
    "/v1/mf1/cashiers": {
      "get": {
        "tags": [
          "Cashier"
        ],
        "summary": "Retrieve the collection of Cashier resources",
        "operationId": "read_cashiers_v1_mf1_cashiers_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CashierStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by cashier status. If not provided, all cashiers will be returned.",
              "title": "Status"
            },
            "description": "Filter by cashier status. If not provided, all cashiers will be returned."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "title": "Size"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_TypeVar_Customized_CashierSimpleOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cashier"
        ],
        "summary": "Create a Cashier resource",
        "operationId": "create_cashier_v1_mf1_cashiers_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CashierCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashierOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/cashiers/me": {
      "get": {
        "tags": [
          "Cashier"
        ],
        "summary": "Retrieve the current Cashier resource",
        "description": "Read currently authenticated cashier's information",
        "operationId": "read_current_cashier_v1_mf1_cashiers_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashierOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/mf1/cashiers/{cashier_id}": {
      "get": {
        "tags": [
          "Cashier"
        ],
        "summary": "Retrieve a Cashier resource",
        "description": "Get a specific user by id.",
        "operationId": "read_cashier_by_id_v1_mf1_cashiers__cashier_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cashier_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Cashier Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashierOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/cashiers/{cashier_id}/disable": {
      "put": {
        "tags": [
          "Cashier"
        ],
        "summary": "Disable a Cashier resource",
        "description": "Disable a cashier.",
        "operationId": "disable_cashier_v1_mf1_cashiers__cashier_id__disable_put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "cashier_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Cashier Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashierOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/receipts": {
      "get": {
        "tags": [
          "Receipt"
        ],
        "summary": "Retrieve the collection of Receipt resources",
        "description": "Access rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_receipts_v1_mf1_pems__serial_number__receipts_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page size",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ReceiptStatus",
              "description": "Retrieve either receipts not yet sent to MF2 or receipts already sent to MF2. Default: sent receipts.",
              "default": "sent"
            },
            "description": "Retrieve either receipts not yet sent to MF2 or receipts already sent to MF2. Default: sent receipts."
          },
          {
            "name": "order[document_number]",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "desc",
                "asc"
              ],
              "type": "string",
              "description": "Order receipts in ascending or descending order with respect to their document_number",
              "default": "desc",
              "title": "Order[Document Number]"
            },
            "description": "Order receipts in ascending or descending order with respect to their document_number"
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Retrieve receipt with specified document number",
              "title": "Document Number"
            },
            "description": "Retrieve receipt with specified document number"
          },
          {
            "name": "document_datetime[before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by receipts issued before specified datetime (value included)",
              "title": "Document Datetime[Before]"
            },
            "description": "Filter by receipts issued before specified datetime (value included)"
          },
          {
            "name": "document_datetime[strictly_before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by receipts issued before specified datetime (value strictly before)",
              "title": "Document Datetime[Strictly Before]"
            },
            "description": "Filter by receipts issued before specified datetime (value strictly before)"
          },
          {
            "name": "document_datetime[after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by receipts issued after specified datetime (value included)",
              "title": "Document Datetime[After]"
            },
            "description": "Filter by receipts issued after specified datetime (value included)"
          },
          {
            "name": "document_datetime[strictly_after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by receipts issued after specified datetime (value strictly after)",
              "title": "Document Datetime[Strictly After]"
            },
            "description": "Filter by receipts issued after specified datetime (value strictly after)"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ReceiptType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReceiptType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by receipts with specified type",
              "title": "Type"
            },
            "description": "Filter by receipts with specified type"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_ReceiptOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems": {
      "get": {
        "tags": [
          "PEM"
        ],
        "summary": "Retrieve the collection of PEM resources",
        "operationId": "read_pem_collection_v1_mf1_pems_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PEMStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "title": "Size"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_TypeVar_Customized_PemOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}": {
      "get": {
        "tags": [
          "PEM"
        ],
        "summary": "Retrieve a PEM resource",
        "operationId": "read_pem_v1_mf1_pems__serial_number__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PemDetailedOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/close": {
      "post": {
        "tags": [
          "PEM"
        ],
        "summary": "Close a Journal",
        "description": "Performs the daily fiscal closure (chiusura di cassa) and closes the active Journal. This action triggers the upload of the journal to the **MF2 fiscal module**, which then generates the daily report (**File dei Corrispettivi**) for transmission to the Italian Tax Authority (Agenzia delle Entrate). To ensure regulatory compliance, the system enforces an automatic closure 24 hours after the issuance of the first document of the day if this endpoint is not manually invoked within that timeframe.",
        "operationId": "close_journal_v1_mf1_pems__serial_number__close_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel400BadRequest"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/activation": {
      "post": {
        "tags": [
          "PEM"
        ],
        "summary": "Send PEM activation request",
        "description": "Trigger the activation process of a PEM by requesting a certificate to the Italian Tax Authority. The registration key must be provided only for cloud PEMs, while it can be omitted for on-premise PEMs.",
        "operationId": "trigger_activation_request_v1_mf1_pems__serial_number__activation_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PemActivationInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/offline-period": {
      "post": {
        "tags": [
          "PEM"
        ],
        "summary": "Communicate an offline period",
        "description": "Allows merchants to report that a PEM device has gone offline.\n\nWhen the Italian Tax Authority receives the request, it verifies that:\n- The specified datetime is not in the future\n- Status change constraints are respected\n- The offline period is consistent with existing periods in the system\n\nThe system always returns a response indicating whether the request was accepted or rejected. If rejected, the response includes the reason for rejection.",
        "operationId": "communicate_offline_period_v1_mf1_pems__serial_number__offline_period_post",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM serial number",
              "title": "Serial Number"
            },
            "description": "The PEM serial number"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PemOfflineRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel400BadRequest"
                }
              }
            },
            "description": "Bad Request"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/emergency-reports": {
      "post": {
        "tags": [
          "EmergencyReport"
        ],
        "summary": "Upload an Emergency Report",
        "operationId": "upload_emergency_report_v1_mf1_pems__serial_number__emergency_reports_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM serial number",
              "title": "Serial Number"
            },
            "description": "The PEM serial number"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmergencyReportInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel400BadRequest"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/download-data": {
      "get": {
        "tags": [
          "PEM"
        ],
        "summary": "Download PEM data",
        "description": "Download all the data stored in the specified PEM generated in the last 48 hours. Not allowed when the PEM journal status is \"open\".",
        "operationId": "download_pem_data_v1_mf1_pems__serial_number__download_data_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM serial number",
              "title": "Serial Number"
            },
            "description": "The PEM serial number"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the requested data as a ZIP archive",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Download Pem Data V1 Mf1 Pems  Serial Number  Download Data Get"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/device-events": {
      "get": {
        "tags": [
          "DeviceEvent"
        ],
        "summary": "Retrieve the device events of a PEM",
        "description": "The events of the PEM, most recent first.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_device_events_v1_mf1_pems__serial_number__device_events_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "sent_to_mf2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "`false`: the ones recorded on the PEM and not yet accepted by MF2 (`pending`). `true`: the ones MF2 has. Default: `true`.",
              "default": true,
              "title": "Sent To Mf2"
            },
            "description": "`false`: the ones recorded on the PEM and not yet accepted by MF2 (`pending`). `true`: the ones MF2 has. Default: `true`."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Page size, at most 100",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size, at most 100"
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The event code, from 01 to 07",
              "examples": [
                "02"
              ],
              "title": "Code"
            },
            "description": "The event code, from 01 to 07"
          },
          {
            "name": "occurred_at[before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Events occurred before the datetime (value included)",
              "title": "Occurred At[Before]"
            },
            "description": "Events occurred before the datetime (value included)"
          },
          {
            "name": "occurred_at[strictly_before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Events occurred before the datetime (value excluded)",
              "title": "Occurred At[Strictly Before]"
            },
            "description": "Events occurred before the datetime (value excluded)"
          },
          {
            "name": "occurred_at[after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Events occurred after the datetime (value included)",
              "title": "Occurred At[After]"
            },
            "description": "Events occurred after the datetime (value included)"
          },
          {
            "name": "occurred_at[strictly_after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Events occurred after the datetime (value excluded)",
              "title": "Occurred At[Strictly After]"
            },
            "description": "Events occurred after the datetime (value excluded)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_DeviceEventOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/device-events/{uuid}": {
      "get": {
        "tags": [
          "DeviceEvent"
        ],
        "summary": "Retrieve a device event of a PEM",
        "description": "Once sent to MF2, an event is found by the uuid MF2 assigned to it.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_device_event_v1_mf1_pems__serial_number__device_events__uuid__get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceEventOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/device-event-transmissions": {
      "get": {
        "tags": [
          "DeviceEvent"
        ],
        "summary": "Retrieve the device event transmissions of a PEM",
        "description": "The files carrying the device events and inactivity periods of the PEM to the Italian Tax Authority, most recent first.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_device_event_transmissions_v1_mf1_pems__serial_number__device_event_transmissions_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Page size, at most 100",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size, at most 100"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Mf2ReportStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The outcome of the Italian Tax Authority",
              "title": "Status"
            },
            "description": "The outcome of the Italian Tax Authority"
          },
          {
            "name": "scheduled_at[before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Files created before the datetime (value included)",
              "title": "Scheduled At[Before]"
            },
            "description": "Files created before the datetime (value included)"
          },
          {
            "name": "scheduled_at[strictly_before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Files created before the datetime (value excluded)",
              "title": "Scheduled At[Strictly Before]"
            },
            "description": "Files created before the datetime (value excluded)"
          },
          {
            "name": "scheduled_at[after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Files created after the datetime (value included)",
              "title": "Scheduled At[After]"
            },
            "description": "Files created after the datetime (value included)"
          },
          {
            "name": "scheduled_at[strictly_after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Files created after the datetime (value excluded)",
              "title": "Scheduled At[Strictly After]"
            },
            "description": "Files created after the datetime (value excluded)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_DeviceEventTransmissionOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/device-event-transmissions/{uuid}": {
      "get": {
        "tags": [
          "DeviceEvent"
        ],
        "summary": "Retrieve a device event transmission of a PEM",
        "description": "Access rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_device_event_transmission_v1_mf1_pems__serial_number__device_event_transmissions__uuid__get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceEventTransmissionOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/device-event-transmissions/{uuid}/download": {
      "get": {
        "tags": [
          "DeviceEvent"
        ],
        "summary": "Download the signed XML of a device event transmission",
        "description": "Access rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "download_device_event_transmission_v1_mf1_pems__serial_number__device_event_transmissions__uuid__download_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/xml": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/device-event-transmissions/{uuid}/result": {
      "get": {
        "tags": [
          "DeviceEvent"
        ],
        "summary": "Download the outcome of a device event transmission",
        "description": "The result XML (EsitoSegnalazioni) of the Italian Tax Authority, not found until available. On sandbox nothing is transmitted to the Italian Tax Authority: the result is signed by MF2, with code SG900.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "download_device_event_transmission_result_v1_mf1_pems__serial_number__device_event_transmissions__uuid__result_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/xml": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/inactivity-period": {
      "post": {
        "tags": [
          "InactivityPeriod"
        ],
        "summary": "Communicate an inactivity period",
        "description": "Communicate a period in which the PEM is inactive. The period is accepted and sent to the PEL asynchronously, and the PEL transmits it to the Italian Tax Authority. Communicating again the same period (same PEM, start and end) has no effect: the period is communicated only once, and the call returns 202 as the first time.",
        "operationId": "communicate_inactivity_period_v1_mf1_pems__serial_number__inactivity_period_post",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InactivityPeriodInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/inactivity-periods": {
      "get": {
        "tags": [
          "InactivityPeriod"
        ],
        "summary": "Retrieve the inactivity periods of a PEM",
        "description": "The inactivity periods of the PEM, the most recent start first.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_inactivity_periods_v1_mf1_pems__serial_number__inactivity_periods_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "sent_to_mf2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "`false`: the ones recorded on the PEM and not yet accepted by MF2 (`pending`). `true`: the ones MF2 has. Default: `true`.",
              "default": true,
              "title": "Sent To Mf2"
            },
            "description": "`false`: the ones recorded on the PEM and not yet accepted by MF2 (`pending`). `true`: the ones MF2 has. Default: `true`."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Page size, at most 100",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size, at most 100"
          },
          {
            "name": "starts_at[before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Periods starting before the datetime (value included)",
              "title": "Starts At[Before]"
            },
            "description": "Periods starting before the datetime (value included)"
          },
          {
            "name": "starts_at[strictly_before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Periods starting before the datetime (value excluded)",
              "title": "Starts At[Strictly Before]"
            },
            "description": "Periods starting before the datetime (value excluded)"
          },
          {
            "name": "starts_at[after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Periods starting after the datetime (value included)",
              "title": "Starts At[After]"
            },
            "description": "Periods starting after the datetime (value included)"
          },
          {
            "name": "starts_at[strictly_after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Periods starting after the datetime (value excluded)",
              "title": "Starts At[Strictly After]"
            },
            "description": "Periods starting after the datetime (value excluded)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_InactivityPeriodOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/inactivity-periods/{uuid}": {
      "get": {
        "tags": [
          "InactivityPeriod"
        ],
        "summary": "Retrieve an inactivity period of a PEM",
        "description": "Once sent to MF2, a period is found by the uuid MF2 assigned to it.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_inactivity_period_v1_mf1_pems__serial_number__inactivity_periods__uuid__get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InactivityPeriodOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/receipts": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Issue a sale receipt",
        "description": "Issues a new sale receipt. If this is the first transaction of the fiscal day, the system will automatically open a new Journal.",
        "operationId": "create_sale_receipt_v1_mf1_receipts_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/receipts/{receipt_uuid}": {
      "get": {
        "tags": [
          "Receipt"
        ],
        "summary": "Retrieve a Receipt resource",
        "operationId": "get_receipt_v1_mf1_receipts__receipt_uuid__get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "receipt_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Receipt Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/receipts/{receipt_uuid}/pdf": {
      "get": {
        "tags": [
          "Receipt"
        ],
        "summary": "Download the PDF of a receipt",
        "description": "Public endpoint that returns the PDF of a receipt given its UUID.",
        "operationId": "download_receipt_pdf_public_v1_mf1_receipts__receipt_uuid__pdf_get",
        "parameters": [
          {
            "name": "receipt_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Receipt Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/receipts/{receipt_uuid}/return-data": {
      "get": {
        "tags": [
          "Receipt"
        ],
        "summary": "Retrieve the return data of a sale receipt",
        "operationId": "get_return_data_v1_mf1_receipts__receipt_uuid__return_data_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "receipt_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Receipt Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnDataOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/receipts/void": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Void a receipt",
        "description": "Issues a new cancellation receipt. If this is the first transaction of the fiscal day, the system will automatically open a new Journal.",
        "operationId": "void_receipt_via_same_pem_v1_mf1_receipts_void_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidViaSamePemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/receipts/void-via-different-device": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Void a receipt issued by another device",
        "description": "Issues a cancellation receipt for a sale receipt originally issued by a different kind of device (i.e., an RT or RT Server) or a different PEM than the current one. If this is the first transaction of the fiscal day, a new Journal will automatically be opened.",
        "operationId": "void_receipt_via_different_device_v1_mf1_receipts_void_via_different_device_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidViaDifferentDeviceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/receipts/void-with-proof": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Void a receipt identified by a proof of purchase",
        "description": "Issues a cancellation receipt justified by alternative proof of purchase. In accordance with Circular 3/E (February 21, 2020), merchants may issue a cancellation receipt based on supporting evidence that verifies the original transaction, such as a POS payment slip or returnable packaging (\"vuoti a rendere\"), even when the original receipt is not present.\nIf this is the first transaction of the fiscal day, a new Fiscal Journal will automatically be opened.",
        "operationId": "void_receipt_via_proof_v1_mf1_receipts_void_with_proof_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidWithProofInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/receipts/{receipt_uuid}/details": {
      "get": {
        "tags": [
          "Receipt"
        ],
        "summary": "Retrieve the details of a receipt",
        "description": "Retrieve the details of a Receipt resource.",
        "operationId": "get_receipt_details_v1_mf1_receipts__receipt_uuid__details_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "receipt_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Receipt Uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt details in JSON format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptDetailsOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/receipts/return": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Return items from a sale receipt",
        "description": "Issues a new return receipt.\nThe returned amount can be split among the payment methods (cash, electronic, vouchers), the discount at payment time, the uncollected amount for goods and the uncollected amount for services still returnable for the sale receipt with `payment_details`; when omitted, it is split proportionally to the amounts still returnable. For each VAT summary, the part of the returned services exceeding the amount collected for them and still returnable must be returned as uncollected.\nIf this is the first transaction of the fiscal day, the system will automatically open a new Journal.",
        "operationId": "return_items_via_same_pem_v1_mf1_receipts_return_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnViaSamePemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/receipts/return-via-different-device": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Return items from a sale receipt issued by a different device",
        "description": "Issues a new return receipt for a sale receipt originally issued by a different kind of device (i.e., an RT or RT Server) or a different PEM than the current one.\nIf this is the first transaction of the fiscal day, the system will automatically open a new Journal.",
        "operationId": "return_receipt_items_via_different_device_v1_mf1_receipts_return_via_different_device_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnViaDifferentDeviceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/receipts/return-with-proof": {
      "post": {
        "tags": [
          "Receipt"
        ],
        "summary": "Return items from a receipt identified by a proof of purchase",
        "description": "Issues a return receipt justified by alternative proof of purchase. \nIn accordance with Circular 3/E (February 21, 2020), merchants may issue a return based on supporting evidence that verifies the original transaction, such as a POS payment slip or returnable packaging (\"vuoti a rendere\"), even when the original receipt is not present.\nIf this is the first transaction of the fiscal day, a new Fiscal Journal will automatically be opened.",
        "operationId": "return_receipt_items_via_proof_v1_mf1_receipts_return_with_proof_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnViaProofInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel500InternalServerError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "headers": {
              "Retry-After": {
                "description": "The time to wait before retrying the request",
                "schema": {
                  "type": "integer",
                  "example": 120
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/cash-registers": {
      "post": {
        "tags": [
          "Cash Register"
        ],
        "summary": "Create a Cash Register resource",
        "description": "Create a Cash Register and issue its mTLS client certificate, returned both as PEM (certificate and private key) and as a base64-encoded PKCS#12. The PKCS#12 is protected with the password returned in `pkcs12_password`, which is the serial number of the associated PEM.",
        "operationId": "create_cash_register_v1_mf1_cash_registers_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CashRegisterCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashRegisterDetailedOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Cash Register"
        ],
        "summary": "Retrieve the collection of Cash Register resources",
        "operationId": "get_cash_registers_v1_mf1_cash_registers_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "pem_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pem Id"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "title": "Size"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_TypeVar_Customized_CashRegisterBasicOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/cash-registers/me": {
      "get": {
        "tags": [
          "Cash Register"
        ],
        "summary": "Retrieve the Cash Register and PEM data associated with the mTLS certificate",
        "operationId": "get_current_cash_register_v1_mf1_cash_registers_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashRegisterOutput"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ]
      }
    },
    "/v1/mf1/cash-registers/{id}": {
      "get": {
        "tags": [
          "Cash Register"
        ],
        "summary": "Retrieve a Cash Register resource",
        "operationId": "get_cash_register_v1_mf1_cash_registers__id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "UUID of the cash register",
              "title": "Id"
            },
            "description": "UUID of the cash register"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashRegisterBasicOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cash Register"
        ],
        "summary": "Update a Cash Register resource",
        "operationId": "update_cash_register_v1_mf1_cash_registers__id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "UUID of the cash register",
              "title": "Id"
            },
            "description": "UUID of the cash register"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CashRegisterUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashRegisterBasicOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/notifications": {
      "get": {
        "tags": [
          "Notification"
        ],
        "summary": "Retrieve the collection of Notification resources",
        "operationId": "read_notifications_v1_mf1_notifications_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page size",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Notification_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports": {
      "get": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Retrieve the collection of Back-office Report resources",
        "description": "Access rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_backoffice_reports_v1_mf1_pems__serial_number__backoffice_reports_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page size",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/BackofficeReportType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BackofficeReportType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by back-office reports with specified type",
              "title": "Type"
            },
            "description": "Filter by back-office reports with specified type"
          },
          {
            "name": "request_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by back-office reports generated for the specified request",
              "title": "Request Uuid"
            },
            "description": "Filter by back-office reports generated for the specified request"
          },
          {
            "name": "issuance_datetime[before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by reports issued before specified datetime (value included)",
              "title": "Issuance Datetime[Before]"
            },
            "description": "Filter by reports issued before specified datetime (value included)"
          },
          {
            "name": "issuance_datetime[strictly_before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by reports issued before specified datetime (value strictly before)",
              "title": "Issuance Datetime[Strictly Before]"
            },
            "description": "Filter by reports issued before specified datetime (value strictly before)"
          },
          {
            "name": "issuance_datetime[after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by reports issued after specified datetime (value included)",
              "title": "Issuance Datetime[After]"
            },
            "description": "Filter by reports issued after specified datetime (value included)"
          },
          {
            "name": "issuance_datetime[strictly_after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by reports issued after specified datetime (value strictly after)",
              "title": "Issuance Datetime[Strictly After]"
            },
            "description": "Filter by reports issued after specified datetime (value strictly after)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_BackofficeReportOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports/requests": {
      "get": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Retrieve the collection of Back-office Report Request resources",
        "description": "Access rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "get_backoffice_report_requests_v1_mf1_pems__serial_number__backoffice_reports_requests_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page identifier",
              "default": 1,
              "title": "Page"
            },
            "description": "Page identifier"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page size",
              "default": 30,
              "title": "Size"
            },
            "description": "Page size"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/BackofficeReportType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BackofficeReportType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by back-office report requests with specified type",
              "title": "Type"
            },
            "description": "Filter by back-office report requests with specified type"
          },
          {
            "name": "request_datetime[before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by requests made before specified datetime (value included)",
              "title": "Request Datetime[Before]"
            },
            "description": "Filter by requests made before specified datetime (value included)"
          },
          {
            "name": "request_datetime[strictly_before]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by requests made before specified datetime (value strictly before)",
              "title": "Request Datetime[Strictly Before]"
            },
            "description": "Filter by requests made before specified datetime (value strictly before)"
          },
          {
            "name": "request_datetime[after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by requests made after specified datetime (value included)",
              "title": "Request Datetime[After]"
            },
            "description": "Filter by requests made after specified datetime (value included)"
          },
          {
            "name": "request_datetime[strictly_after]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by requests made after specified datetime (value strictly after)",
              "title": "Request Datetime[Strictly After]"
            },
            "description": "Filter by requests made after specified datetime (value strictly after)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_BackofficeReportRequestOutput_"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports/{report_uuid}/pdf": {
      "get": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Download the PDF of a Back-office Report resource",
        "description": "Retrieves the PDF of a back-office report (documento gestionale) issued by the given PEM.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "download_backoffice_report_pdf_v1_mf1_pems__serial_number__backoffice_reports__report_uuid__pdf_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The back-office report's UUID",
              "title": "Report Uuid"
            },
            "description": "The back-office report's UUID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports/journal-reading": {
      "post": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Queue generation of a Journal Reading Back-office Report",
        "description": "Queues generation of a back-office report showing the current sales data of the PEM's currently open journal. Returns 409 if the PEM has no open journal.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "queue_journal_reading_report_v1_mf1_pems__serial_number__backoffice_reports_journal_reading_post",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackofficeReportRequestQueuedOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports/diagnostics": {
      "post": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Queue generation of a Diagnostics Back-office Report",
        "description": "Queues generation of a back-office report showing the PEM's current status and diagnostics data. It can be requested whether the PEM's journal is open or closed. Returns 409 if the PEM is not activated, since the report is signed with the PEM's certificate.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "queue_diagnostics_report_v1_mf1_pems__serial_number__backoffice_reports_diagnostics_post",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackofficeReportRequestQueuedOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports/receipts": {
      "post": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Queue generation of a Receipt Details or Receipt Summary Back-office Report",
        "description": "Queues generation of a back-office report covering the receipts selected by `filter_by`. The `type` field selects whether the report contains the receipts' details or their summary.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "queue_receipts_backoffice_report_v1_mf1_pems__serial_number__backoffice_reports_receipts_post",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DetailsReceiptsBackofficeReportInput"
                  },
                  {
                    "$ref": "#/components/schemas/SummaryReceiptsBackofficeReportInput"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "details": "#/components/schemas/DetailsReceiptsBackofficeReportInput",
                    "summary": "#/components/schemas/SummaryReceiptsBackofficeReportInput"
                  }
                },
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackofficeReportRequestQueuedOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/backoffice-reports/maintenance-operations": {
      "post": {
        "tags": [
          "Back-office Report"
        ],
        "summary": "Queue generation of the Maintenance Operations and Software Updates Back-office Report",
        "description": "Queues generation of a back-office report listing the maintenance operations on the PEM and its software updates between two dates (both included). The maintenance operations are the resolution of an integrity issue, an unresolvable integrity issue, a software crash and a security incident. Returns 409 if the PEM is not activated, since the report is signed with the PEM's certificate.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "queue_maintenance_operations_report_v1_mf1_pems__serial_number__backoffice_reports_maintenance_operations_post",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueMaintenanceOperationsBackofficeReportInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackofficeReportRequestQueuedOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel409Conflict"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel422UnprocessableContent"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/swid": {
      "get": {
        "tags": [
          "SWID"
        ],
        "summary": "Retrieve the SWID verification status of the solution",
        "description": "Verification of the installed software against the approved SWID tags (AdE SBOM guidelines \u00a76), for the PEM and the PEL components. PEL components are reported as unreachable if the PEL can't be contacted.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "read_swid_status_v1_mf1_pems__serial_number__swid_get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwidStatusOutput"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mf1/pems/{serial_number}/swid/{component}": {
      "get": {
        "tags": [
          "SWID"
        ],
        "summary": "Download the runtime SWID of a component",
        "description": "The installed SWID tag of a PEM or PEL component with the evidence recomputed at runtime (self-attestation), to be compared with the approved one.\n\nAccess rules:\n- Merchants: require a valid JWT.\n- Cashiers: require a valid JWT and a valid certificate.",
        "operationId": "download_runtime_swid_v1_mf1_pems__serial_number__swid__component__get",
        "security": [
          {
            "HTTPBearer": [],
            "mutualTLS": []
          }
        ],
        "parameters": [
          {
            "name": "serial_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The PEM's serial number",
              "title": "Serial Number"
            },
            "description": "The PEM's serial number"
          },
          {
            "name": "component",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SwidComponent",
              "description": "The component"
            },
            "description": "The component"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/xml": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel401Unauthorized"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel403Forbidden"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel404NotFound"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel503ServiceUnavailable"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "properties": {
          "street_address": {
            "type": "string",
            "title": "Street Address",
            "description": "The street address associated to the PEM"
          },
          "street_number": {
            "type": "string",
            "title": "Street Number",
            "description": "The street number associated to the PEM"
          },
          "zip_code": {
            "type": "string",
            "maxLength": 5,
            "minLength": 5,
            "title": "Zip Code",
            "description": "The zip code associated to the PEM"
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "The city associated to the PEM"
          },
          "province": {
            "type": "string",
            "maxLength": 2,
            "minLength": 2,
            "title": "Province",
            "description": "The province associated to the PEM"
          }
        },
        "type": "object",
        "required": [
          "street_address",
          "street_number",
          "zip_code",
          "city",
          "province"
        ],
        "title": "Address"
      },
      "BackofficeReportOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid",
            "description": "The UUID of the back-office report"
          },
          "status": {
            "$ref": "#/components/schemas/BackofficeReportStatus",
            "description": "The status of the report"
          },
          "issuance_datetime": {
            "type": "string",
            "title": "Issuance Datetime",
            "description": "The date and time the report was issued (YYYY-MM-DD HH:mm:ss).",
            "examples": [
              "2025-10-08 16:20:42"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/BackofficeReportType",
            "description": "The type of the report"
          },
          "filter_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentNumberFilter"
              },
              {
                "$ref": "#/components/schemas/DocumentNumberRangeFilter"
              },
              {
                "$ref": "#/components/schemas/DateIntervalFilter"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter By",
            "description": "The filter the report was requested with. Populated only for receipts-related reports"
          },
          "document_number": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Number",
            "description": "The document number of the back-office report. Null until the report has been generated.",
            "examples": [
              "0002-0008"
            ]
          },
          "journal_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Journal Id",
            "description": "ID of the journal the report refers to. Present only for journal-closure and journal-reading reports."
          },
          "request_uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Request Uuid",
            "description": "The UUID of the request this report was generated for."
          },
          "request_datetime": {
            "type": "string",
            "title": "Request Datetime",
            "description": "The date and time the report's request was made (YYYY-MM-DD HH:mm:ss).",
            "examples": [
              "2025-10-08 16:20:42"
            ]
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "status",
          "issuance_datetime",
          "type",
          "request_uuid",
          "request_datetime"
        ],
        "title": "BackofficeReportOutput"
      },
      "BackofficeReportRequestOutput": {
        "properties": {
          "request_uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Request Uuid",
            "description": "The UUID of the back-office report request"
          },
          "type": {
            "$ref": "#/components/schemas/BackofficeReportType",
            "description": "The type of the requested report"
          },
          "filter_by": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter By",
            "description": "The filter the report was requested with. Populated only for receipts-related requests"
          },
          "status": {
            "$ref": "#/components/schemas/BackofficeReportRequestStatus",
            "description": "The status of the request"
          },
          "request_datetime": {
            "type": "string",
            "title": "Request Datetime",
            "description": "The date and time the request was made (YYYY-MM-DD HH:mm:ss).",
            "examples": [
              "2025-10-08 16:20:42"
            ]
          },
          "reports": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BackofficeReportRequestReportsOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Report-generation progress for this request. Null until the request has been processed (status == 'processed')."
          }
        },
        "type": "object",
        "required": [
          "request_uuid",
          "type",
          "status",
          "request_datetime"
        ],
        "title": "BackofficeReportRequestOutput"
      },
      "BackofficeReportRequestQueuedOutput": {
        "properties": {
          "request_uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Request Uuid",
            "description": "The UUID of the queued back-office report request"
          }
        },
        "type": "object",
        "required": [
          "request_uuid"
        ],
        "title": "BackofficeReportRequestQueuedOutput"
      },
      "BackofficeReportRequestReportsOutput": {
        "properties": {
          "ready": {
            "type": "boolean",
            "title": "Ready",
            "description": "Whether every back-office report associated with this request is ready."
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "The number of back-office reports associated with this request."
          },
          "ready_count": {
            "type": "integer",
            "title": "Ready Count",
            "description": "How many of the associated back-office reports are ready."
          }
        },
        "type": "object",
        "required": [
          "ready",
          "count",
          "ready_count"
        ],
        "title": "BackofficeReportRequestReportsOutput"
      },
      "BackofficeReportRequestStatus": {
        "type": "string",
        "enum": [
          "queued",
          "processed",
          "failed"
        ],
        "title": "BackofficeReportRequestStatus"
      },
      "BackofficeReportStatus": {
        "type": "string",
        "enum": [
          "queued",
          "processing",
          "ready",
          "failed"
        ],
        "title": "BackofficeReportStatus"
      },
      "BackofficeReportType": {
        "type": "string",
        "enum": [
          "journal_closure",
          "journal_reading",
          "diagnostics",
          "details",
          "summary",
          "maintenance_operations"
        ],
        "title": "BackofficeReportType"
      },
      "CashRegisterBasicOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "pem_serial_number": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4}-[A-Z0-9]{6}$",
            "title": "Pem Serial Number"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "pem_serial_number",
          "name"
        ],
        "title": "CashRegisterBasicOutput"
      },
      "CashRegisterCreate": {
        "properties": {
          "pem_serial_number": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4}-[A-Z0-9]{6}$",
            "title": "Pem Serial Number"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "pem_serial_number",
          "name"
        ],
        "title": "CashRegisterCreate"
      },
      "CashRegisterDetailedOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "pem_serial_number": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4}-[A-Z0-9]{6}$",
            "title": "Pem Serial Number"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mtls_certificate": {
            "$ref": "#/components/schemas/MtlsCertificateOutput"
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "pem_serial_number",
          "name",
          "mtls_certificate"
        ],
        "title": "CashRegisterDetailedOutput"
      },
      "CashRegisterOutput": {
        "properties": {
          "pem_serial_number": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4}-[A-Z0-9]{6}$",
            "title": "Pem Serial Number"
          },
          "cash_register_name": {
            "type": "string",
            "title": "Cash Register Name"
          },
          "ateco_codes": {
            "items": {
              "type": "string",
              "maxLength": 6,
              "minLength": 6
            },
            "type": "array",
            "title": "Ateco Codes"
          }
        },
        "type": "object",
        "required": [
          "pem_serial_number",
          "cash_register_name",
          "ateco_codes"
        ],
        "title": "CashRegisterOutput"
      },
      "CashRegisterUpdate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CashRegisterUpdate"
      },
      "CashierCreateInput": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 255,
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 40,
            "minLength": 8,
            "title": "Password"
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "title": "Name"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "An optional display name to be displayed in the receipt's PDF."
          }
        },
        "type": "object",
        "required": [
          "email",
          "password",
          "name",
          "display_name"
        ],
        "title": "CashierCreateInput"
      },
      "CashierOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "An optional display name to be displayed in the receipt's PDF."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "$ref": "#/components/schemas/CashierStatus"
          },
          "merchant_uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Merchant Uuid"
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "email",
          "name",
          "status",
          "merchant_uuid"
        ],
        "title": "CashierOutput"
      },
      "CashierSimpleOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "An optional display name to be displayed in the receipt's PDF."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "$ref": "#/components/schemas/CashierStatus"
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "email",
          "name",
          "status"
        ],
        "title": "CashierSimpleOutput"
      },
      "CashierStatus": {
        "type": "string",
        "enum": [
          "active",
          "disabled"
        ],
        "title": "CashierStatus"
      },
      "DailyReportEntry": {
        "properties": {
          "vat_rate_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VatRateEnum"
              },
              {
                "$ref": "#/components/schemas/NaturaType"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Rate Code",
            "description": "VAT rate (i.e., '22.00', '10.00', ecc.) or a Codice Natura (N1-N6). Mandatory if and only if `simplified_vat_allocation` is False."
          },
          "vat_amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Amount",
            "description": "VAT amount. Set only if `vat_rate_code` is a VAT rate (e.g. '22.00'). leave unset if `vat_rate_code` is a Codice Natura (N1-N6) or null."
          },
          "simplified_vat_allocation": {
            "type": "boolean",
            "title": "Simplified Vat Allocation",
            "description": "True if Ventilazione IVA (ex DM 3495 del 24/02/1973) is to be applied. If set, `vat_rate_code` and `vat_amount` must be null.",
            "default": false
          },
          "partial_amount": {
            "type": "string",
            "pattern": "^\\d{1,12}\\.\\d{2}$",
            "title": "Partial Amount",
            "description": "This amount represents the total taxable base subject to VAT, including the value reported in the `total_uncollected_complimentary` field.\n\nFor transactions subject to VAT, it must represent the total gross consideration net of VAT, gross of uncollected amounts for the supply of delivered goods, and net of the following values:\n- returns\n- cancellations (voids)\n- **payments already collected as advances** for the supply of goods not yet delivered, or for the sale of goods and services via the redemption of single-purpose vouchers (`total_prepaid_voucher_amount`)\n- uncollected amounts for the provision of services (`total_uncollected_services`)\n- uncollected amounts for which an invoice is linked to the receipt (`total_uncollected_invoiced`)\n- uncollected amounts in case of \"Distinta Contabile Riepilogativa SSN\" (`total_uncollected_dcr_to_ssn`)\n\nThese same rules also apply to transactions where the `vat_rate_code` field corresponds to a Codice Natura (i.e., \"N1\", \"N6\") or when `simplified_vat_allocation` (\"Ventilazione IVA\") is used.\nIn case of simplified VAT allocation, this amount is gross of VAT."
          },
          "total_returned_amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Returned Amount",
            "description": "Total amount of any returns processed by the merchant (taxable amount net of VAT). In the case of simplified VAT allocation (\"Ventilazione IVA\"), this amount is gross of VAT."
          },
          "total_voided_amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Voided Amount",
            "description": "Total amount of any receipts cancelled (voided) by the merchant (taxable amount net of VAT). In the case of simplified VAT allocation (\"Ventilazione IVA\"), this amount is gross of VAT."
          },
          "total_prepaid_or_voucher_amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Prepaid Or Voucher Amount",
            "description": "Total amount of consideration collected as advances for the supply of goods not yet delivered. This field is also used for the sale of goods and services via the redemption of single-purpose vouchers. The amount must be net of VAT, except in the case of simplified VAT allocation (\"Ventilazione IVA\"), where it must be gross of VAT."
          },
          "total_uncollected_services": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Uncollected Services",
            "description": "Total amount of uncollected consideration reported in receipts issued for the provision of services.The amount must be net of VAT, except in the case of simplified VAT allocation (\"Ventilazione IVA\"), where it is gross of VAT."
          },
          "total_uncollected_invoiced": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Uncollected Invoiced",
            "description": "Total amount of uncollected consideration reported in receipts that are linked to invoices. The amount must be net of VAT, except in the case of simplified VAT allocation (\"Ventilazione IVA\"), where it is gross of VAT."
          },
          "total_uncollected_dcr_to_ssn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Uncollected Dcr To Ssn",
            "description": "Total amount of uncollected consideration reported in the \"Distinta Contabile Riepilogativa\" to be transmitted to the SSN (Servizio Sanitario Nazionale). The amount must be net of VAT, except in the case of simplified VAT allocation (\"Ventilazione IVA\") where it is gross of VAT."
          },
          "total_uncollected_complimentary": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,12}\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Uncollected Complimentary",
            "description": "Total amount of uncollected consideration for complimentary items, to be included in the total taxable base subject to VAT represented by the `partial_amount` field. This amount must be net of VAT."
          },
          "ateco_code": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z0-9]{6}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ateco Code",
            "description": "The ATECO business activity code associated with the partial amount. The code must be provided as a continuous string without separators (e.g., no dots or hyphens), exactly as it appears in the ATECO classification table."
          }
        },
        "type": "object",
        "required": [
          "partial_amount"
        ],
        "title": "DailyReportEntry",
        "description": "Entry for the Emergency Report.\nIt must have exactly one between\n- `vat_rate_code`\n- `simplified_vat_allocation`\n\nIf `vat_rate_code` is set and it is a VAT rate (i.e. `22.00`, `10.00`, ...), `vat_amount` must be present."
      },
      "DateIntervalFilter": {
        "properties": {
          "starting_date": {
            "type": "string",
            "format": "date",
            "title": "Starting Date",
            "examples": [
              "2025-12-31"
            ]
          },
          "ending_date": {
            "type": "string",
            "format": "date",
            "title": "Ending Date",
            "examples": [
              "2026-02-15"
            ]
          }
        },
        "type": "object",
        "required": [
          "starting_date",
          "ending_date"
        ],
        "title": "DateIntervalFilter"
      },
      "DetailsReceiptsBackofficeReportInput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "details",
            "title": "Type",
            "description": "Line-item details of the receipt(s) in `filter_by`."
          },
          "filter_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentNumberFilter"
              },
              {
                "$ref": "#/components/schemas/DocumentNumberRangeFilter"
              },
              {
                "$ref": "#/components/schemas/DateIntervalFilter"
              }
            ],
            "title": "Filter By",
            "description": "Which receipt(s) the report covers."
          }
        },
        "type": "object",
        "required": [
          "type",
          "filter_by"
        ],
        "title": "DetailsReceiptsBackofficeReportInput"
      },
      "DeviceEventOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid",
            "description": "Assigned by the PEM while `pending`, by MF2 once received: the same event has a different uuid before and after being sent."
          },
          "code": {
            "type": "string",
            "title": "Code",
            "description": "The event code, from 01 to 07",
            "examples": [
              "02"
            ]
          },
          "datetime": {
            "type": "string",
            "format": "date-time",
            "title": "Datetime",
            "description": "When the event occurred"
          },
          "occurrences": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Occurrences",
            "description": "How many times the event occurred"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "First notice of the malfunction"
          },
          "restored_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restored At",
            "description": "When the malfunction was fixed"
          },
          "operations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operations",
            "description": "Operations recorded during the malfunction"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "The installed version, for software updates (01)"
          },
          "status": {
            "$ref": "#/components/schemas/DeviceEventStatus",
            "description": "Where it is, on its way to the Italian Tax Authority: `pending` (recorded on the PEM, not yet accepted by MF2), `received` (accepted by MF2, not yet in a file), `transmitted` (in a file sent to the Italian Tax Authority, whose outcome is not available yet), then the outcome of the file: `ok`, `warning` or `error`."
          },
          "transmission_uuid": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transmission Uuid",
            "description": "The file that carried it to the Italian Tax Authority, null until `transmitted`."
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "code",
          "datetime",
          "status",
          "transmission_uuid"
        ],
        "title": "DeviceEventOutput",
        "description": "An event (segnalazione) of the PEM."
      },
      "DeviceEventStatus": {
        "type": "string",
        "enum": [
          "pending",
          "received",
          "transmitted",
          "ok",
          "warning",
          "error"
        ],
        "title": "DeviceEventStatus",
        "description": "Where a device event or an inactivity period is, on its way to the Italian Tax\nAuthority. States only move forward: pending, received, transmitted, then one of\nok, warning and error."
      },
      "DeviceEventTransmissionOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "title": "Scheduled At",
            "description": "When the file was created"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Mf2ReportStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "The outcome of the Italian Tax Authority, null until available: `ok`, `warning` or `error`."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "When the Italian Tax Authority processed the file"
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "scheduled_at",
          "status",
          "completed_at"
        ],
        "title": "DeviceEventTransmissionOutput",
        "description": "A file of events and inactivity periods of the PEM, transmitted to the Italian\nTax Authority."
      },
      "DocumentNumberFilter": {
        "properties": {
          "document_number": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{4}$",
            "title": "Document Number",
            "examples": [
              "1234-5678"
            ]
          }
        },
        "type": "object",
        "required": [
          "document_number"
        ],
        "title": "DocumentNumberFilter"
      },
      "DocumentNumberRange": {
        "properties": {
          "start": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{4}$",
            "title": "Start",
            "examples": [
              "0001-0001"
            ]
          },
          "end": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{4}$",
            "title": "End",
            "examples": [
              "0001-0009"
            ]
          }
        },
        "type": "object",
        "required": [
          "start",
          "end"
        ],
        "title": "DocumentNumberRange"
      },
      "DocumentNumberRangeFilter": {
        "properties": {
          "document_numbers": {
            "$ref": "#/components/schemas/DocumentNumberRange"
          }
        },
        "type": "object",
        "required": [
          "document_numbers"
        ],
        "title": "DocumentNumberRangeFilter"
      },
      "EmergencyReportInput": {
        "properties": {
          "datetime": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Datetime",
            "description": "Date and time of the daily closure (format: YYYY-MM-DDTHH:MM:SS)",
            "examples": [
              "2026-01-15T12:00:00"
            ]
          },
          "documents_count": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Documents Count",
            "description": "The number of receipts in the Emergency Report included in this transmission pertaining to the closure date specified in `datetime`."
          },
          "cash_payment_amount": {
            "type": "string",
            "pattern": "^\\d{1,12}\\.\\d{2}$",
            "title": "Cash Payment Amount",
            "description": "Total paid in cash",
            "default": "0.00"
          },
          "electronic_payment_amount": {
            "type": "string",
            "pattern": "^\\d{1,12}\\.\\d{2}$",
            "title": "Electronic Payment Amount",
            "description": "Total paid electronically",
            "default": "0.00"
          },
          "discount": {
            "type": "string",
            "pattern": "^\\d{1,12}\\.\\d{2}$",
            "title": "Discount",
            "description": "Amount of the discount applied during the payment phase. This field must also include the amount of payments made using multi-purpose vouchers.\nThe amount must be gross of VAT.\nThis amount does not affect the following fields: `partial_amount`, `vat_rate_code`, and `vat_amount`.",
            "default": "0.00"
          },
          "ticket_restaurant_payment_amount": {
            "type": "string",
            "pattern": "^\\d{1,12}\\.\\d{2}$",
            "title": "Ticket Restaurant Payment Amount",
            "description": "Total paid with tickets invoiced by third parties (i.e., meal vouchers, celiac disease vouchers, promotional vouchers).\nThe amount must be gross of VAT.",
            "default": "0.00"
          },
          "ticket_restaurant_quantity": {
            "type": "integer",
            "title": "Ticket Restaurant Quantity",
            "description": "Number of tickets invoiced by third parties (i.e., meal vouchers, celiac disease vouchers, or promotional vouchers) provided by the client to the merchant as payment, corresponding to the amount indicated in `ticket_restaurant_payment_amount`.",
            "default": 0
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/DailyReportEntry"
            },
            "type": "array",
            "maxItems": 40,
            "title": "Entries",
            "description": "List of summary entries"
          }
        },
        "type": "object",
        "required": [
          "datetime",
          "documents_count",
          "entries"
        ],
        "title": "EmergencyReportInput"
      },
      "ErrorModel400BadRequest": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/400"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Bad Request"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 400
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel400BadRequest"
      },
      "ErrorModel401Unauthorized": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/401"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Unauthorized"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 401
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel401Unauthorized"
      },
      "ErrorModel403Forbidden": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/403"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Forbidden"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 403
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel403Forbidden"
      },
      "ErrorModel404NotFound": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/404"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Not Found"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 404
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel404NotFound"
      },
      "ErrorModel409Conflict": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/409"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Conflict"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 409
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel409Conflict"
      },
      "ErrorModel422UnprocessableContent": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/422"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Unprocessable Content"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 422
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          },
          "violations": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Violations",
            "description": "List of validation errors if any"
          }
        },
        "type": "object",
        "title": "ErrorModel422UnprocessableContent"
      },
      "ErrorModel500InternalServerError": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/500"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Internal Server Error"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 500
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel500InternalServerError"
      },
      "ErrorModel503ServiceUnavailable": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "default": "/errors/503"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": "Service Unavailable"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "default": 503
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance",
            "default": "A URI reference that identifies the specific occurrence of the problem"
          }
        },
        "type": "object",
        "title": "ErrorModel503ServiceUnavailable"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InactivityPeriodInput": {
        "properties": {
          "start_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Start At",
            "description": "Start of the inactivity period (format: YYYY-MM-DDTHH:MM:SS)",
            "examples": [
              "2026-01-15T12:00:00"
            ]
          },
          "end_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "End At",
            "description": "End of the inactivity period, after start_at (format: YYYY-MM-DDTHH:MM:SS)",
            "examples": [
              "2026-01-25T12:00:00"
            ]
          }
        },
        "type": "object",
        "required": [
          "start_at",
          "end_at"
        ],
        "title": "InactivityPeriodInput"
      },
      "InactivityPeriodOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid",
            "description": "Assigned by the PEM while `pending`, by MF2 once received: the same period has a different uuid before and after being sent."
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "title": "Starts At"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Ends At"
          },
          "status": {
            "$ref": "#/components/schemas/DeviceEventStatus",
            "description": "Where it is, on its way to the Italian Tax Authority: `pending` (recorded on the PEM, not yet accepted by MF2), `received` (accepted by MF2, not yet in a file), `transmitted` (in a file sent to the Italian Tax Authority, whose outcome is not available yet), then the outcome of the file: `ok`, `warning` or `error`."
          },
          "transmission_uuid": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transmission Uuid",
            "description": "The file that carried it to the Italian Tax Authority, null until `transmitted`."
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "starts_at",
          "ends_at",
          "status",
          "transmission_uuid"
        ],
        "title": "InactivityPeriodOutput",
        "description": "An inactivity period of the PEM. It follows the lifecycle of the device\nevents: it is sent to MF2 and transmitted to the Italian Tax Authority with them."
      },
      "ItemType": {
        "type": "string",
        "enum": [
          "goods",
          "service"
        ],
        "title": "ItemType"
      },
      "MealVouchersInvoicedToIssuer": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Meal-vouchers invoiced-to-issuer option in effect: whether the merchant invoices the meal vouchers issuer."
          },
          "last_switched_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Switched At",
            "description": "Datetime when `enabled` last switched value, i.e. since when its current value has been in effect, whether true or false (format: YYYY-MM-DDTHH:MM:SS). A switch due while a journal is open takes effect when that journal closes, so this may be later than the next_switch_at it replaced. Null if the option has never switched, or if when it last switched is unknown.",
            "examples": [
              "2026-10-15T12:00:00"
            ]
          },
          "next_switch_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Switch At",
            "description": "Datetime from which `enabled` is due to switch to the opposite value (format: YYYY-MM-DDTHH:MM:SS). Null if no switch is pending. The switch is applied only when a journal is opened or closed, so this may already be in the past while the switch is still pending.",
            "examples": [
              "2026-11-01T00:00:00"
            ]
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "last_switched_at",
          "next_switch_at"
        ],
        "title": "MealVouchersInvoicedToIssuer"
      },
      "Mf2ReportStatus": {
        "type": "string",
        "enum": [
          "ok",
          "warning",
          "error"
        ],
        "title": "Mf2ReportStatus",
        "description": "The outcome of the Italian Tax Authority for a transmitted file."
      },
      "MtlsCertificateOutput": {
        "properties": {
          "pem": {
            "$ref": "#/components/schemas/MtlsCertificatePemOutput"
          },
          "pkcs12": {
            "type": "string",
            "title": "Pkcs12"
          },
          "pkcs12_password": {
            "type": "string",
            "title": "Pkcs12 Password"
          }
        },
        "type": "object",
        "required": [
          "pem",
          "pkcs12",
          "pkcs12_password"
        ],
        "title": "MtlsCertificateOutput"
      },
      "MtlsCertificatePemOutput": {
        "properties": {
          "certificate": {
            "type": "string",
            "title": "Certificate"
          },
          "private_key": {
            "type": "string",
            "title": "Private Key"
          }
        },
        "type": "object",
        "required": [
          "certificate",
          "private_key"
        ],
        "title": "MtlsCertificatePemOutput"
      },
      "NaturaType": {
        "type": "string",
        "enum": [
          "N1",
          "N2",
          "N3",
          "N4",
          "N5",
          "N6"
        ],
        "title": "NaturaType",
        "description": "Natura codes with their corresponding descriptions."
      },
      "Notification": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid",
            "description": "The UUID of the notification"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "The message of the notification"
          },
          "scope": {
            "type": "string",
            "enum": [
              "global",
              "merchant",
              "pem"
            ],
            "title": "Scope",
            "description": "The scope of the notification"
          },
          "type": {
            "$ref": "#/components/schemas/NotificationType",
            "description": "The type of the notification"
          },
          "code": {
            "$ref": "#/components/schemas/NotificationCode",
            "description": "The code of the notification"
          },
          "source": {
            "$ref": "#/components/schemas/NotificationSource",
            "description": "The source of the notification"
          },
          "level": {
            "$ref": "#/components/schemas/NotificationLevel",
            "description": "The level of the notification"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "The datetime the notification was created"
          },
          "payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload",
            "description": "Notification-specific data"
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "message",
          "scope",
          "type",
          "code",
          "source",
          "level",
          "created_at"
        ],
        "title": "Notification"
      },
      "NotificationCode": {
        "type": "string",
        "enum": [
          "SYS-I-01",
          "SYS-I-02",
          "SYS-W-01",
          "SYS-C-01"
        ],
        "title": "NotificationCode"
      },
      "NotificationLevel": {
        "type": "string",
        "enum": [
          "info",
          "warning",
          "error",
          "critical"
        ],
        "title": "NotificationLevel"
      },
      "NotificationSource": {
        "type": "string",
        "enum": [
          "system",
          "Italian Tax Authority"
        ],
        "title": "NotificationSource"
      },
      "NotificationType": {
        "type": "string",
        "enum": [
          "INTERNAL_COMMUNICATION_FAILURE",
          "STATUS_OFFLINE",
          "STATUS_ONLINE",
          "INTERNAL_COMMUNICATION_RESTORED"
        ],
        "title": "NotificationType"
      },
      "PEMJournalStatus": {
        "type": "string",
        "enum": [
          "inactive",
          "open",
          "closed",
          "sent",
          "ready"
        ],
        "title": "PEMJournalStatus"
      },
      "PEMStatus": {
        "type": "string",
        "enum": [
          "new",
          "registered",
          "activated",
          "online",
          "offline",
          "discarded",
          "error"
        ],
        "title": "PEMStatus"
      },
      "Page_TypeVar_Customized_CashRegisterBasicOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/CashRegisterBasicOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Page"
          },
          "size": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Size"
          },
          "pages": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "Page[TypeVar]Customized[CashRegisterBasicOutput]"
      },
      "Page_TypeVar_Customized_CashierSimpleOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/CashierSimpleOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Page"
          },
          "size": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Size"
          },
          "pages": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "Page[TypeVar]Customized[CashierSimpleOutput]"
      },
      "Page_TypeVar_Customized_PemOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/PemOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Page"
          },
          "size": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Size"
          },
          "pages": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "Page[TypeVar]Customized[PemOutput]"
      },
      "PaginatedResponse_BackofficeReportOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/BackofficeReportOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[BackofficeReportOutput]"
      },
      "PaginatedResponse_BackofficeReportRequestOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/BackofficeReportRequestOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[BackofficeReportRequestOutput]"
      },
      "PaginatedResponse_DeviceEventOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/DeviceEventOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[DeviceEventOutput]"
      },
      "PaginatedResponse_DeviceEventTransmissionOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/DeviceEventTransmissionOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[DeviceEventTransmissionOutput]"
      },
      "PaginatedResponse_InactivityPeriodOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/InactivityPeriodOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[InactivityPeriodOutput]"
      },
      "PaginatedResponse_Notification_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/Notification"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[Notification]"
      },
      "PaginatedResponse_ReceiptOutput_": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/ReceiptOutput"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of elements across all pages"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Page identifier"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Page size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "PaginatedResponse[ReceiptOutput]"
      },
      "PaymentDetail": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/PaymentType",
            "description": "Type of the payment detail."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the payment detail."
          },
          "amount": {
            "type": "string",
            "title": "Amount",
            "description": "Amount of the payment in EUR as a string with 2 to 8 decimal digits.",
            "default": "0.00"
          },
          "voucher_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voucher Count",
            "description": "Number of vouchers. Required for `meal_vouchers` and `other_vouchers`, must be null otherwise."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "PaymentDetail"
      },
      "PaymentType": {
        "type": "string",
        "enum": [
          "cash",
          "electronic",
          "meal_vouchers",
          "other_vouchers",
          "discount",
          "uncollected_goods",
          "uncollected_services",
          "rounding_up",
          "rounding_down"
        ],
        "title": "PaymentType",
        "description": "Payment type for a receipt payment detail.\n- `cash`: cash payment (cash, check)\n- `electronic`: electronic payment (bancomat, credit card)\n- `meal_vouchers`: meal voucher (Ticket buoni pasto). When the PEM's meal-voucher\n  option is active, it is an uncollected amount for services and can only pay\n  for services with a 10% VAT rate; otherwise it is accounted like\n  `other_vouchers`\n- `other_vouchers`: celiac disease voucher (Buoni Celiachia), always accounted\n  as a ticket invoiced by third parties\n- `discount`: discount applied at payment time and multi-use voucher\n- `uncollected_goods`: goods delivered but not fully paid\n- `uncollected_services`: services delivered but not fully paid\n- `rounding_up`: mandatory rounding up (DL 50/2017)\n- `rounding_down`: mandatory rounding down (DL 50/2017)"
      },
      "PemActivationInput": {
        "properties": {
          "registration_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registration Key",
            "description": "The registration key of the PEM that has been provided to the Merchant by the Supplier. It must be set only for cloud PEMs, while it can be omitted for on-premise PEMs."
          }
        },
        "type": "object",
        "title": "PemActivationInput"
      },
      "PemDetailedOutput": {
        "properties": {
          "serial_number": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4}-[A-Z0-9]{6}$",
            "title": "Serial Number"
          },
          "status": {
            "$ref": "#/components/schemas/PEMStatus"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "journal_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PEMJournalStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "The current operational state of the PEM, reflecting the state of its latest journal (open, closing, or closed). This field is set only when the PEM status is ONLINE; otherwise, it is null."
          },
          "registration_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registration Key",
            "description": "The registration key is set only as long as the PEM has not been activated yet"
          },
          "meal_vouchers_invoiced_to_issuer": {
            "$ref": "#/components/schemas/MealVouchersInvoicedToIssuer",
            "description": "Meal-vouchers invoiced-to-issuer option of the PEM: whether it is in effect and when it last switched or is due to switch."
          }
        },
        "type": "object",
        "required": [
          "serial_number",
          "status",
          "address",
          "journal_status",
          "registration_key",
          "meal_vouchers_invoiced_to_issuer"
        ],
        "title": "PemDetailedOutput"
      },
      "PemOfflineReason": {
        "type": "string",
        "enum": [
          "pem-software-problems",
          "pem-hardware-problems"
        ],
        "title": "PemOfflineReason"
      },
      "PemOfflineRequest": {
        "properties": {
          "outage_started_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Outage Started At",
            "description": "Date and time when the outage started (format: YYYY-MM-DDTHH:MM:SS)",
            "examples": [
              "2026-01-15T12:00:00"
            ]
          },
          "reason": {
            "$ref": "#/components/schemas/PemOfflineReason",
            "description": "Reason that led to the PEM being offline"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes",
            "description": "Optional notes about the outage (max 1000 characters)"
          }
        },
        "type": "object",
        "required": [
          "outage_started_at",
          "reason"
        ],
        "title": "PemOfflineRequest"
      },
      "PemOutput": {
        "properties": {
          "serial_number": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4}-[A-Z0-9]{6}$",
            "title": "Serial Number"
          },
          "status": {
            "$ref": "#/components/schemas/PEMStatus"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "journal_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PEMJournalStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "The current operational state of the PEM, reflecting the state of its latest journal (open, closing, or closed). This field is set only when the PEM status is ONLINE; otherwise, it is null."
          }
        },
        "type": "object",
        "required": [
          "serial_number",
          "status",
          "address",
          "journal_status"
        ],
        "title": "PemOutput"
      },
      "QueueMaintenanceOperationsBackofficeReportInput": {
        "properties": {
          "filter_by": {
            "$ref": "#/components/schemas/DateIntervalFilter",
            "description": "The days the report covers: from starting_date to ending_date, both included."
          }
        },
        "type": "object",
        "required": [
          "filter_by"
        ],
        "title": "QueueMaintenanceOperationsBackofficeReportInput"
      },
      "ReceiptDetailsOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "type": {
            "$ref": "#/components/schemas/ReceiptType"
          },
          "total_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Amount",
            "description": "Total amount of the sale receipt as a string with up to 8 decimal digits. For void and return receipts this value is null."
          },
          "document_number": {
            "type": "string",
            "maxLength": 9,
            "minLength": 9,
            "title": "Document Number",
            "description": "The document number assigned to the document by the Italian Tax Authority. This is the official ID of the document valid for fiscal purposes. "
          },
          "document_datetime": {
            "type": "string",
            "title": "Document Datetime",
            "description": "The date and time the document was issued in ISO 8601 date-time format (YYYY-MM-DDTHH:mm:ss).",
            "examples": [
              "2025-10-08T16:20:42"
            ]
          },
          "parent_receipt_uuid": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Receipt Uuid",
            "description": "The UUID of the parent receipt in case of a voiding or return receipt. It is present only for return and void receipts associated to the same PEM that issued the sale receipt."
          },
          "is_voidable": {
            "type": "boolean",
            "title": "Is Voidable",
            "description": "Return and Void receipts are not voidable. Sale receipts are voidable only if they haven't already been voided and have no associated return receipts."
          },
          "is_returnable": {
            "type": "boolean",
            "title": "Is Returnable",
            "description": "A receipt is returnable if it is a sale receipt, it hasn't been voided and has returnable items."
          },
          "pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pdf Url",
            "description": "Public URL to download the PDF of the receipt"
          },
          "status": {
            "$ref": "#/components/schemas/ReceiptStatus",
            "description": "The status of the receipt in MF1. It can be either 'ready' (the receipt is ready to be sent to MF2) or 'sent' (the receipt has been sent to MF2)."
          },
          "total_taxable_amount": {
            "type": "string",
            "title": "Total Taxable Amount",
            "description": "Total amount subject to VAT/tax before any discounts or exemptions as a string with 2 to 8 decimal digits",
            "examples": [
              "7.23"
            ]
          },
          "total_uncollected_amount": {
            "type": "string",
            "title": "Total Uncollected Amount",
            "description": "Total amount that remains unpaid or uncollected from the customer as a string with 2 to 8 decimal digits",
            "examples": [
              "7.23"
            ]
          },
          "total_vat_amount": {
            "type": "string",
            "title": "Total Vat Amount",
            "description": "Total Value Added Tax amount calculated on taxable transactions as a string with 2 to 8 decimal digits",
            "examples": [
              "7.23"
            ]
          },
          "total_discount": {
            "type": "string",
            "title": "Total Discount",
            "description": "Individual discount amount applied to the overall receipt ('Sconto a pagare') as a string with 2 to 8 decimal digits",
            "examples": [
              "7.23"
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReceiptItem"
            },
            "type": "array",
            "title": "Items",
            "description": "List of individual products/services included in the receipt",
            "default": []
          },
          "customer_lottery_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Lottery Code",
            "description": "Lottery code of the customer"
          },
          "cashier_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cashier Name",
            "description": "The name of the cashier that issued the receipt. If null, it has been issued by the merchant."
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "type",
          "document_number",
          "document_datetime",
          "is_voidable",
          "is_returnable",
          "status",
          "total_taxable_amount",
          "total_uncollected_amount",
          "total_vat_amount",
          "total_discount",
          "cashier_name"
        ],
        "title": "ReceiptDetailsOutput"
      },
      "ReceiptInput": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReceiptItem"
            },
            "type": "array",
            "title": "Items",
            "description": "\"Elementi contabili\". Receipt items. At least one item is required."
          },
          "customer_tax_code": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z0-9]{11,16}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Code",
            "description": "Tax code of the customer. If set, customer_lottery_code can't be set as well."
          },
          "customer_lottery_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 16,
                "minLength": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Lottery Code",
            "description": "Lottery code of the customer. If set, customer_tax_code can't be set as well."
          },
          "payment_details": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PaymentDetail"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Details",
            "description": "Payment details of the receipt."
          },
          "invoice_issuing": {
            "type": "boolean",
            "title": "Invoice Issuing",
            "description": "Set this field to true if the amount has not been collectedsince the issued receipt will be followed by an invoice. This use case is generally called 'Credito - segue fattura'.",
            "default": false
          },
          "uncollected_dcr_to_ssn": {
            "type": "boolean",
            "title": "Uncollected Dcr To Ssn",
            "description": "Set this flag to true when the payment is not collected because the receipt relates to the Distinta Contabile Riepilogativa that will be transmitted to the Sistema Sanitario Nazionale.",
            "default": false
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text. Lines are separated by \\n. This text is displayed in the PDF immediately above the footer text."
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ReceiptInput"
      },
      "ReceiptItem": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ItemType",
            "description": "Type of the item.",
            "default": "goods"
          },
          "quantity": {
            "type": "string",
            "title": "Quantity",
            "description": "Quantity expressed as a string with exactly 2 decimal digits. E.g. '1.00', '1.50', '2.00'"
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Description",
            "description": "Description of the item (max 1000 chars)"
          },
          "unit_price": {
            "type": "string",
            "title": "Unit Price",
            "description": "Unit price expressed as a string with 2 to 8 decimal digits. It is a gross price, i.e. it includes VAT amount"
          },
          "vat_rate_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VatRateEnum"
              },
              {
                "$ref": "#/components/schemas/NaturaType"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Rate Code",
            "description": "VAT rate code as a string. If set, 'simplified_vat_allocation' must be false."
          },
          "simplified_vat_allocation": {
            "type": "boolean",
            "title": "Simplified Vat Allocation",
            "description": "Set to true if this item is subject to 'Ventilazione IVA'. If true, 'vat_rate_code' must be null.",
            "default": false
          },
          "discount": {
            "type": "string",
            "title": "Discount",
            "description": "Discount amount in EUR as a string with 2 to 8 decimal digits. It is a gross price, i.e. it includes VAT amount",
            "default": "0"
          },
          "surcharge": {
            "type": "string",
            "title": "Surcharge",
            "description": "Surcharge amount in EUR as a string with 2 to 8 decimal digits. It is a gross price, i.e. it includes VAT amount",
            "default": "0"
          },
          "prepaid_or_voucher": {
            "type": "boolean",
            "title": "Prepaid Or Voucher",
            "description": "True if the total amount had already been collected as an advance before delivery of the goods or services, or if the sale occurs through the redemption of a single-purpose voucher.",
            "default": false
          },
          "complimentary": {
            "type": "boolean",
            "title": "Complimentary",
            "description": "Set to true if it is a complimentary (free) item. It deducts the gift amount from the amount of the document but does not deduct it from the VAT and taxable amount",
            "default": false
          },
          "ateco_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 6,
                "minLength": 6
              },
              {
                "type": "null"
              }
            ],
            "title": "Ateco Code",
            "description": "ATECO code of the item."
          }
        },
        "type": "object",
        "required": [
          "quantity",
          "description",
          "unit_price"
        ],
        "title": "ReceiptItem",
        "description": "Model representing an item in a receipt."
      },
      "ReceiptOutput": {
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "title": "Uuid"
          },
          "type": {
            "$ref": "#/components/schemas/ReceiptType"
          },
          "total_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Amount",
            "description": "Total amount of the sale receipt as a string with up to 8 decimal digits. For void and return receipts this value is null."
          },
          "document_number": {
            "type": "string",
            "maxLength": 9,
            "minLength": 9,
            "title": "Document Number",
            "description": "The document number assigned to the document by the Italian Tax Authority. This is the official ID of the document valid for fiscal purposes. "
          },
          "document_datetime": {
            "type": "string",
            "title": "Document Datetime",
            "description": "The date and time the document was issued in ISO 8601 date-time format (YYYY-MM-DDTHH:mm:ss).",
            "examples": [
              "2025-10-08T16:20:42"
            ]
          },
          "parent_receipt_uuid": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Receipt Uuid",
            "description": "The UUID of the parent receipt in case of a voiding or return receipt. It is present only for return and void receipts associated to the same PEM that issued the sale receipt."
          },
          "is_voidable": {
            "type": "boolean",
            "title": "Is Voidable",
            "description": "Return and Void receipts are not voidable. Sale receipts are voidable only if they haven't already been voided and have no associated return receipts."
          },
          "is_returnable": {
            "type": "boolean",
            "title": "Is Returnable",
            "description": "A receipt is returnable if it is a sale receipt, it hasn't been voided and has returnable items."
          },
          "pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pdf Url",
            "description": "Public URL to download the PDF of the receipt"
          },
          "status": {
            "$ref": "#/components/schemas/ReceiptStatus",
            "description": "The status of the receipt in MF1. It can be either 'ready' (the receipt is ready to be sent to MF2) or 'sent' (the receipt has been sent to MF2)."
          }
        },
        "type": "object",
        "required": [
          "uuid",
          "type",
          "document_number",
          "document_datetime",
          "is_voidable",
          "is_returnable",
          "status"
        ],
        "title": "ReceiptOutput"
      },
      "ReceiptProofType": {
        "type": "string",
        "enum": [
          "POS",
          "VR",
          "ND"
        ],
        "title": "ReceiptProofType"
      },
      "ReceiptStatus": {
        "type": "string",
        "enum": [
          "ready",
          "sent"
        ],
        "title": "ReceiptStatus"
      },
      "ReceiptType": {
        "type": "string",
        "enum": [
          "sale",
          "return",
          "void"
        ],
        "title": "ReceiptType"
      },
      "ReturnDataOutput": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReturnableReceiptItem"
            },
            "type": "array",
            "title": "Items"
          },
          "lottery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReturnableLottery"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "items": {
              "$ref": "#/components/schemas/ReturnableSummary"
            },
            "type": "array",
            "title": "Summary"
          },
          "payment_details": {
            "$ref": "#/components/schemas/ReturnablePaymentDetails"
          }
        },
        "type": "object",
        "required": [
          "items",
          "summary",
          "payment_details"
        ],
        "title": "ReturnDataOutput",
        "description": "Items and amounts of a sale receipt that can still be returned."
      },
      "ReturnItem": {
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Id",
            "description": "The ID of the item to be returned"
          },
          "quantity": {
            "type": "string",
            "title": "Quantity",
            "description": "The quantity to be returned. Can't be greater than the original quantity."
          }
        },
        "type": "object",
        "required": [
          "id",
          "quantity"
        ],
        "title": "ReturnItem"
      },
      "ReturnPaymentDetail": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ReturnPaymentType",
            "description": "Type of the return payment detail."
          },
          "amount": {
            "type": "string",
            "title": "Amount",
            "description": "Gross amount in EUR as a string with at most 2 decimal digits.",
            "examples": [
              "10.00"
            ]
          },
          "voucher_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voucher Count",
            "description": "Number of vouchers refunded. Required for `vouchers`, must be null otherwise."
          }
        },
        "type": "object",
        "required": [
          "type",
          "amount"
        ],
        "title": "ReturnPaymentDetail"
      },
      "ReturnPaymentType": {
        "type": "string",
        "enum": [
          "cash",
          "electronic",
          "vouchers",
          "discount",
          "uncollected_goods",
          "uncollected_services"
        ],
        "title": "ReturnPaymentType",
        "description": "Payment type for a return payment detail.\n- `cash`: refunded in cash, out of the amount of the sale receipt paid in cash\n- `electronic`: refunded electronically, out of the amount of the sale receipt\n  paid electronically\n- `vouchers`: refunded in vouchers, out of the amount of the sale receipt paid\n  with vouchers invoiced by third parties (`other_vouchers` and `meal_vouchers`)\n- `discount`: out of the discount applied at payment time to the sale receipt\n  (including the mandatory rounding down), not refunded to the customer\n- `uncollected_goods`: out of the amount for goods of the sale receipt not\n  collected yet (credit), not refunded to the customer\n- `uncollected_services`: out of the amount for services of the sale receipt\n  not collected yet, not refunded to the customer"
      },
      "ReturnViaDifferentDeviceInput": {
        "properties": {
          "device_id": {
            "type": "string",
            "maxLength": 11,
            "minLength": 2,
            "title": "Device Id",
            "description": "Identifier of the device that issued the original receipt. This may be a POS, a RT (Registratore Telematico), or an RT Server. For receipts issued via the \"Documento commerciale online\" procedure, provide only the characters before the \"/\" (e.g., use DCW2024 for DCW2024/0000-3173).",
            "examples": [
              "E001-000001",
              "DCW2024"
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReceiptItem"
            },
            "type": "array",
            "title": "Items"
          },
          "document_number": {
            "type": "string",
            "title": "Document Number",
            "description": "The document number of the original receipt.",
            "examples": [
              "0001-0001"
            ]
          },
          "document_datetime": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Document Datetime",
            "description": "The date and time of the original receipt (format: YYYY-MM-DDTHH:MM:SS).",
            "examples": [
              "2024-03-20T10:00:00"
            ]
          },
          "lottery_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lottery Code",
            "description": "The lottery code of the original receipt, if available.",
            "examples": [
              "123456789"
            ]
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text."
          }
        },
        "type": "object",
        "required": [
          "device_id",
          "items",
          "document_number",
          "document_datetime"
        ],
        "title": "ReturnViaDifferentDeviceInput"
      },
      "ReturnViaProofInput": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReceiptItem"
            },
            "type": "array",
            "title": "Items"
          },
          "proof": {
            "$ref": "#/components/schemas/ReceiptProofType",
            "description": "The type of proof of purchase: \"POS\" for POS receipts, \"VR\" for \"Vuoti a rendere\", \"ND\" for other residual cases. Used in place of device serial number/unique PEM identifier.",
            "examples": [
              "POS",
              "VR",
              "ND"
            ]
          },
          "document_datetime": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Document Datetime",
            "description": "The date and time of the proof of purchase (format: YYYY-MM-DDTHH:MM:SS).",
            "examples": [
              "2024-03-20T10:00:00"
            ]
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text."
          }
        },
        "type": "object",
        "required": [
          "items",
          "proof",
          "document_datetime"
        ],
        "title": "ReturnViaProofInput"
      },
      "ReturnViaSamePemInput": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReturnItem"
            },
            "type": "array",
            "title": "Items"
          },
          "document_number": {
            "type": "string",
            "title": "Document Number",
            "description": "The document number of the original receipt.",
            "examples": [
              "0001-0001"
            ]
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text."
          },
          "payment_details": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ReturnPaymentDetail"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Details",
            "description": "How the returned amount is split among the payment methods and the uncollected amounts still returnable for the sale receipt. Their total must equal the amount of the returned items. When omitted, the returned amount is split proportionally to the amounts still returnable."
          }
        },
        "type": "object",
        "required": [
          "items",
          "document_number"
        ],
        "title": "ReturnViaSamePemInput"
      },
      "ReturnableLottery": {
        "properties": {
          "two_dimensional_lottery_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Two Dimensional Lottery Code"
          },
          "lottery_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lottery Code"
          }
        },
        "type": "object",
        "title": "ReturnableLottery"
      },
      "ReturnablePaymentDetails": {
        "properties": {
          "cash_payment_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cash Payment Amount",
            "description": "Amount paid in cash still returnable"
          },
          "electronic_payment_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Electronic Payment Amount",
            "description": "Amount paid electronically still returnable"
          },
          "vouchers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReturnableVouchers"
              },
              {
                "type": "null"
              }
            ],
            "description": "Amount and number of vouchers still returnable"
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Amount",
            "description": "Discount applied at payment time (ScontoApagare) still returnable"
          },
          "uncollected_goods_gross_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uncollected Goods Gross Amount",
            "description": "Amount for goods not collected yet (credit) still returnable. It is not reported in the receipt, which keeps it in TotaleImponibile."
          },
          "uncollected_services_gross_amount": {
            "type": "string",
            "title": "Uncollected Services Gross Amount",
            "description": "Amount for services not collected yet still returnable, i.e. the sum for all the summaries of uncollected_services plus its VAT. Within it, how much a return must or can return as uncollected_services depends on the returned services."
          }
        },
        "type": "object",
        "required": [
          "uncollected_services_gross_amount"
        ],
        "title": "ReturnablePaymentDetails",
        "description": "Amounts of the sale receipt still returnable for each type of the payment_details\nof a return. All amounts are gross, i.e. they include VAT."
      },
      "ReturnableReceiptItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "type": {
            "$ref": "#/components/schemas/ItemType",
            "description": "Type of the item.",
            "default": "goods"
          },
          "quantity": {
            "type": "string",
            "title": "Quantity",
            "description": "Original quantity of the sale receipt item expressed as a string with exactly 2 decimal digits. E.g. '1.00', '1.50', '2.00'"
          },
          "returned_quantity": {
            "type": "string",
            "title": "Returned Quantity",
            "description": "Quantity already returned expressed as a string with exactly 2 decimal digits. E.g. '1.00', '1.50', '2.00'. The quantity that can still be returned is quantity - returned_quantity."
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Description",
            "description": "Description of the item (max 1000 chars)"
          },
          "unit_price": {
            "type": "string",
            "title": "Unit Price",
            "description": "Unit price expressed as a string with 2 to 8 decimal digits. It is a gross price, i.e. it includes VAT amount"
          },
          "vat_rate_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VatRateEnum"
              },
              {
                "$ref": "#/components/schemas/NaturaType"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Rate Code",
            "description": "VAT rate code as a string. Null with simplified VAT allocation."
          },
          "simplified_vat_allocation": {
            "type": "boolean",
            "title": "Simplified Vat Allocation",
            "description": "Set to true if this item is subject to 'Ventilazione IVA'. If true, 'vat_rate_code' must not be set.",
            "default": false
          },
          "discount": {
            "type": "string",
            "title": "Discount",
            "description": "Discount amount in EUR as a string with 2 to 8 decimal digits. It is a gross price, i.e. it includes VAT amount. It refers to the whole quantity of the item, the identical lines of the sale receipt summed up.",
            "default": "0"
          },
          "surcharge": {
            "type": "string",
            "title": "Surcharge",
            "description": "Surcharge amount in EUR as a string with 2 to 8 decimal digits. It is a gross price, i.e. it includes VAT amount. It refers to the whole quantity of the item, the identical lines of the sale receipt summed up.",
            "default": "0"
          },
          "prepaid_or_voucher": {
            "type": "boolean",
            "title": "Prepaid Or Voucher",
            "description": "True if the total amount had already been collected as an advance before delivery of the goods or services, or if the sale occurs through the redemption of a single-purpose voucher.",
            "default": false
          },
          "complimentary": {
            "type": "boolean",
            "title": "Complimentary",
            "description": "Set to true if it is a complimentary (free) item. It deducts the gift amount from the amount of the document but does not deduct it from the VAT and taxable amount",
            "default": false
          },
          "ateco_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 6,
                "minLength": 6
              },
              {
                "type": "null"
              }
            ],
            "title": "Ateco Code",
            "description": "ATECO code of the item. Null when the merchant is a mono-activity. Not null with multi-activities."
          }
        },
        "type": "object",
        "required": [
          "id",
          "quantity",
          "returned_quantity",
          "description",
          "unit_price"
        ],
        "title": "ReturnableReceiptItem",
        "description": "Model representing an item in a receipt."
      },
      "ReturnableSummary": {
        "properties": {
          "vat": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReturnableSummaryVat"
              },
              {
                "type": "null"
              }
            ]
          },
          "nature": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NaturaType"
              },
              {
                "type": "null"
              }
            ]
          },
          "simplified_vat_allocation": {
            "type": "boolean",
            "title": "Simplified Vat Allocation",
            "default": false
          },
          "total_taxable_amount": {
            "type": "string",
            "title": "Total Taxable Amount"
          },
          "uncollected_goods_sales": {
            "type": "string",
            "title": "Uncollected Goods Sales",
            "default": "0"
          },
          "uncollected_services": {
            "type": "string",
            "title": "Uncollected Services",
            "default": "0"
          },
          "uncollected_invoices": {
            "type": "string",
            "title": "Uncollected Invoices",
            "default": "0"
          },
          "uncollected_dcr_ssn": {
            "type": "string",
            "title": "Uncollected Dcr Ssn",
            "default": "0"
          },
          "uncollected_complimentary": {
            "type": "string",
            "title": "Uncollected Complimentary",
            "default": "0"
          },
          "ateco_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ateco Code"
          },
          "meal_vouchers_invoiced_to_issuer": {
            "type": "boolean",
            "title": "Meal Vouchers Invoiced To Issuer",
            "description": "Whether the Riepilogo block of the sale receipt has RifNormativo \"TICKET\", i.e. its services were paid with meal vouchers invoiced to the issuer",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "total_taxable_amount"
        ],
        "title": "ReturnableSummary",
        "description": "Amounts still returnable for a Riepilogo block of the sale receipt, i.e. the\namounts of the sale receipt net of the ones already returned. Amounts are net\nof VAT, except with simplified VAT allocation."
      },
      "ReturnableSummaryVat": {
        "properties": {
          "vat_rate": {
            "type": "string",
            "title": "Vat Rate",
            "description": "VAT rate of the summary, e.g. '22.00'"
          },
          "total_vat_amount": {
            "type": "string",
            "title": "Total Vat Amount",
            "description": "VAT amount still returnable for the summary"
          }
        },
        "type": "object",
        "required": [
          "vat_rate",
          "total_vat_amount"
        ],
        "title": "ReturnableSummaryVat"
      },
      "ReturnableVouchers": {
        "properties": {
          "amount": {
            "type": "string",
            "title": "Amount",
            "description": "Amount paid with vouchers still returnable"
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of vouchers still returnable"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "count"
        ],
        "title": "ReturnableVouchers"
      },
      "SummaryReceiptsBackofficeReportInput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "summary",
            "title": "Type",
            "description": "Summary data related to the receipts specified in `filter_by`. Data is grouped by VAT treatment (rate, exemption nature, or ventilazione status) and, for multi-activity merchants, also by ATECO code."
          },
          "filter_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentNumberRangeFilter"
              },
              {
                "$ref": "#/components/schemas/DateIntervalFilter"
              }
            ],
            "title": "Filter By",
            "description": "Either a document-number interval (must belong to a single journal) or a starting_date/ending_date range covering one or more already available daily reports."
          }
        },
        "type": "object",
        "required": [
          "type",
          "filter_by"
        ],
        "title": "SummaryReceiptsBackofficeReportInput"
      },
      "SwidCheck": {
        "properties": {
          "component": {
            "type": "string",
            "title": "Component"
          },
          "tag_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tag Id"
          },
          "system_tag_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Tag Id"
          },
          "status": {
            "$ref": "#/components/schemas/SwidStatus"
          },
          "checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checked At"
          },
          "mismatches": {
            "items": {
              "$ref": "#/components/schemas/SwidMismatch"
            },
            "type": "array",
            "title": "Mismatches"
          }
        },
        "type": "object",
        "required": [
          "component",
          "status",
          "checked_at"
        ],
        "title": "SwidCheck",
        "description": "Result of the runtime verification of a component against its installed\nSWID tag (self-attestation, see the AdE SBOM guidelines \u00a76)."
      },
      "SwidComponent": {
        "type": "string",
        "enum": [
          "pem-thinclient-api",
          "pem-thinclient-daemon",
          "pem-standalone-api",
          "pem-standalone-daemon",
          "pel-api",
          "pel-daemon"
        ],
        "title": "SwidComponent",
        "description": "The components of the solution with their own SWID tag, see\n.github/scripts/catalog/components.toml."
      },
      "SwidMismatch": {
        "properties": {
          "file": {
            "type": "string",
            "title": "File"
          },
          "reason": {
            "type": "string",
            "enum": [
              "missing",
              "modified",
              "unexpected"
            ],
            "title": "Reason"
          },
          "expected_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Size"
          },
          "actual_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Size"
          },
          "expected_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Sha256"
          },
          "actual_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Sha256"
          }
        },
        "type": "object",
        "required": [
          "file",
          "reason"
        ],
        "title": "SwidMismatch"
      },
      "SwidStatus": {
        "type": "string",
        "enum": [
          "ok",
          "mismatch",
          "not_installed",
          "invalid",
          "unreachable"
        ],
        "title": "SwidStatus"
      },
      "SwidStatusOutput": {
        "properties": {
          "system_tag_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Tag Id"
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/SwidCheck"
            },
            "type": "array",
            "title": "Components"
          }
        },
        "type": "object",
        "required": [
          "system_tag_id",
          "components"
        ],
        "title": "SwidStatusOutput"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VatRateEnum": {
        "type": "string",
        "enum": [
          "4.00",
          "5.00",
          "10.00",
          "22.00"
        ],
        "title": "VatRateEnum",
        "description": "VAT rate codes with their corresponding descriptions."
      },
      "VoidViaDifferentDeviceInput": {
        "properties": {
          "device_id": {
            "type": "string",
            "maxLength": 11,
            "minLength": 2,
            "title": "Device Id",
            "description": "Identifier of the device that issued the original receipt. This may be a POS, a RT (Registratore Telematico), or an RT Server. For receipts issued via the \"Documento commerciale online\" procedure, provide only the characters before the \"/\" (e.g., use DCW2024 for DCW2024/0000-3173).",
            "examples": [
              "E001-000001",
              "DCW2024"
            ]
          },
          "document_number": {
            "type": "string",
            "title": "Document Number",
            "description": "The document number of the original receipt.",
            "examples": [
              "0001-0001"
            ]
          },
          "document_datetime": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Document Datetime",
            "description": "The date and time of the original receipt (format: YYYY-MM-DDTHH:MM:SS).",
            "examples": [
              "2024-03-20T10:00:00"
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReceiptItem"
            },
            "type": "array",
            "title": "Items"
          },
          "lottery_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lottery Code",
            "description": "The lottery code of the original receipt, if available.",
            "examples": [
              "123456789"
            ]
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text."
          }
        },
        "type": "object",
        "required": [
          "device_id",
          "document_number",
          "document_datetime",
          "items"
        ],
        "title": "VoidViaDifferentDeviceInput"
      },
      "VoidViaSamePemInput": {
        "properties": {
          "document_number": {
            "type": "string",
            "title": "Document Number",
            "description": "The document number of the original receipt.",
            "examples": [
              "0001-0001"
            ]
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text."
          }
        },
        "type": "object",
        "required": [
          "document_number"
        ],
        "title": "VoidViaSamePemInput"
      },
      "VoidWithProofInput": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReceiptItem"
            },
            "type": "array",
            "title": "Items"
          },
          "proof": {
            "$ref": "#/components/schemas/ReceiptProofType",
            "description": "The type of proof of purchase: \"POS\" for POS receipts, \"VR\" for \"Vuoti a rendere\", \"ND\" for other residual cases. Used in place of device serial number/unique PEM identifier.",
            "examples": [
              "POS",
              "VR",
              "ND"
            ]
          },
          "document_datetime": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
            "title": "Document Datetime",
            "description": "The date and time of the proof of purchase (format: YYYY-MM-DDTHH:MM:SS).",
            "examples": [
              "2024-03-20T10:00:00"
            ]
          },
          "additional_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Text",
            "description": "Additional text that can contain up to 3 lines of text."
          }
        },
        "type": "object",
        "required": [
          "items",
          "proof",
          "document_datetime"
        ],
        "title": "VoidWithProofInput"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "mutualTLS": {
        "type": "mutualTLS"
      }
    }
  }
}