---
title: "Generate invoice XML (2 credits)"
method: POST
path: "/v1/efactura/generate"
tags: ["e-Factura"]
---

# Generate invoice XML (2 credits)

`POST /v1/efactura/generate`

## Request

- Base URL: `https://api.howtoromania.io`
- URL: `https://api.howtoromania.io/v1/efactura/generate`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

CIUS-RO UBL from simple JSON; parties auto-filled from CUI; ANAF-validated

## Request body

- object
  - `number` string, required
  - `issueDate` string
  - `dueDate` string
  - `currency` string
  - `vatToRonRate` number
  - `seller` object, required
  - `buyer` object, required
  - `lines` object[], required
    - `name` string, required
    - `quantity` number, required
    - `unitPrice` number, required
    - `unitCode` string
    - `vatRate` number
    - `vatCategory` string

## Response `200`

OK

- object
  - `data` object

## Other responses

- `400`: Invalid input (not billed)
- `401`: Missing/invalid key
- `402`: Out of credits; credit packs open soon
- `403`: Endpoint not in demo key
- `404`: Not found (not billed)
- `429`: Demo limit reached
- `502`: Upstream error (not billed)

---

[API](https://skmtc.dev/howtoromania/apis/howtoromania-api.md) · [All operations](https://skmtc.dev/howtoromania/apis/howtoromania-api/llms.txt) · [OpenAPI document](https://skmtc.dev/howtoromania/apis/howtoromania-api/revisions/94363e638724?raw)
