frereporting.validate
Check DGFiP v3.2 Flux 10 XML against the published XSD and reporting rules. The minimum charge covers 100 reported rows.
https://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.validateathttps://api.kanagu.dev/mcp- Markdown
- /docs/frereporting.validate.md
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"
}
}
}{
"xml": "<?xml version=\"1.0\"?><Report/>",
"vatRegime": "normal_monthly"
}Request body
application/json
xmlstring (max 1048576 chars)requiredvatRegime"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.
specificationobjectrequiredspecification.version"3.2"requiredspecification.date"2026-04-30"requiredspecification.url"https://www.impots.gouv.fr/specifications-externes-b2b"requiredlineCountinteger (0 to 9007199254740991)required- Submitted transaction or receipt rows used for pricing, at $0.10 per started block of 100.
issuesarray of objectrequiredissues[].severity"error" | "needs_review"requiredissues[].rulestringrequiredissues[].sectionstringrequiredissues[].pathstringrequiredissues[].expectedstringrequiredissues[].actualstringrequiredissues[].lineinteger (≤ 9007199254740991)issues[].sourceRowsarray of integer (0 to 9007199254740991)
Try it
Errors
Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.
| Status | Code and meaning |
|---|---|
| 400 | invalid_inputThe body does not match the request schema. The message names each field. |
| 400 | invalid_jsonThe body is missing or is not valid JSON. |
| 400 | invalid_idempotency_keyIdempotency-Key must be 1–128 visible ASCII characters. |
| 401 | invalid_api_keyThe Bearer key is missing, malformed, invalid or inactive. |
| 402 | free_allowance_exhaustedThis 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. |
| 404 | not_foundNo operation at this path. |
| 409 | idempotency_conflictThe Idempotency-Key was already used with a different body. |
| 413 | payload_too_largeJSON bodies may be at most 64 KiB. |
| 429 | trial_limitThe anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left. |
| 500 | internal_errorThe 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
}