> For the complete documentation index, see [llms.txt](https://developer.nilvera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.nilvera.com/en/nilvera-model/einvoice/invoicelines.md).

# InvoiceLines

> This is the area where all the details of the invoice items (goods/services) will be entered.

```csharp
public class EInvoiceLineDto
{
     public string Index { get; set; }
     public string SellerCode { get; set; }
     public string BuyerCode { get; set; }
     public string Name { get; set; }
     public string Description { get; set; }
     public decimal Quantity { get; set; }
     public string UnitType { get; set; }
     public decimal Price { get; set; }
     public decimal AllowanceTotal { get; set; }
     public decimal KDVPercent { get; set; }
     public decimal KDVTotal { get; set; }
     public List<TaxDto> Taxes { get; set; }
     public DeliveryInfoDto DeliveryInfo { get; set; }
     public string ManufacturerCode { get; set; }
     public string BrandName { get; set; }
     public string ModelName { get; set; }
     public string Note { get; set; }
     public string AdditionalInfoId { get; set; }
     public string SerialID { get; set; }
     public string ProductTraceID { get; set; }
     public List<string> LabelNumbers { get; set; }
     public string BuyerDIBLineCode { get; set; }
     public string SellerDIBLineCode { get; set; }
     public string GTIPNo { get; set; }
     public string OzelMatrahReason { get; set; }
     public decimal OzelMatrahTotal { get; set; }
     public decimal VatAmountWithoutTevkifat { get; set; }
     public InvestmentIncentiveExpenseType InvestmentIncentiveExpenseType { get; set; }
     public MedicineAndMedicalDeviceDto MedicineAndMedicalDevice { get; set; }
     public AdditionalItemIdentificationDto AdditionalItemIdentification { get; set; }
}
```

### Index

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the item number of the invoice will be specified.

### SellerCode

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the product's seller code will be entered.

### BuyerCode

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the product's recipient code will be entered.

### Name

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the area where the product name will be entered.

### Description

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the area where the product description will be entered.

### Quantity

<mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the field where the amount will be entered.

### UnitType

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the field where the unit type is entered. The possible values ​​are listed under Unit Codes in the code lists section.

### Price

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the area where the product price will be entered.

### AllowanceTotal

<mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the field where the discount amount will be entered.

### KDVPercent

<mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the field where the product's VAT rate will be entered.

{% hint style="info" %}
VAT Rates: 1, 10, and 20%.

If the VAT rate is 0, the reason for the tax exemption must be stated. See TaxExcemptionReasonInfo for the tax exemption reason.
{% endhint %}

### KDVTotal

<mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Required`</mark>

> This is the field where the total VAT amount of the product will be entered.

### Taxes

<mark style="color:blue;">`List`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the area where other taxes to be added to the product are entered. The possible values ​​are specified under Tax Codes in the code lists section.

```csharp
public class TaxDto
{
     public string TaxCode { get; set; }
     public decimal Total { get; set; }
     public decimal Percent { get; set; }
     public string ReasonCode { get; set; }
     public string ReasonDesc { get; set; }
}
```

> **TaxCode:** This is the field where the tax code is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> **Total:** This is the field where the total tax amount will be entered.  <mark style="color:blue;">`decimal`</mark>  Varies depending on the tax.

> **Percent:** This is the field where the tax rate will be entered. <mark style="color:blue;">`decimal`</mark>  Varies depending on the tax.

{% hint style="info" %}
If the entered tax code list appears under Withholding Tax Codes, the following fields must be filled in:

ReasonCode: This is the field where the code will be entered.\
ReasonDesc: This is the field where the code description will be entered.
{% endhint %}

> **Exp:** If the tax entered is VAT withholding;

```javascript
EInvoice.InvoiceLines[0].Taxes = [
    {
        TaxCode: "9015",
        Total: 1.72, //1.72 is given as an example.
        Percent: 40,
        ReasonCode: "601",
        ReasonDesc: "Yapım İşleri İle Bu İşlerle Birlikte İfa Edilen Mühendislik"
    }
]
```

### DeliveryInfo

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

{% hint style="info" %}
This section is where export information is entered on IHRACAT invoices.
{% endhint %}

```csharp
public class DeliveryInfoDto
{
     public string GTIPNo { get; set; }
     public string DeliveryTermCode { get; set; }
     public string TransportModeCode { get; set; }
     public string PackageBrandName { get; set; }
     public string ProductTraceID { get; set; }
     public string PackageID { get; set; }
     public decimal PackageQuantity { get; set; }
     public string PackageTypeCode { get; set; }
     public AddressInfoDto DeliveryAddress { get; set; }
}
```

> **GTIPNo**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark> \
> This is the field where the GTIP (Customs Tariff Statistical Position) number will be entered.

> **DeliveryTermCode**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark> \
> This is the field where the delivery terms for the goods/services are entered. The possible values ​​are listed under Delivery Terms Codes in the code lists section.

> **TransportModeCode**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>&#x20;
>
> This is the field where the shipping method information is entered. The possible values ​​are listed under Shipping Method Codes in the Code Lists section.

> **PackageBrandName**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>
>
> This is the field where the brand name of the container holding the goods/services will be entered.

> **ProductTraceID**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>&#x20;
>
> This is the field where the Customs Tracking Number will be entered.

> **PackageID**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>
>
> This is the field where the container number of the goods/services is entered.

> **PackageQuantity**  <mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Optional`</mark>
>
> The quantity of containers holding the goods/services is entered.

> **PackageTypeCode**  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>
>
> This field is for entering the type of container in which the goods/services are stored. Possible values ​​are listed under Container Types in the code lists section.

{% hint style="info" %}
**DeliveryAddress**(Place of Delivery of Goods and Payment) fields are specified below.&#x20;
{% endhint %}

<mark style="color:orange;">`Required`</mark>&#x20;

```csharp
public class AddressInfoDto
{
     public string Address { get; set; }
     public string District { get; set; }
     public string City { get; set; }
     public string Country { get; set; }
     public string PostalCode { get; set; }
     public string Phone { get; set; }
     public string Fax { get; set; }
     public string Mail { get; set; }
     public string WebSite { get; set; }
}
```

> **Address:** The address of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> **District:** The district of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> **City:** The city of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> **Country:** The country of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Required`</mark>

> **PostalCode:** The postal code of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> **Phone:** The phone number of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> **Fax:** The fax number of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> **Mail:** The e-mail address of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> **WebSite:** The website of the place of delivery of the goods is entered.  <mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

### ManufacturerCode

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the manufacturer code will be entered.

### BrandName

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the brand name will be entered.

### ModelName

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the model name will be entered.

### Note

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the area where the note will be added.

### AdditionalInfoId

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This field is used if additional information (ID) is to be entered.

### SerialID

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> In instant charging (ŞARJ) invoices, the serial number must be entered in this field; in investment incentive invoices, the Machine ID must be entered when InvestmentIncentiveExpenseType (Expense Type) is "MachineAndSoftware".

### ProductTraceID

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> In investment incentive invoices, the Machine/Equipment Sequence No must be entered in this field when InvestmentIncentiveExpenseType (Expense Type) is "MachineAndSoftware".

### LabelNumbers

<mark style="color:blue;">`List`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the label numbers are entered in IDIS (Construction Steel Monitoring System) invoices.

### BuyerDIBLineCode

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> In export-registered invoices, the Buyer Line Code is entered in this field when KDVExemptionReasonCode is "702" (Sales within the scope of DIIB and the Temporary Admission Regime).

{% hint style="info" %}
The buyer line code must consist of 11 digits.
{% endhint %}

### SellerDIBLineCode

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> In export-registered invoices, the Seller Line Code is entered in this field when KDVExemptionReasonCode is "702" (Sales within the scope of DIIB and the Temporary Admission Regime).

### GTIPNo

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the GTIP (Customs Tariff Statistics Position) number is entered in E-Archive exemption invoices.

{% hint style="info" %}
For <mark style="color:red;">**IHRACAT**</mark> (export) invoices, the **DeliveryInfo** field must be used.
{% endhint %}

### OzelMatrahReason

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the reason for the special tax base is entered. The possible values ​​are specified under Special Tax Base Codes in the code lists section.

{% hint style="info" %}
This section should be filled out if the invoice type is "OZELMATRAH".
{% endhint %}

### OzelMatrahTotal

<mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the specific tax base amount will be entered.

{% hint style="info" %}
This section should be filled out if the invoice type is "OZELMATRAH".
{% endhint %}

{% hint style="info" %}
The sales price will be entered in a single entry. The VAT shown in the entry will be calculated based on the "Special Tax Base Amount".
{% endhint %}

### VatAmountWithoutTevkifat

<mark style="color:blue;">`decimal`</mark>  <mark style="color:orange;">`Optional`</mark>

{% hint style="info" %}
This is the section where the withholding amount is entered in <mark style="color:red;">**TEVKIFAT**</mark> invoices.
{% endhint %}

{% hint style="info" %}
This section should be filled out if the invoice type is <mark style="color:red;">**"TEVKIFAT"**</mark>.
{% endhint %}

### InvestmentIncentiveExpenseType

<mark style="color:blue;">`enum`</mark>  <mark style="color:orange;">`Optional`</mark>

> This is the field where the expense type is specified in investment incentive invoices.

```csharp
public enum InvestmentIncentiveExpenseType
{
    MachineAndSoftware = 1,
    Construction = 2,
    LandAndPlotSale = 3,
    Other = 4
}
```

### MedicineAndMedicalDevice

<mark style="color:orange;">`Optional`</mark>

> This is the field where product information is entered in Medicine and Medical Device invoices.

{% hint style="info" %}
If ProductType is `OTHER`, the related field will be filled in automatically by the system in the XML.
{% endhint %}

{% hint style="info" %}
If ProductType is `MEDICINE`, the `Medicine` model must be filled in; if it is `MEDICALDEVICE`, the `MedicalDevice` model must be filled in.
{% endhint %}

```csharp
public class MedicineAndMedicalDeviceDto
{
    public List<MedicineDto> Medicine { get; set; }
    public List<MedicalDeviceDto> MedicalDevice { get; set; }
    public ProductType ProductType { get; set; }
}

public class MedicineDto
{
    public string GTIN { get; set; }
    public string BatchNumber { get; set; }
    public string SerialNumber { get; set; }
    public DateTime ExpirationDate { get; set; }
}

public class MedicalDeviceDto
{
    public string ProductNumber { get; set; }
    public string LotNumber { get; set; }
    //Filling in the SerialNumber field is not mandatory.
    public string SerialNumber { get; set; }
    public DateTime ProductionDate { get; set; }
}

public enum ProductType
{
    MEDICINE = 1,
    MEDICALDEVICE = 2,
    OTHER = 3
}
```

### AdditionalItemIdentification

<mark style="color:orange;">`Optional`</mark>

```csharp
public class AdditionalItemIdentificationDto
{
    public string TagNumber { get; set; }
    public string OwnerName { get; set; }
    public string OwnerTaxNumber { get; set; }
}
```

> **TagNumber:** This is the field where the tag (künye) number is entered in HAL type invoices.

> **OwnerName:** This is the field where the title of the owner of the goods is specified in HAL type sales invoices.

> **OwnerTaxNumber:** This is the field where the tax ID number or T.R. identity number of the owner of the goods is specified in HAL type sales invoices.
