# frereporting.generate

Generate DGFiP v3.2 Flux 10 XML for B2C, cross-border B2B and service receipts. The minimum charge covers 100 input rows.

- REST: `POST https://api.kanagu.dev/v1/frereporting/generate`
- MCP tool: `frereporting.generate` at https://api.kanagu.dev/mcp
- Price: $0.10 USD per 100 lines, on successful calls only. Trial: 10 calls per IP per UTC day without a key, shared by REST and MCP.
- Auth: `Authorization: Bearer <key>` for billed calls. Retries: reuse `Idempotency-Key`.

## Request body

- `reportId` (string (max 46 chars), required): Transmission ID prefix. Generated IDs append -TX or -PAY.
- `createdAt` (string, required): Local France date and time YYYY-MM-DDTHH:mm:ss, without an offset.
- `checkedAt` (string): Control clock in France local time. Defaults to the current time.
- `type` ("IN" | "RE")
- `platform` (object, required): Matricule and registered name of the Plateforme Agréée.
- `platform.id` (string (max 4 chars), required)
- `platform.name` (string (max 150 chars), required)
- `declarant` (object, required)
- `declarant.siren` (string, required)
- `declarant.name` (string (max 150 chars), required)
- `declarant.role` ("seller" | "buyer", required)
- `declarant.vatRegime` ("normal_monthly" | "normal_quarterly" | "simplified" | "franchise", required)
- `declarant.vatOnDebits` (boolean): Whether the seller opted for VAT on debits.
- `reportingDate` (string, required): A date in the selected VAT period. Transaction and payment periods are derived independently.
- `transactions` (array of object)
- `payments` (array of object): Reportable service receipts only, excluding VAT on debits and reverse-charge operations.

## Response

- `valid` (boolean, required): Whether the XML passed the applicable local XSD and business-rule checks. Review flags identify discrepancies or checks that need additional information.
- `specification` (object, required)
- `specification.version` ("3.2", required)
- `specification.date` ("2026-04-30", required)
- `specification.url` ("https://www.impots.gouv.fr/specifications-externes-b2b", required)
- `lineCount` (integer (0 to 9007199254740991), required): Submitted transaction or receipt rows used for pricing, at $0.10 per started block of 100.
- `issues` (array of object, required)
- `issues[].severity` ("error" | "needs_review", required)
- `issues[].rule` (string, required)
- `issues[].section` (string, required)
- `issues[].path` (string, required)
- `issues[].expected` (string, required)
- `issues[].actual` (string, required)
- `issues[].line` (integer (≤ 9007199254740991))
- `issues[].sourceRows` (array of integer (0 to 9007199254740991))
- `reports` (array of object, required)
- `reports[].kind` ("transactions" | "payments", required)
- `reports[].id` (string, required)
- `reports[].period` (object, required)
- `reports[].period.start` (string (date), required)
- `reports[].period.end` (string (date), required)
- `reports[].xml` (string, required)
- `reports[].groups` (array of object, required)
- `reports[].groups[].rows` (array of integer (0 to 9007199254740991), required): Zero-based source row indexes for each XML invoice or aggregate, in XML order.

## Example

```sh
curl https://api.kanagu.dev/v1/frereporting/generate \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reportId":"POS-202609-2","createdAt":"2026-09-21T09:15:00","checkedAt":"2026-09-21T10:10:00","platform":{"id":"0001","name":"Example PA"},"declarant":{"siren":"123456789","name":"Exemple SARL","role":"seller","vatRegime":"normal_monthly"},"reportingDate":"2026-09-15","transactions":[{"kind":"b2c","date":"2026-09-15","currency":"EUR","category":"TLB1","taxes":[{"rate":20,"taxableAmount":"32.00","vatAmount":"6.40"}]}]}'
```

```ts
const res = await fetch("https://api.kanagu.dev/v1/frereporting/generate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "reportId": "POS-202609-2",
    "createdAt": "2026-09-21T09:15:00",
    "checkedAt": "2026-09-21T10:10:00",
    "platform": {
      "id": "0001",
      "name": "Example PA"
    },
    "declarant": {
      "siren": "123456789",
      "name": "Exemple SARL",
      "role": "seller",
      "vatRegime": "normal_monthly"
    },
    "reportingDate": "2026-09-15",
    "transactions": [
      {
        "kind": "b2c",
        "date": "2026-09-15",
        "currency": "EUR",
        "category": "TLB1",
        "taxes": [
          {
            "rate": 20,
            "taxableAmount": "32.00",
            "vatAmount": "6.40"
          }
        ]
      }
    ]
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
```

## Errors

JSON `{"error":{"code","message"}}`.

- 400 `invalid_input`: The body does not match the request schema. The message names each field.
- 400 `invalid_json`: The body is missing or is not valid JSON.
- 400 `invalid_idempotency_key`: Idempotency-Key must be 1–128 visible ASCII characters.
- 401 `invalid_api_key`: The Bearer key is missing, malformed, invalid or inactive.
- 402 `free_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.
- 404 `not_found`: No operation at this path.
- 409 `idempotency_conflict`: The Idempotency-Key was already used with a different body.
- 413 `payload_too_large`: JSON bodies may be at most 64 KiB.
- 429 `trial_limit`: The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.
- 500 `internal_error`: The call failed on our side. It is not billed; retry with the same Idempotency-Key.

## JSON Schema

Request:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "reportId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 46,
      "pattern": "^[\\p{L}\\p{N}_+/-]+(?: [\\p{L}\\p{N}_+/-]+)*$",
      "description": "Transmission ID prefix. Generated IDs append -TX or -PAY."
    },
    "createdAt": {
      "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$"
        }
      ],
      "description": "Local France date and time YYYY-MM-DDTHH:mm:ss, without an offset."
    },
    "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$"
        }
      ]
    },
    "type": {
      "default": "IN",
      "type": "string",
      "enum": [
        "IN",
        "RE"
      ]
    },
    "platform": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 4,
          "maxLength": 4
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 150
        }
      },
      "required": [
        "id",
        "name"
      ],
      "additionalProperties": false,
      "description": "Matricule and registered name of the Plateforme Agréée."
    },
    "declarant": {
      "type": "object",
      "properties": {
        "siren": {
          "type": "string",
          "pattern": "^\\d{9}$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 150
        },
        "role": {
          "type": "string",
          "enum": [
            "seller",
            "buyer"
          ]
        },
        "vatRegime": {
          "type": "string",
          "enum": [
            "normal_monthly",
            "normal_quarterly",
            "simplified",
            "franchise"
          ]
        },
        "vatOnDebits": {
          "description": "Whether the seller opted for VAT on debits.",
          "type": "boolean"
        }
      },
      "required": [
        "siren",
        "name",
        "role",
        "vatRegime"
      ],
      "additionalProperties": false
    },
    "reportingDate": {
      "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])))$"
        },
        {
          "pattern": "^20"
        }
      ],
      "description": "A date in the selected VAT period. Transaction and payment periods are derived independently."
    },
    "transactions": {
      "default": [],
      "maxItems": 2000,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "date": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "vatTotalEur": {
                "description": "Required for non-EUR transactions. Use the converted total VAT in EUR.",
                "type": "string",
                "maxLength": 20,
                "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$"
              },
              "taxPointCode": {
                "type": "string",
                "enum": [
                  "3",
                  "5",
                  "29",
                  "35",
                  "72",
                  "432"
                ]
              },
              "kind": {
                "type": "string",
                "const": "b2c"
              },
              "category": {
                "type": "string",
                "enum": [
                  "TLB1",
                  "TPS1",
                  "TNT1",
                  "TMA1"
                ]
              },
              "taxes": {
                "minItems": 1,
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "taxableAmount": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$",
                      "description": "Taxable base in the transaction currency."
                    },
                    "vatAmount": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$",
                      "description": "VAT amount in EUR, including for non-EUR transactions."
                    },
                    "taxableAmountEur": {
                      "description": "Converted taxable base in EUR for checking VAT on non-EUR transactions.",
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$"
                    }
                  },
                  "required": [
                    "rate",
                    "taxableAmount",
                    "vatAmount"
                  ],
                  "additionalProperties": false
                }
              },
              "count": {
                "default": 1,
                "description": "Number of transactions represented by the row. Defaults to one.",
                "type": "integer",
                "minimum": 0,
                "maximum": 999999999
              }
            },
            "required": [
              "date",
              "currency",
              "kind",
              "category",
              "taxes"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "vatTotalEur": {
                "description": "Required for non-EUR transactions. Use the converted total VAT in EUR.",
                "type": "string",
                "maxLength": 20,
                "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$"
              },
              "taxPointCode": {
                "type": "string",
                "enum": [
                  "3",
                  "5",
                  "29",
                  "35",
                  "72",
                  "432"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 35,
                "pattern": "^[\\p{L}\\p{N}_+/-]+(?: [\\p{L}\\p{N}_+/-]+)*$"
              },
              "invoiceType": {
                "type": "string",
                "enum": [
                  "261",
                  "380",
                  "381",
                  "384",
                  "386",
                  "389",
                  "393",
                  "396",
                  "471",
                  "472",
                  "473",
                  "500",
                  "501",
                  "502",
                  "503"
                ]
              },
              "frame": {
                "type": "string",
                "enum": [
                  "B1",
                  "S1",
                  "M1",
                  "B2",
                  "S2",
                  "M2",
                  "B4",
                  "S4",
                  "M4",
                  "S5",
                  "S6",
                  "B7",
                  "S7"
                ]
              },
              "seller": {
                "type": "object",
                "properties": {
                  "scheme": {
                    "type": "string",
                    "enum": [
                      "0002",
                      "0223",
                      "0227",
                      "0228",
                      "0229"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "vatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                },
                "required": [
                  "scheme",
                  "id",
                  "country"
                ],
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "scheme": {
                    "type": "string",
                    "enum": [
                      "0002",
                      "0223",
                      "0227",
                      "0228",
                      "0229"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "vatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                },
                "required": [
                  "scheme",
                  "id",
                  "country"
                ],
                "additionalProperties": false
              },
              "sellerTaxRepresentativeVatId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 18
              },
              "dueDate": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "referencedInvoices": {
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 35,
                      "pattern": "^[\\p{L}\\p{N}_+/-]+(?: [\\p{L}\\p{N}_+/-]+)*$"
                    },
                    "date": {
                      "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])))$"
                        },
                        {
                          "pattern": "^20"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "date"
                  ],
                  "additionalProperties": false
                }
              },
              "delivery": {
                "type": "object",
                "properties": {
                  "date": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  },
                  "location": {
                    "type": "object",
                    "properties": {
                      "lineOne": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "postalCode": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10
                      },
                      "country": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$"
                      }
                    },
                    "required": [
                      "lineOne",
                      "city",
                      "postalCode",
                      "country"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "invoicePeriod": {
                "type": "object",
                "properties": {
                  "start": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  },
                  "end": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  }
                },
                "required": [
                  "start",
                  "end"
                ],
                "additionalProperties": false
              },
              "taxes": {
                "minItems": 1,
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "taxableAmount": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$",
                      "description": "Decimal string with up to 2 fractional digits; an amount is limited to 19 positions excluding the dot."
                    },
                    "vatAmount": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$",
                      "description": "Decimal string with up to 2 fractional digits; an amount is limited to 19 positions excluding the dot."
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "S",
                        "E",
                        "AE",
                        "K",
                        "G",
                        "O",
                        "Z"
                      ]
                    },
                    "exemptionCode": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 30
                    },
                    "exemptionReason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "rate",
                    "taxableAmount",
                    "vatAmount"
                  ],
                  "additionalProperties": false
                }
              },
              "kind": {
                "type": "string",
                "const": "international_sale"
              }
            },
            "required": [
              "date",
              "currency",
              "id",
              "invoiceType",
              "frame",
              "seller",
              "buyer",
              "taxes",
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "vatTotalEur": {
                "description": "Required for non-EUR transactions. Use the converted total VAT in EUR.",
                "type": "string",
                "maxLength": 20,
                "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$"
              },
              "taxPointCode": {
                "type": "string",
                "enum": [
                  "3",
                  "5",
                  "29",
                  "35",
                  "72",
                  "432"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 35,
                "pattern": "^[\\p{L}\\p{N}_+/-]+(?: [\\p{L}\\p{N}_+/-]+)*$"
              },
              "invoiceType": {
                "type": "string",
                "enum": [
                  "261",
                  "380",
                  "381",
                  "384",
                  "386",
                  "389",
                  "393",
                  "396",
                  "471",
                  "472",
                  "473",
                  "500",
                  "501",
                  "502",
                  "503"
                ]
              },
              "frame": {
                "type": "string",
                "enum": [
                  "B1",
                  "S1",
                  "M1",
                  "B2",
                  "S2",
                  "M2",
                  "B4",
                  "S4",
                  "M4",
                  "S5",
                  "S6",
                  "B7",
                  "S7"
                ]
              },
              "seller": {
                "type": "object",
                "properties": {
                  "scheme": {
                    "type": "string",
                    "enum": [
                      "0002",
                      "0223",
                      "0227",
                      "0228",
                      "0229"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "vatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                },
                "required": [
                  "scheme",
                  "id",
                  "country"
                ],
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "scheme": {
                    "type": "string",
                    "enum": [
                      "0002",
                      "0223",
                      "0227",
                      "0228",
                      "0229"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "vatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 18
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                },
                "required": [
                  "scheme",
                  "id",
                  "country"
                ],
                "additionalProperties": false
              },
              "sellerTaxRepresentativeVatId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 18
              },
              "dueDate": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "referencedInvoices": {
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 35,
                      "pattern": "^[\\p{L}\\p{N}_+/-]+(?: [\\p{L}\\p{N}_+/-]+)*$"
                    },
                    "date": {
                      "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])))$"
                        },
                        {
                          "pattern": "^20"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "date"
                  ],
                  "additionalProperties": false
                }
              },
              "delivery": {
                "type": "object",
                "properties": {
                  "date": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  },
                  "location": {
                    "type": "object",
                    "properties": {
                      "lineOne": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "postalCode": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10
                      },
                      "country": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$"
                      }
                    },
                    "required": [
                      "lineOne",
                      "city",
                      "postalCode",
                      "country"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "invoicePeriod": {
                "type": "object",
                "properties": {
                  "start": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  },
                  "end": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  }
                },
                "required": [
                  "start",
                  "end"
                ],
                "additionalProperties": false
              },
              "taxes": {
                "minItems": 1,
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "taxableAmount": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$",
                      "description": "Decimal string with up to 2 fractional digits; an amount is limited to 19 positions excluding the dot."
                    },
                    "vatAmount": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,2})?$",
                      "description": "Decimal string with up to 2 fractional digits; an amount is limited to 19 positions excluding the dot."
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "S",
                        "E",
                        "AE",
                        "K",
                        "G",
                        "O",
                        "Z"
                      ]
                    },
                    "exemptionCode": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 30
                    },
                    "exemptionReason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "rate",
                    "taxableAmount",
                    "vatAmount"
                  ],
                  "additionalProperties": false
                }
              },
              "kind": {
                "type": "string",
                "const": "international_acquisition"
              }
            },
            "required": [
              "date",
              "currency",
              "id",
              "invoiceType",
              "frame",
              "seller",
              "buyer",
              "taxes",
              "kind"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "payments": {
      "default": [],
      "description": "Reportable service receipts only, excluding VAT on debits and reverse-charge operations.",
      "maxItems": 2000,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "date": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "amounts": {
                "minItems": 1,
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "amountEur": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,6})?$",
                      "description": "Decimal string with up to 6 fractional digits; an amount is limited to 19 positions excluding the dot."
                    }
                  },
                  "required": [
                    "rate",
                    "amountEur"
                  ],
                  "additionalProperties": false
                }
              },
              "kind": {
                "type": "string",
                "const": "b2c"
              }
            },
            "required": [
              "date",
              "amounts",
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "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])))$"
                  },
                  {
                    "pattern": "^20"
                  }
                ]
              },
              "amounts": {
                "minItems": 1,
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "amountEur": {
                      "type": "string",
                      "maxLength": 20,
                      "pattern": "^-?[0-9]+(?:\\.[0-9]{1,6})?$",
                      "description": "Decimal string with up to 6 fractional digits; an amount is limited to 19 positions excluding the dot."
                    }
                  },
                  "required": [
                    "rate",
                    "amountEur"
                  ],
                  "additionalProperties": false
                }
              },
              "kind": {
                "type": "string",
                "const": "international_sale"
              },
              "invoice": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 35,
                    "pattern": "^[\\p{L}\\p{N}_+/-]+(?: [\\p{L}\\p{N}_+/-]+)*$"
                  },
                  "date": {
                    "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])))$"
                      },
                      {
                        "pattern": "^20"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "date"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "date",
              "amounts",
              "kind",
              "invoice"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "reportId",
    "createdAt",
    "platform",
    "declarant",
    "reportingDate"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "reportId": "POS-202609-2",
      "createdAt": "2026-09-21T09:15:00",
      "checkedAt": "2026-09-21T10:10:00",
      "platform": {
        "id": "0001",
        "name": "Example PA"
      },
      "declarant": {
        "siren": "123456789",
        "name": "Exemple SARL",
        "role": "seller",
        "vatRegime": "normal_monthly"
      },
      "reportingDate": "2026-09-15",
      "transactions": [
        {
          "kind": "b2c",
          "date": "2026-09-15",
          "currency": "EUR",
          "category": "TLB1",
          "taxes": [
            {
              "rate": 20,
              "taxableAmount": "32.00",
              "vatAmount": "6.40"
            }
          ]
        }
      ]
    }
  ]
}
```

Response:
```json
{
  "$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
      }
    },
    "reports": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "transactions",
              "payments"
            ]
          },
          "id": {
            "type": "string"
          },
          "period": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "format": "date",
                "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])))$"
              },
              "end": {
                "type": "string",
                "format": "date",
                "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])))$"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "additionalProperties": false
          },
          "xml": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "description": "Zero-based source row indexes for each XML invoice or aggregate, in XML order."
                }
              },
              "required": [
                "rows"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "kind",
          "id",
          "period",
          "xml",
          "groups"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "valid",
    "specification",
    "lineCount",
    "issues",
    "reports"
  ],
  "additionalProperties": false
}
```
