---
title: "Cancel the e-invoice file for an invoice"
method: PUT
path: "/v1/invoices/{invoiceKey}/e-invoice/cancel"
tags: ["E-Invoicing"]
---

# Cancel the e-invoice file for an invoice

`PUT /v1/invoices/{invoiceKey}/e-invoice/cancel`

Cancels the E-Invoice for the given billing document

## Path parameters

- `invoiceKey` string, required

## Headers

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

## Request body

- PutCancelEInvoiceRequest
  - `reason` '01' | '02' | '03' | '04' — The reason code for cancelation.
  - `documentReferenceID` string — The ID or number of the billing document that replaces the e-invoice being canceled. You can replace the canceled e-invoice with a new invoice or debit memo. **Note:** The documentReferenceID is applicable only for the reason 01 when you cancel E-Invoice for Mexico.

## Response `200`

- 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)
