Skip to content
France e-reporting

frereporting.validate

Check DGFiP v3.2 Flux 10 XML against the published XSD and reporting rules. The minimum charge covers 100 reported rows.

POSThttps://api.kanagu.dev/v1/frereporting/validate
Price
$0.10 per 100 lines, on successful calls only
Without a key
10 free calls per IP per UTC day, shared by REST and MCP.
MCP tool
frereporting.validate at https://api.kanagu.dev/mcp
curl https://api.kanagu.dev/v1/frereporting/validate \
  -H "Content-Type: application/json" \
  -d '{"xml":"<?xml version=\"1.0\"?><Report/>","vatRegime":"normal_monthly"}'
curl https://api.kanagu.dev/v1/frereporting/validate \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<?xml version=\"1.0\"?><Report/>","vatRegime":"normal_monthly"}'
const res = await fetch("https://api.kanagu.dev/v1/frereporting/validate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "xml": "<?xml version=\"1.0\"?><Report/>",
    "vatRegime": "normal_monthly"
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "frereporting.validate",
    "arguments": {
      "xml": "<?xml version=\"1.0\"?><Report/>",
      "vatRegime": "normal_monthly"
    }
  }
}
Request body
{
  "xml": "<?xml version=\"1.0\"?><Report/>",
  "vatRegime": "normal_monthly"
}

Request body

application/json

xmlstring (max 1048576 chars)required
vatRegime"normal_monthly" | "normal_quarterly" | "simplified" | "franchise"
vatOnDebitsboolean
Whether the seller opted for VAT on debits.
checkedAtstring
Control clock in France local time. Defaults to the current time.

Response

200 · application/json

validbooleanrequired
Whether the XML passed the applicable local XSD and business-rule checks. Review flags identify discrepancies or checks that need additional information.
specificationobjectrequired
specification.version"3.2"required
specification.date"2026-04-30"required
specification.url"https://www.impots.gouv.fr/specifications-externes-b2b"required
lineCountinteger (0 to 9007199254740991)required
Submitted transaction or receipt rows used for pricing, at $0.10 per started block of 100.
issuesarray of objectrequired
issues[].severity"error" | "needs_review"required
issues[].rulestringrequired
issues[].sectionstringrequired
issues[].pathstringrequired
issues[].expectedstringrequired
issues[].actualstringrequired
issues[].lineinteger (≤ 9007199254740991)
issues[].sourceRowsarray of integer (0 to 9007199254740991)

Try it

frereporting.validate

$0.10/100 lines

No key needed · 10 free calls per IP per day

Response

Run the request to see the live response here.

Errors

Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.

StatusCode and meaning
400invalid_input

The body does not match the request schema. The message names each field.

400invalid_json

The body is missing or is not valid JSON.

400invalid_idempotency_key

Idempotency-Key must be 1–128 visible ASCII characters.

401invalid_api_key

The Bearer key is missing, malformed, invalid or inactive.

402free_allowance_exhausted

This month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left.

404not_found

No operation at this path.

409idempotency_conflict

The Idempotency-Key was already used with a different body.

413payload_too_large

JSON bodies may be at most 64 KiB.

429trial_limit

The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.

500internal_error

The call failed on our side. It is not billed; retry with the same Idempotency-Key.

JSON Schema

Request schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "xml": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1048576
    },
    "vatRegime": {
      "type": "string",
      "enum": [
        "normal_monthly",
        "normal_quarterly",
        "simplified",
        "franchise"
      ]
    },
    "vatOnDebits": {
      "description": "Whether the seller opted for VAT on debits.",
      "type": "boolean"
    },
    "checkedAt": {
      "description": "Control clock in France local time. Defaults to the current time.",
      "type": "string",
      "allOf": [
        {
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z)|(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)$"
        },
        {
          "pattern": "^20\\d{2}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d$"
        }
      ]
    }
  },
  "required": [
    "xml"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "xml": "<?xml version=\"1.0\"?><Report/>",
      "vatRegime": "normal_monthly"
    }
  ]
}
Response schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean",
      "description": "Whether the XML passed the applicable local XSD and business-rule checks. Review flags identify discrepancies or checks that need additional information."
    },
    "specification": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "const": "3.2"
        },
        "date": {
          "type": "string",
          "const": "2026-04-30"
        },
        "url": {
          "type": "string",
          "const": "https://www.impots.gouv.fr/specifications-externes-b2b"
        }
      },
      "required": [
        "version",
        "date",
        "url"
      ],
      "additionalProperties": false
    },
    "lineCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Submitted transaction or receipt rows used for pricing, at $0.10 per started block of 100."
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "string",
            "enum": [
              "error",
              "needs_review"
            ]
          },
          "rule": {
            "type": "string"
          },
          "section": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "expected": {
            "type": "string"
          },
          "actual": {
            "type": "string"
          },
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "sourceRows": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        },
        "required": [
          "severity",
          "rule",
          "section",
          "path",
          "expected",
          "actual"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "valid",
    "specification",
    "lineCount",
    "issues"
  ],
  "additionalProperties": false
}