Skip to main content

View e-invoicing data


View e-invoicing data

With the E-Invoicing feature, after e-invoice files are generated for billing documents, you can view e-invoicing data through the REST API, and Data Query.

Query e-invoicing data through the REST API

You can query e-invoicing data through the REST API.

Retrieve e-invoice file status and error information

To retrieve e-invoice file status and error information through the REST API, use the following operations:

You can find related data from the following fields returned in the response of the preceding operations:

  • eInvoiceStatus
  • eInvoiceErrorCode
  • eInvoiceErrorMessage
  • eInvoiceFileId

Download e-invoice files

You can use the Retrieve a file operation to download the e-invoice file generated for a billing document.

Retrieve e-invoice results

You can use the "Retrieve e-invoice results" operation to retrieve e-invoice results according to the ID of a billing document. The document ID can be the ID of an invoice, a credit memo, or a debit memo.

The result fields might be different by country. For example, a QR code and an IRN are returned for the India e-invoicing clearance process.

The result fields on EInvoiceData includes the following fields:

  • QrCode: This field stores the QR code data that has been Base64 decoded. In India, the code is a signed QR code in the format of JSON Web Token (JWT), consisting of three parts: signature parameters, data, and a signature. 
  • ReferenceNumber: This field stores a unique number generated by the tax authority. In India, it is known as the Invoice Reference Number (IRN). IRN is a distinct code created by the Invoice Reference Portal (IRP) for every electronic invoice (e-invoice) file issued under the Goods and Services Tax (GST) system. This number is essential for verifying and authenticating e-invoice files within the Indian e-invoicing system.
  • DocumentId: This field stores the ID of the billing document, for which the e-invoice file is generated.
  • DocumentType: This field indicates the type of the billing document, for which the e-invoice file is generated.

For example, you can use /objects/records/com_zuora/EInvoiceData?q=DocumentId:8a90cbb1894e069c01894e14fa8501b9 to retrieve e-invoice data about the billing document with the ID of 8a90cbb1894e069c01894e14fa8501b9.

The following information is a response sample of e-invoice results:


Query e-invoicing data through Data Query

You can perform queries on the objects and fields related to this feature through Data Query, including the E-Invoice Business Region, E-Invoice Profile, E-Invoice Data, Account, Invoice, Credit Memo, and Debit Memo objects. For information about the basic usage of Data Query, see Constructing SQL Queries in Data Query.

E-Invoicing specific objects

The E-Invoicing feature introduces the following objects and the fields that are defined on these objects:

  • E-Invoice Business Region
  • E-Invoice Data
  • E-Invoice Profile

You can access these objects and all their fields through Data Query and the E-Invoicing API operations.

E-Invoicing specific fields on existing objects

The following table lists the E-Invoicing specific fields that are defined on existing objects. You can access these objects and all their fields through Data Query and related API operations.

Object Field Type
Account EInvoiceProfileId string
  • Invoice
  • Credit Memo
  • Debit Memo
EInvoiceStatus string
EInvoiceFileId string
EInvoiceErrorCode string
EInvoiceErrorMessage string

Construct SQL queries about E-Invoicing objects and fields

To query the objects and fields related to the E-Invoicing feature, you can construct SQL queries by referring to the following SQL examples:

  • Query the e-invoicing status based on the invoice number:
    SELECT inv.EInvoiceStatus,inv.EInvoiceFileId,inv.EInvoiceErrorCode,inv.EInvoiceErrorMessage
    FROM invoice as inv
    WHERE inv.InvoiceNumber='INVCA00000096'
    The sample request queries the invoice schedule associated with the specified order. The sample query result is as follows:
    EInvoiceStatus EInvoiceFileId EInvoiceErrorCode EInvoiceErrorMessage


    RE-400-BR-CO-15 Invoice total amount with VAT (BT-112)