Import documents from a file

Use this page to send e-invoices from a spreadsheet. You fill in the Excel template, import the file in the Wafeq e-invoicing ASP portal, and approve the documents that are ready. You do not need to write code.

Watch a 4-minute video of a full import in Sandbox:

This page uses these terms:

  • Wafeq e-invoicing ASP portal: the website where you manage your organization, at einvoicing.wafeq.com.
  • Taxpayer: a business from which your organization has an active grant. The portal uses the Taxpayer ID (txpay_…) to identify it.
  • Draft: a document that the portal saved from your file. The portal does not send a draft until you approve it.
  • Peppol: the network that UAE businesses use to exchange e-invoices.

Before you start

  • You must be an owner or an admin of your organization.
  • The business that issues the documents must be a taxpayer of your organization. Refer to Connect a taxpayer.
  • Try your first file in Sandbox. In Sandbox, nothing goes to a buyer or to the FTA. Refer to Sandbox.

1. Get the template

  1. In the portal, go to Files, then click New import.
  2. Select the Document type: invoices, credit notes, self-billed invoices or self-billed credit notes.
  3. Click Download Excel template. Each document type has its own template.

The template has four sheets:

  • Import: the sheet that you fill in. The portal reads only this sheet.
  • Instructions: the rules for each part of the file.
  • Examples: two sample rows. The portal never imports them.
  • Dropdown values: each code that a column accepts, with its meaning.

Each column header on Import and Examples has a note. Put the pointer on a header to read what the column needs and what each code means.

2. Fill in the template

  • Use one row for each line of a document. Rows with the same taxpayer_id and document number make one document.
  • Start each row with the Taxpayer ID of the business that issues the document. You can find it on the taxpayer's page, under Taxpayers.
  • Put the document details on the first row of each document: dates, currency and the buyer's details. The next rows of the same document can leave them blank.
  • Use only columns from the template. Unknown column names are reported as errors, even when their cells are blank. A field supported by the JSON API is not necessarily supported as an import column.
  • Select coded values from the dropdowns, for example the UAE emirate (DXB) and the tax category (S, Z, E, O, AE or N). For foreign addresses, type the actual state, province or region in customer_emirate (or supplier_emirate), for example London. The column is required for foreign addresses too.
  • Write the tax rate as a number: 5 for 5%, not 0.05.
  • Leave the special scenario columns blank for a normal invoice. Select Yes in free_zone, margin_scheme or disclosed_agent_billing only when that scenario applies. Refer to Special scenarios.

For each special scenario, fill in its required fields:

Scenario column set to YesRequired fields
free_zonebeneficiary_identifier: the beneficiary's identifier. If the buyer is also the beneficiary, enter its identifier again.
disclosed_agent_billingprincipal_vat_number: the principal's 15-digit VAT TRN, starting with 1 and ending in 03. It must differ from the seller's VAT TRN.
margin_schemeSet line_tax_category to N and line_tax_percent to 5 on every line. line_unit_price is the price the buyer pays; the document shows zero VAT.

Leave beneficiary_identifier and principal_vat_number blank when their scenarios
do not apply. You can combine scenarios; provide the required fields for each one.

Discounts, charges and prices including VAT

Use tax_amount_type to choose TAX_EXCLUSIVE (the default) or TAX_INCLUSIVE.
This applies to line unit prices and all discount and charge amounts and bases.
If a unit price already includes a discount, do not enter that discount again.

The four adjustment columns accept JSON arrays. Write exact decimal amounts as
JSON strings, as in these examples:

ColumnApplies toExample cell
discountsWhole document[{"amount":"10.00","reason":"Discount","tax_category":"S","tax_percent":5}]
chargesWhole document[{"amount":"2.00","reason":"Handling","tax_category":"S","tax_percent":5}]
line_discountsThis row's whole line[{"amount":"1.00","reason":"Discount"}]
line_chargesThis row's whole line[{"amount":"0.50","reason":"Packing"}]

Document adjustments need their own VAT category and rate. Line adjustments inherit
the line's VAT treatment. Supply a reason or reason code for each adjustment. You
can supply base_amount and percentage together instead of amount; if all three
are present, the amount must agree with the percentage calculation rounded half up
to two decimal places. Each array can contain at most 100 adjustments.

Document discounts, charges and tax_amount_type may appear on any row of that
document. Repeating the same value applies it once; different values produce an
error naming the row and column. JSON formatting, object-key order and equivalent
numeric spellings such as "10.00" and 10 do not matter; array order and the
reason/VAT details must agree. An amount-only entry can repeat an equivalent
base/percentage entry; the supplied base and percentage are retained. Different
explicit calculation bases conflict. For prices including VAT, the forms must
also produce the same net amount and exact quoted amount before rounding.
A blank cell makes no assertion; [] explicitly means no adjustments and conflicts
with a nonempty array on another row. Line adjustments apply separately to each row.

Document types and previous invoices

The file has no document type column. Wafeq e-invoicing ASP uses commercial codes 480/81 when every line, document discount and document charge is exempt (E) or out of scope (O). A seller without a TRN always uses commercial codes and can use only E or O. Any Z on a new 480/81 is refused with document_type_mismatch, including when an older saved draft is restored for submission. Existing accepted documents and completed idempotent responses stay unchanged. Self-billed codes remain 389/261. See Document types for credit notes linked to existing invoices and exempt-only documents.

For a final invoice after already-invoiced advances, enter the remaining amounts
on its lines, with their original VAT categories and rates. In preceding_invoices,
enter a JSON array such as
[{"invoice_number":"ADV-001","issue_date":"2026-10-01"},{"invoice_number":"ADV-002"}].
Dates are optional; use the date order selected for the file, or ISO YYYY-MM-DD.
Put the array on the first row of the document; if you repeat it on another line,
it must agree. A reference entered only on a later line is also retained.
There can be up to 100 references, an API capacity limit. This column is for
invoices and self-billed invoices; credit notes keep their existing reference
columns. References do not deduct amounts or allocate advances. Do not add a
second deduction through paid_amount or prepaid_amount; those columns are
unsupported. See Final invoices after already-invoiced advances.

A file can have a maximum of 50,000 rows, 5,000 documents and 25 MiB.
Each document can contain at most 1,000 lines. This is an API capacity limit,
not a UAE regulatory limit; the file's row limit does not increase it.

3. Import the file

  1. On New import, click the upload area and select your file. You can also drop the file on it.
  2. Your browser checks the file before it uploads it. If a row has a problem, the portal shows the row number and the column to correct. Correct the file and select it again.
  3. When the checks pass, the portal shows a preview of each document. Click Save drafts and validate.

The portal saves your documents as drafts. Then, in the background, it validates each document against the UAE rules and finds each buyer on the Peppol network. You can close the page while it works.

4. Approve and send

Open the file from Files to see the status of each document:

  • Ready to send: the document is valid and the portal found the buyer on Peppol.
  • Needs attention: the document has a problem, for example a validation error, or the buyer is not on Peppol. Click Download errors to get each problem in a spreadsheet.

To send, select the documents that are ready, then click Approve and send. Each document goes to the access point of its buyer. Each sent document is also in Sales or Purchases, with the documents that your organization sends through the API.

To correct a document that needs attention:

  • A validation error: correct the document in your file, and import a file with that document only.
  • A buyer that is not on Peppol: when the buyer registers, select the document and click Retry selected.

Buyers using FTA reporting only

A buyer without a Peppol address can resolve to a predefined reporting-only route.
Review the FTA reporting only label before approving the draft. These documents
are not delivered to the buyer through Peppol; arrange buyer delivery separately.
An accepted reporting-only submission does not mean the FTA has accepted the report.
Sandbox simulates this route and submits nothing to the FTA.

An ordinary recipient lookup failure remains a separate error; imports do not
silently switch that document to reporting only.


Import documents from a file