# Validate a FatturaPA XML without sending it (https://docs.getbeel.com/it/api/reference/invoices/validateInvoice)

## POST /invoices/validate

```json

{
  "operationId": "validateInvoice",
  "summary": "Validate a FatturaPA XML without sending it",
  "description": "Validates locally against the official FatturaPA XSD (v1.2.3) and the SDI content controls of Allegato A v1.9.1 (Appendice 1) that depend on the file alone, the same check that runs before every send (no SDI call, nothing stored). Errors carry the AdE code and wording (00200 for XSD errors, with the line). Not checked: signatures, AdE registries (partita IVA, codice destinatario), duplicates. Returns 200 with `valid` and `errors` for any FatturaPA document; 413 above 5 MB.",
  "tags": [
    "Invoices"
  ],
  "x-required-scope": "invoices:validate",
  "requestBody": {
    "required": true,
    "content": {
      "application/xml": {
        "schema": {
          "type": "string"
        }
      },
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ValidateInvoiceRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ValidationResult"
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, invalid, revoked or expired API key",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The key lacks the 'invoices:validate' scope",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "company_not_found (Getbeel-Company)",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded; see Retry-After",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Server error; quote X-Request-Id",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  },
  "parameters": [
    {
      "name": "Getbeel-Company",
      "in": "header",
      "required": false,
      "description": "Act on one of the account's client companies (its id from GET /companies) instead of the key's own account. 404 company_not_found when the key cannot act on it.",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ]
}

```

Full OpenAPI document: https://docs.getbeel.com/openapi.json