Back to Blog
Corporate Solutions

E-Waybill (e-İrsaliye) Integration in Turkey: A Guide

How e-waybill (e-İrsaliye) integration works in Turkey: generating the document from verified loading, sending it before the truck leaves, safe retries with the ETTN, reconciling the receipt advice, goods receipt and the link to e-invoices.

E-İrsaliyeE-FaturaEntegrasyonSevkiyatKurumsal Yazılım

E-waybill integration in Turkey means creating the e-İrsaliye, the electronic despatch note, inside your ERP, inventory or dispatch software, sending it through an integrator to the Revenue Administration (GİB) system and to the recipient, and reading the recipient’s receipt advice back into the same software. The short answer: the document is generated from a shipment whose loading has been verified, not typed into a form; it is sent before the goods leave and its status is tracked; and the short, rejected and surplus quantities in the receipt advice automatically become work items. The real value of the integration is not sending a document but keeping what was shipped and what was received reconciled in one place.

What is an e-İrsaliye, and how is it different from an e-invoice?

The e-İrsaliye is the electronic version of the Turkish paper despatch note (sevk irsaliyesi) and uses the same UBL-TR format as the e-invoice. The difference lies in what it proves: the invoice documents the sale, the despatch note documents the movement of goods. That is why an e-İrsaliye carries transport details alongside the recipient and the items: despatch date, delivery address, vehicle plate and driver details. Which businesses must switch to e-İrsaliye is defined separately from e-invoicing, through a turnover threshold and certain sectors, and a business moving to e-İrsaliye must also be registered for e-invoicing. Thresholds change with new communiqués, so this article quotes no figures; the threshold logic for e-invoicing is covered in our guide to e-invoicing requirements in Turkey. Nothing here is legal or tax advice; confirm scope and deadlines with your accountant.

An e-İrsaliye is not a form, it is the official notice of a verified loading: the document must state what is on the truck, not what the order screen says.

Which e-waybill integration method should you use?

  • GİB e-İrsaliye Portal: documents are created one by one in a web interface. Enough when shipments are few and the note is already prepared by hand, but it has no link to your dispatch software, so data is entered twice.
  • Private integrator: the most common method. The integrator gives you an API; your software builds the document, the integrator delivers it to the GİB system and the recipient and returns the responses to you.
  • Direct integration: your own systems connect to GİB. Approval and technical requirements are heavy; it only makes sense for very high volumes and companies with their own systems team.

The rule of thumb is the same as for e-invoices: if the despatch note is born inside software (ERP, warehouse, dispatch), you need an integrator API. Most businesses use the e-İrsaliye module of the integrator they already use for e-invoices; the module is usually priced separately, and the contract should state explicitly that receipt advices can be read through the API. Building, sending and polling the document work almost exactly like the e-invoice flow, which we covered in e-invoice integration in Turkey. This article focuses on three things specific to the e-İrsaliye: what data the document is born from and when, how to retry sending safely, and how to reconcile the receipt advice.

From shipment to e-İrsaliye: when, and from what data?

The e-İrsaliye is generated from the shipment record. Once barcode scans have confirmed which order went onto which vehicle, the software creates one document per delivery point: the lines for that recipient, the quantities, the vehicle and the driver. We covered planning and loading in our guide to dispatch management software. As a rule, the e-İrsaliye is issued and delivered to the recipient before the goods are actually dispatched; in software, this means the vehicle’s exit approval depends on the document reaching the "delivered to recipient" status. While the document is unsent or stuck in an error, the exit cannot be recorded. Before sending, the software asks the integrator whether the recipient is registered for e-İrsaliye; which document to issue for an unregistered recipient is set by the regulations, and the software leaves that decision to a configured rule rather than to the user. Whether the document goes through without rejection depends mostly on clean master data:

  • Recipient: tax number (VKN) or national ID number (TCKN), legal name and tax office complete; the same company not created twice in the customer list.
  • Delivery address: the address the goods actually go to, not the head office on the invoice; sites and branches as separate records.
  • Item and unit: each item has one code and one standard unit; units in your software are translated into the codes the document expects through a mapping table (C62 for pieces, KGM for kilograms, for example).
  • Quantity: the quantity scanned at loading, not the ordered quantity.
  • Transport details: the vehicle plate and the driver’s identity details come from vehicle and driver records rather than being typed each time. Driver details are personal data: keep only the fields the document needs and restrict access.
  • References: order and shipment numbers, so the document can later be matched to the invoice and the receipt advice.

Sending, status tracking and safe retries

Sending to the integrator is not a synchronous operation. The API accepting your request does not mean the document has passed through the GİB system and reached the recipient, so the software keeps separate statuses for every document: draft, sending, at the integrator, delivered to recipient, response received and error. Statuses are updated from the integrator’s notifications or from regular polling, never assumed; we explained the notification side in what is a webhook. The most common problem is a network failure: the request times out and nobody knows whether the document went out. The fix is to generate the document’s universal unique identifier (ETTN) and its document number once, before sending, and to store them. A retry uses the same ETTN and number, so the same shipment never ends up with two different documents. A sent document is never deleted or overwritten in the software; how an incorrect document is corrected follows the rules in the GİB guide, and the software records the correction with its reason and the person who made it.

Receipt advice: reconciling short, rejected and surplus quantities

After taking delivery, the recipient of an e-İrsaliye sends a receipt advice (irsaliye yanıtı) stating, for each line, the quantity received and any short, rejected or surplus quantity. The response deadline and the field details are defined in the guide; read them through your integrator’s documentation. Many companies leave these responses in the integrator’s portal, where nobody opens them. Yet the response is the only official reconciliation between what was shipped and what was received, and it should create work. The example below compares a response with the despatch lines, calculates the invoiceable quantity and returns short, rejected, surplus and unanswered lines as tasks:

type DespatchLine = { lineId: string; sku: string; shipped: number };
type ReceiptLine = { lineId: string; received: number; rejected: number };
type Task = {
  kind: 'short' | 'rejected' | 'oversupply' | 'unanswered';
  lineId: string;
  quantity: number;
};

function reconcileReceipt(despatch: DespatchLine[], receipt: ReceiptLine[]) {
  const shippedIds = new Set(despatch.map(line => line.lineId));
  for (const answer of receipt) {
    if (!shippedIds.has(answer.lineId)) {
      throw new Error('Receipt line not on the despatch: ' + answer.lineId);
    }
    if (answer.rejected > answer.received) {
      throw new Error('Rejected exceeds received: ' + answer.lineId);
    }
  }
  const answers = new Map(receipt.map(answer => [answer.lineId, answer]));
  const invoiceable: Record<string, number> = {};
  const tasks: Task[] = [];
  const addTask = (kind: Task['kind'], lineId: string, quantity: number) => {
    if (quantity > 0) tasks.push({ kind, lineId, quantity });
  };
  let shippedTotal = 0;
  let acceptedTotal = 0;
  for (const line of despatch) {
    shippedTotal += line.shipped;
    const answer = answers.get(line.lineId);
    if (!answer) {
      invoiceable[line.lineId] = 0;
      addTask('unanswered', line.lineId, line.shipped);
      continue;
    }
    const usable = answer.received - answer.rejected;
    const accepted = Math.min(usable, line.shipped);
    addTask('short', line.lineId, line.shipped - answer.received);
    addTask('rejected', line.lineId, answer.rejected);
    addTask('oversupply', line.lineId, answer.received - line.shipped);
    invoiceable[line.lineId] = accepted;
    acceptedTotal += accepted;
  }
  const clean = acceptedTotal === shippedTotal && tasks.length === 0;
  const status = clean ? 'full' : acceptedTotal === 0 ? 'none' : 'partial';
  return { status, invoiceable, tasks };
}

A few rules apply automatically in the example. A line missing from the response is not treated as accepted; it becomes a task of its own. Rejecting more than was received is a data error and is not silently corrected. Surplus quantity does not reach the invoice without approval; if the customer wants to keep it, an additional order or an approval record is required. The status is "full" only when no task comes out. A short line is followed up with the warehouse and the carrier; the loading scans show whether the goods were already missing at the warehouse or got lost on the way. For rejected quantities the software opens a return record and tracks it until the goods come back, a process we described in our guide to returns management software. Whether you invoice the shipped or the accepted quantity is a company rule: the example applies the latter, and if your rule differs, this calculation is the only thing that changes.

Incoming e-İrsaliye: how does it connect to goods receipt?

In the other direction, the same document is where goods receipt begins. When a supplier’s e-İrsaliye arrives, the software finds the related purchase order and opens a pending goods receipt; when the truck arrives, the warehouse opens that record and scans the items. Stock is booked by what is counted, not by what the document says. The difference between the count and the document becomes the receipt advice you send back: short, damaged or surplus lines are the lines of your response. The incoming document is never edited, only read, and your own records are built against it. We described the three way match of order, goods receipt and invoice in our guide to purchasing software; the e-İrsaliye backs the goods receipt leg of that match with an official document.

How does the e-İrsaliye connect to the e-invoice?

The invoice refers to the number and date of the despatch notes it is based on. One invoice can close several despatch notes, and with partial deliveries one despatch note can be split across several invoices. The software keeps this link at line level: it knows which despatch line went into which invoice line. The period within which the invoice must be issued after delivery is defined in the Turkish Tax Procedure Law (VUK); it is not hard coded but kept in a dated rule table and confirmed with your accountant. How invoice and despatch data reach the books is covered in accounting software integration. Once the link exists, the lists management should see every day come out on their own:

  • Uninvoiced despatch notes: lines delivered or answered but not yet linked to an invoice, with the number of days.
  • Unanswered despatch notes: documents delivered to the recipient whose response has not come back within the expected time.
  • Documents stuck in error: drafts the integrator returned with an error that nobody has fixed yet; their shipments are waiting too.
  • Short and rejection rates: by customer, item, vehicle and warehouse; recurring shortages usually point to a loading or counting problem.
  • Exits without a document: vehicles recorded as leaving before their e-İrsaliye was delivered to the recipient. This list should always be empty.

Common e-waybill integration mistakes

The first mistake is issuing the despatch note from the order screen; the document then states the planned goods rather than the loaded goods, and every difference in the response turns into an argument. The second is treating a document as sent as soon as the API returns 200; the truck leaves while the document sits in an error at the integrator. The third is retrying after a timeout with a new number, which gives the same shipment two documents. The fourth is leaving receipt advices in the integrator’s portal, so short and rejection data never reach invoicing or returns. The fifth is writing units and item codes into the document as free text. Finally, booking an incoming despatch note straight into stock shows goods that nobody has counted.

Frequently asked questions

Can e-İrsaliye be added to our existing ERP or inventory software?

In most cases, yes. If the software stores shipments, item and unit codes and recipient details consistently, a module that connects to the integrator API is added. The real work is usually cleaning the master data and keeping the shipment as a record of its own. If the packaged software cannot do that, or the despatch note has to be tied into the warehouse and dispatch flow, custom development comes into play.

Is our e-invoice integrator enough for e-İrsaliye too?

Usually the same integrator’s e-İrsaliye module is used. Before signing, ask three things: can receipt advices be read through the API, are status changes pushed as notifications or only available by polling, and is there a test environment. Without these three, the integration stays dependent on the portal.

How is an incorrectly sent e-İrsaliye corrected?

A sent document is never deleted or changed in the software. How a correction is made depends on the rules in the GİB guide and on the operations your integrator supports; the software only records which document was corrected and why, which document replaced it and who did it. Most errors can be caught before sending: recipient, address and unit checks run at the draft stage.

Conclusion

A good e-İrsaliye integration generates the document from verified loading, sends it before the goods leave and tracks its status, creates the ETTN and number once so retries are safe, turns short, rejected and surplus lines in the receipt advice into tasks, ties incoming despatch notes to goods receipt and keeps uninvoiced despatch notes visible every day. Everything else is screens and reports built on that foundation. For a solution that fits your dispatch and warehouse flow, see our corporate solutions page or describe your current systems and get a quote.

Let's Build Your Project

Get a free consultation for your website, mobile app, or corporate software project.

Get a Free QuoteExplore our Corporate Solutions service