# e-invoice-fixer

> e-invoice-fixer is a paid API for AI agents from einvoice.alexhub.uk, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-02).

Automatically repair and recompute a Romanian e-Factura or UBL 2.1 invoice XML, returning the corrected document along with a detailed change log and re-validation results.

## Facts

- Endpoint: POST https://einvoice.alexhub.uk/v1/fix?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/e-invoice-fixer-128d6d1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_byV6igE_mxQcNj5g7dmPn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability e-invoice-fixer-128d6d1f -d '<json body>'
```

Example prompt: I have a Romanian e-Factura XML that has wrong county codes and incorrect VAT totals — can you automatically fix and recompute everything, using the 'ro' rule set, and show me exactly what changed?

## When to prefer this

Use this endpoint when you need to automatically repair a Romanian e-Factura or UBL 2.1 invoice XML before submitting to ANAF SPV — especially when the invoice has known structural or value issues (wrong codes, bad date formats, out-of-sync totals). It is preferable over manual correction or a plain validator when you want both repair and a detailed change audit in one call. Choose it over the sibling validator-only endpoint when you need the corrected XML returned, not just an error report.

## Known failure modes

- Invalid or non-parseable XML input returns a parse error with position details
- XML that is not a UBL 2.1 Invoice or CreditNote returns an unsupported document type error
- Unknown or conflicting CustomizationID when profile is 'auto' may result in rule set detection failure
- Invoice that passes validation without any changes is returned as-is and not charged
- Network timeout if the XML document is very large
- Malformed profile enum value returns a validation error

## How this service works

Automatically repair a Romanian e-Factura / UBL 2.1 invoice and return the corrected XML: county and Bucharest sector codes, country, currency and unit codes, date formats, VAT-id prefixes, decimals, and all totals and VAT amounts recomputed from the lines in dependency order. Every change is listed (field, old, new) and the result is re-validated against the official rules. Charged only when something was fixed.

## Output

Returns the corrected UBL 2.1 Invoice or CreditNote XML document with all repairs applied (county/sector codes, country, currency, unit codes, date formats, VAT-id prefixes, recomputed totals and VAT amounts), a structured change log listing every modified field with its old and new value, and re-validation results against the applicable rule set. A charge is only incurred when at least one fix was applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "xml": {
   "type": "string",
   "description": "The UBL 2.1 Invoice or CreditNote XML document"
  },
  "profile": {
   "enum": [
    "auto",
    "en16931",
    "peppol",
    "ro"
   ],
   "type": "string",
   "default": "auto",
   "description": "Rule set; 'auto' reads it from the invoice's CustomizationID"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/e-invoice-fixer-128d6d1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from einvoice.alexhub.uk](https://www.zero.xyz/host/einvoice.alexhub.uk/llms.txt)
