DeleteInvoice API Operation

If the specified invoice is not in the draft state, this API returns an error.

Note that once you've deleted a draft invoice, it can no longer be used. For example, you can no longer access the invoice using GetInvoiceDetails.

Since a deleted invoice can't be accessed, you can reuse its invoice number in another invoice.

The difference between DeleteInvoice and CancelInvoice is that CancelInvoice works on invoices already sent, not on invoices in the draft state. DeleteInvoice, on the other hand, works only on invoices in the draft state.

DeleteInvoiceRequest Message

Use the DeleteInvoiceRequest message to pass the information required to delete a draft invoice.

DeleteInvoiceRequest Fields

Field

Description

invoiceID

xs:string(Required) The ID of the draft invoice to be deleted. This field cannot be null or blank.

requestEnvelope

common:requestEnvelope(Required) Information common to all API requests, such as the language in which error messages are returned.

RequestEnvelope Fields

Field

Description

errorLanguage

xs:string(Required) RFC 3066 language in which error messages are returned; by default it is en_US, which is the only language currently supported.

DeleteInvoiceResponse Message

The DeleteInvoiceResponse message indicates whether the specified invoice was successfully deleted, or provides information about an error.

DeleteInvoiceResponse Fields

Field

Description

responseEnvelope

common:ResponseEnvelope Structure containing information common to all API responses, including a timestamp and the response acknowledgment status. See ResponseEnvelope Fields for details.

PPFault Message

The PPFaultMessage returns ErrorData and the ResponseEnvelope information if an error occurs.

FaultMessage Fields

Field

Description

error

common:ErrorData Detailed error information.

responseEnvelope

common:ResponseEnvelope Structure containing information common to all API responses, including a timestamp and the response acknowledgment status. See ResponseEnvelope Fields for details.