> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generates a Peppol BIS Billing 3.0 UBL e-invoice from a canonical invoice

> payload. Emits a signed edi.einvoice.generated VES event. The response reports BIS completeness and the delivery status — generation is performed here…

payload. Emits a signed `edi.einvoice.generated` VES event. The response
reports BIS completeness and the delivery status — generation is performed
here; transmission to a government / Peppol network requires a certified
access-point partner (the `delivery` seam), per the deliberate A- scope.

### Path parameters

<ParamField path="partner_id" type="string" required>
  Partner ID
</ParamField>

### Request body

`UblInvoiceInput`

<ParamField body="buyer_reference" type="string" />

<ParamField body="currency" type="string">
  ISO 4217 currency, e.g. `EUR`.
</ParamField>

<ParamField body="customer" type="EInvoiceParty" required />

<ParamField body="due_date" type="string" />

<ParamField body="invoice_number" type="string" required />

<ParamField body="issue_date" type="string" required>
  ISO date `YYYY-MM-DD`.
</ParamField>

<ParamField body="lines" type="UblLine[]" required />

<ParamField body="supplier" type="EInvoiceParty" required />

<ParamField body="tax_percent" type="string">
  Single VAT rate (percent) applied to the whole invoice — the common case; multi-rate breakdown is a later refinement.
</ParamField>

### Response

No response body. UBL e-invoice (XML + validation + delivery status).

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | UBL e-invoice (XML + validation + delivery status) |
| `403` | Not this credential's partner                      |
| `422` | Invalid payload                                    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://edi.stateset.com/v1/einvoice/ubl/{partner_id}' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "buyer_reference": "string",
    "currency": "USD",
    "customer": {
      "city": "San Francisco",
      "country": "US",
      "endpoint_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "endpoint_scheme": "string",
      "name": "Two-Person Tent",
      "postal_code": "94107",
      "street": [
        "548 Market St"
      ],
      "vat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    },
    "due_date": "2026-08-31T14:22:05Z",
    "invoice_number": "ORD-10042",
    "issue_date": "2026-08-31T14:22:05Z",
    "lines": [
      {
        "description": "Two-person tent, green — replacement for damaged pole set.",
        "quantity": "string",
        "unit_price": "49.00",
        "uom": "string"
      }
    ],
    "supplier": {
      "city": "San Francisco",
      "country": "US",
      "endpoint_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "endpoint_scheme": "string",
      "name": "Two-Person Tent",
      "postal_code": "94107",
      "street": [
        "548 Market St"
      ],
      "vat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    },
    "tax_percent": "string"
  }'
  ```
</RequestExample>
