---
title: "Generate an e-invoice file for an invoice"
method: PUT
path: "/v1/invoices/{invoiceKey}/einvoice/generate"
tags: ["E-Invoicing"]
---

# Generate an e-invoice file for an invoice

`PUT /v1/invoices/{invoiceKey}/einvoice/generate`

Generates an e-invoice file for an invoice. 
If the invoice status is **Failed** during e-invoice generation, you can use  **Regenerate E-Invoice**. Once you fix the errors and trigger the regeneration,  the system will resubmit the document to the e-invoicing service provider,  and its status will update to **Processing**.

**Note**:

- <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/e-invoicing/e-invoicing-with-sovos" target="_blank">E-invoicing with Sovos</a> and <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/e-invoicing/e-invoicing-with-peppol-extract" target="_blank">E-invoicing with PEPPOL Extract</a> are generally available. 
- <a href=https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/e-invoicing/e-invoicing-with-avalara target="_blank">E-invoicing with Avalara</a> is in the **Early Availability** phase. We are actively soliciting feedback from a small set of early availability users before releasing this feature as generally available.  If you want to join this early availability program, submit a request at <a href="https://zuora.zendesk.com/auth/v2/login/signin?return_to=https%3A%2F%2Fsupport.zuora.com%2Fhc%2Fen-us&theme=hc&locale=en-us&brand_id=825826&auth_origin=825826%2Ctrue%2Ctrue" target="_blank">Zuora Global Support</a>. 

The **Regenerate E-Invoice** action is available in the **Generated** status for the PEPPOL service provider.

## Path parameters

- `invoiceKey` string, required

## Headers

- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Response `200`

OK

- CommonResponse
  - `processId` string — The ID of the process that handles the operation.
  - `reasons` object[] — The container of the error code and message. This field is available only if the `success` field is `false`.
    - `code` string — The error code of response.
    - `message` string — The detail information of the error response
  - `requestId` string, uuid — Unique identifier of the request.
  - `success` boolean — Indicates whether the call succeeded.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
