> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.noyax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alış iade faturası oluştur

> Faturayı ve satırlarını tek transaction'da oluşturur.

Fatura, satırları, satırların indirimleri ve depo hareketi olan satırların Lot/seri no girdileri **tek bir transaction'da** yazılır: herhangi biri geçersizse hiçbir şey kaydedilmez ve tüm hatalar tek bir `Message`'da döner. Satır hataları satır numarasıyla başlar, ör. `Line 2: Quantity must be greater than 0.`

<CardGroup cols={2}>
  <Card title="Alan kuralları" icon="list-check" href="/tr/v1/purchase-return-invoices/overview">Numaralandırma, depo hareketi yönü, cari hareket yönü.</Card>
  <Card title="Hesaplamalar" icon="calculator" href="/tr/v1/quotes/calculations">Tutarların ve toplamların nasıl hesaplandığı (fatura satırları sipariş/irsaliye satırlarıyla aynı alanları kullanır).</Card>
</CardGroup>

<Warning>API, tevkif edilen KDV tutarı dışında tutarları hesaplamaz ve tutarlı olup olmadıklarını denetlemez. Satır tutarlarını ve toplamları kendi sisteminizin hesapladığı gibi gönderin.</Warning>

* Bu fatura tipinin düz bir seri numarası yoktur: `"Next"`'i `EInvoiceType` `1` ya da `2` ile göndererek numarayı şirketin e-fatura numaralandırmasından üretin — bkz. [numaralandırma](/tr/v1/purchase-return-invoices/overview#numaralandırma).
* Carinin adresi, unvanı, vergi numarası ve vergi dairesi `CustomerCode`'dan kopyalanır, istekte kabul edilmez.
* Fatura her zaman bir cari hareket kaydı (borç) oluşturur.
* Başarılı yanıt **201 Created**'dır; `Location` header'ı yeni faturayı gösterir.

## Hata kodları

Bu endpoint'in dönebileceği kodlar. Her endpoint için geçerli olan [genel hatalar](/tr/v1/guides/result-codes) (kimlik doğrulama, yetki, istek header'ları, günlük limit) burada tekrarlanmaz.

| Kod    | HTTP | Anlamı                                                                                                                                                       |
| ------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `0002` | 400  | İstek gövdesi okunamadı (bozuk JSON, alan tipi uyumsuz)                                                                                                      |
| `0003` | 400  | Alan azami uzunluğu aşıyor (mesajda alan adı ve sınır yazar)                                                                                                 |
| `0580` | 400  | Metinle verilen değer (kod ya da ad) birden fazla kayıtla eşleşiyor; hangisi olduğunu ayırt edecek bilgiyi ekleyin (ör. ilçe için `City`, il için `Country`) |
| `3001` | 400  | `InvoiceNumber` zorunlu                                                                                                                                      |
| `3002` | 400  | Fatura numarası şirkette bu fatura tipi için kullanılıyor                                                                                                    |
| `3003` | 400  | `InvoiceNumber` güncellemede `Next` olamaz                                                                                                                   |
| `3004` | 400  | `Date` zorunlu                                                                                                                                               |
| `3005` | 400  | `CustomerCode` zorunlu                                                                                                                                       |
| `3006` | 400  | Cari bulunamadı ya da kullanıcıya görünmüyor                                                                                                                 |
| `3009` | 400  | `SharingCode` kullanıcının paylaşım kodlarından biri değil                                                                                                   |
| `3010` | 400  | En az bir satır gerekli                                                                                                                                      |
| `3011` | 400  | `DueDays` 0'dan küçük olamaz                                                                                                                                 |
| `3013` | 400  | `ShipmentDefinitionCode` şirkette bulunamadı                                                                                                                 |
| `3017` | 400  | Fatura GİB'e gönderilmiş (`EFaturaId` dolu), güncellenemez                                                                                                   |
| `3018` | 400  | `InvoiceTypeCode`, `ProfileId` için izin verilen değerlerden biri değil                                                                                      |
| `3019` | 400  | İade faturasında `InvoiceTypeCode` yalnızca `IADE` olabilir                                                                                                  |
| `3020` | 400  | Bir satırda `VatExemptionCode` verildiyse `InvoiceTypeCode` `ISTISNA`, `IHRACKAYITLI` ya da `SGK` olmalı                                                     |
| `3021` | 400  | Şirket e-Fatura kullanıyorsa `ProfileId` zorunlu                                                                                                             |
| `3022` | 400  | Şirket e-Fatura kullanıyorsa `InvoiceTypeCode` zorunlu                                                                                                       |
| `3023` | 400  | Şirket e-Fatura kullanıyorsa (satış/alış iade faturasında) carinin vergi no, fatura ünvanı ve vergi dairesi dolu olmalı                                      |
| `3080` | 400  | Şirkette bu fatura tipi/EInvoiceType kombinasyonu için seri tanımı yok (ya da varsayılan e-fatura numaralandırma tanımı yok)                                 |
| `3081` | 400  | Serinin hiç parçası yok                                                                                                                                      |
| `3082` | 400  | Seride API'nin üretemediği bir parça tipi var                                                                                                                |
| `3083` | 400  | Üretilen numara serinin maksimum uzunluğunu aşıyor                                                                                                           |
| `3084` | 400  | Üretilen numara şirkette zaten kullanılıyor                                                                                                                  |
| `3085` | 400  | Birkaç denemeden sonra kullanılmayan bir numara üretilemedi                                                                                                  |
| `3101` | 400  | `ProductCode` zorunlu                                                                                                                                        |
| `3102` | 400  | Ürün şirkette bulunamadı                                                                                                                                     |
| `3103` | 400  | `UnitCode` zorunlu                                                                                                                                           |
| `3104` | 400  | `UnitCode` ürünün kendi birimlerinden (Unit1/Unit2/Unit3) biri değil                                                                                         |
| `3105` | 400  | `Quantity` 0'dan büyük olmalı                                                                                                                                |
| `3106` | 400  | `UnitPrice` negatif olamaz                                                                                                                                   |
| `3107` | 400  | `DiscountRate` 0-100 arasında olmalı                                                                                                                         |
| `3108` | 400  | `VatRate` 0-100 arasında olmalı                                                                                                                              |
| `3109` | 400  | Satır grubu şirkette bulunamadı                                                                                                                              |
| `3110` | 400  | `WarehouseName` şirkette bulunamadı                                                                                                                          |
| `3111` | 400  | Ürünün bu birim için çevrim miktarı tanımlı değil, ana birim miktarı hesaplanamıyor                                                                          |
| `3112` | 400  | `WarehouseName` zorunlu                                                                                                                                      |
| `3113` | 400  | Fatura satırı, bağlı olduğu sipariş satırının miktarını aşıyor                                                                                               |
| `3114` | 400  | Fatura satırı, bağlı olduğu irsaliye satırının miktarını aşıyor                                                                                              |
| `3115` | 400  | Lot/seri no girdilerinin toplamı satırın `Quantity`'siyle eşleşmiyor                                                                                         |
| `3116` | 400  | Ürünün stok tipine göre gerekli `Lots`/`SerialNumbers` gönderilmedi                                                                                          |
| `3117` | 400  | `VatRate` 0 geldi ama `VatExemptionCode` boş (yalnızca satış ve alış iade faturasında)                                                                       |
| `3118` | 400  | `CurrencyCode` zorunlu                                                                                                                                       |
| `3119` | 400  | Satırın dövizi şirkette bulunamadı                                                                                                                           |
| `3120` | 400  | `ExchangeRate` geçersiz: varsayılan dövizde `1` olmalı, değilse zorunlu ve 0'dan büyük olmalı                                                                |
| `3201` | 400  | İndirimin `Rate`'i 0-100 arasında olmalı                                                                                                                     |
| `3301` | 400  | `LotNo` zorunlu                                                                                                                                              |
| `3302` | 400  | `LotNo` şirkette zaten kullanılıyor                                                                                                                          |
| `3303` | 400  | Lot bulunamadı                                                                                                                                               |
| `3305` | 400  | Bu ürün ve depo için yeterli Lot stoğu yok                                                                                                                   |
| `3401` | 400  | `SerialNumbers` boş bir değer içeriyor                                                                                                                       |
| `3402` | 400  | Seri no zaten kayıtlı ve henüz sevk edilmemiş                                                                                                                |
| `3403` | 400  | Seri no bulunamadı                                                                                                                                           |


## OpenAPI

````yaml api-reference/openapi.tr.json POST /api/v1/purchase-return-invoices
openapi: 3.1.1
info:
  title: Noyax API
  description: Server-to-server API for integrations to access Noyax data.
  version: '1.0'
servers:
  - url: https://dev.noyax.com/services/noyax_api
security:
  - Bearer: []
tags:
  - name: Product Stock Status
  - name: Sections
  - name: Warehouses
  - name: Quotes
  - name: Product Critical Stock
  - name: Product groups
  - name: Product Parameter Definitions
  - name: Product Parameters
  - name: Product Prices
  - name: Products
  - name: Orders
  - name: Purchase Invoices
  - name: Purchase Return Invoices
  - name: Sales Invoices
  - name: Sales Return Invoices
  - name: Bank Accounts
  - name: Bank Internal Transfers
  - name: Bank Openings
  - name: Banks
  - name: Bank Transfers
  - name: Credit Card Collections
  - name: Customer Balances
  - name: Customer Transactions
  - name: Repayment Plans
  - name: Despatches
  - name: Cities
  - name: Countries
  - name: Currencies
  - name: Districts
  - name: Line Groups
  - name: Shipment Definitions
  - name: Units
  - name: VAT rates
  - name: Customer Addresses
  - name: Customer Bank Accounts
  - name: Customer Definitions
  - name: Customer Group Members
  - name: Customer Links
  - name: Customer Parameters
  - name: Customer Representatives
  - name: Customers
  - name: Customer Telephones
paths:
  /api/v1/purchase-return-invoices:
    post:
      tags:
        - Purchase Return Invoices
      summary: Alış iade faturası oluştur
      description: >-
        Fatura, satırları, satırların indirimleri ve depo hareketi olan
        satırların Lot/seri no girdileri tek bir transaction'da yazılır. API,
        tevkif edilen KDV tutarı hariç tutarları hesaplamaz ya da çapraz kontrol
        etmez: satır tutarlarını ve fatura toplamlarını kendi sisteminizin
        hesapladığı gibi gönderin. Her satırın ürünün ana birimindeki miktarı
        API tarafından hesaplanır. Adres, unvan, vergi numarası ve vergi dairesi
        cariden kopyalanır, istekte kabul edilmez. Fatura her zaman bir cari
        hareket kaydı oluşturur. Bu fatura tipinin düz bir seri numarası yoktur:
        InvoiceNumber'ı EInvoiceType 1 (e-Fatura) ya da 2 (e-Arşiv) ile "Next"
        olarak göndererek e-fatura numaralandırmasından üretin, ya da elle bir
        numara gönderin.
      parameters:
        - name: X-UserID
          in: header
          description: >-
            İsteğin adına yapıldığı Noyax kullanıcısının ID'si. Oluşturulan,
            güncellenen ve silinen kayıtların denetim alanlarına yazılır.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-CompanyID
          in: header
          description: >-
            Şirketin ID'si. Kullanıcı bu şirkete tanımlı olmalıdır. Bütün okuma
            ve yazma işlemleri bu şirketle sınırlıdır.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-PeriodID
          in: header
          description: >-
            Muhasebe döneminin ID'si. Cari endpoint'lerinde isteğe bağlıdır;
            gönderilirse oluşturulan kayıtlara yazılır.
          schema:
            minimum: 1
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/InvoiceRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/InvoiceRequestDto'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResultOfInvoiceDetailDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '3010'
                Message: At least one line is required.
                Errors:
                  - Code: '3010'
                    Message: At least one line is required.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0102'
                Message: Token has expired. Obtain a new token using the refresh token.
                Errors:
                  - Code: '0102'
                    Message: >-
                      Token has expired. Obtain a new token using the refresh
                      token.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0110'
                Message: You do not have permission for this operation.
                Errors:
                  - Code: '0110'
                    Message: You do not have permission for this operation.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0120'
                Message: Daily request limit (10000) exceeded.
                Errors:
                  - Code: '0120'
                    Message: Daily request limit (10000) exceeded.
components:
  schemas:
    InvoiceRequestDto:
      type: object
      properties:
        InvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Fatura numarası, şirkette bu fatura tipi için benzersizdir.
            Oluştururken "Next" gönderirseniz ilgili numara serisinden ya da
            uygun olduğunda e-fatura numaralandırmasından otomatik üretilir. En
            fazla 20 karakter.
          example: 9446A4D834
        DocumentNumber:
          type:
            - 'null'
            - string
          description: Belge numarası (serbest metin). En fazla 100 karakter.
        Date:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Fatura tarihi. Tarih kısmı fatura tarihi olarak kaydedilir;
            saat gönderilirse fatura saati olarak, gönderilmezse o anki saat
            kullanılır.
          format: date-time
          example: '2026-09-21T10:30:00'
        Description:
          type:
            - 'null'
            - string
          description: Açıklama. En fazla 1000 karakter.
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Cari kodu (GET /api/v1/customers'tan carinin
            CustomerCode'u). Faturanın adres, unvan ve vergi alanları
            kaydedildiği anda cariden kopyalanır, istekte kabul edilmez.
          example: C-0001
        DueDays:
          type: integer
          description: Gün olarak vade. 0'dan küçük olamaz.
          format: int32
        SharingCode:
          type:
            - 'null'
            - string
          description: >-
            Faturayı kimlerin görebileceğini sınırlayan paylaşım kodu. Boşsa
            herkes görebilir; doluysa kullanıcının paylaşım kodlarından biri
            olmalıdır.
        ShipmentDefinitionCode:
          type:
            - 'null'
            - string
          description: >-
            GET /api/v1/definitions/shipment-definitions'tan sevkiyat tanımı
            kodu.
        DiscountTotal:
          type: number
          description: >-
            Toplam indirim tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        SubTotal:
          type: number
          description: >-
            Ara toplam (satır tutarlarının vergisiz toplamı). Entegratör
            tarafından gönderilir, API hesaplamaz.
          format: double
        VatTotal:
          type: number
          description: Toplam KDV tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        GrandTotal:
          type: number
          description: Genel toplam. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        Consolidated:
          type: boolean
          description: >-
            Faturanın birden fazla irsaliyeyi/siparişi birleştirip
            birleştirmediği. Serbest biçimli bir bayraktır, API tarafından
            doğrulanmaz.
        PrintDescription:
          type: boolean
          description: Açıklamanın fatura belgesinde yazdırılıp yazdırılmayacağı.
        Cancelled:
          type: boolean
          description: Faturanın iptal edilip edilmediği.
        AverageExchangeRate:
          type: number
          description: >-
            Satırların ağırlıklı ortalama kuru. Entegratör tarafından
            gönderilir, API hesaplamaz. Her şey şirketin varsayılan dövizindeyse
            1 kullanın.
          format: double
          example: 1
        ApplyWithholding:
          type: boolean
          description: Bu faturaya tevkifat uygulanıp uygulanmadığı.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Tevkifat kodu. En fazla 10 karakter.
        WithholdingNumerator:
          type: integer
          description: Tevkifat oranının payı (ör. 9/10'daki 9).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Tevkifat oranının paydası (ör. 9/10'daki 10).
          format: int32
        WithholdingTotal:
          type: number
          description: >-
            Toplam tevkif edilen KDV tutarı. Satırların tevkif edilen
            KDV'lerinin toplamı olarak API tarafından hesaplanır.
          format: double
        AdditionalTaxTotal:
          type: number
          description: >-
            Toplam ek vergi tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        ProfileId:
          type:
            - 'null'
            - string
          description: >-
            E-belgenin UBL profil ID'si (ör. "TEMELFATURA", "TICARIFATURA").
            Şirket e-Fatura kullanıyorsa zorunludur. ProfileId ve
            InvoiceTypeCode ikisi birlikte gönderildiğinde, InvoiceTypeCode bu
            ProfileId için izin verilen değerlerden biri olmalıdır.
        InvoiceTypeCode:
          type:
            - 'null'
            - string
          description: >-
            E-belgenin UBL fatura tipi kodu (ör. "SATIS", "IADE"). Şirket
            e-Fatura kullanıyorsa zorunludur.
        WithholdingTaxRate:
          type: number
          description: >-
            Stopaj oranı, serbest meslek/müstahsil tarzı faturalarda kullanılır.
            Gönderildiği gibi kaydedilir.
          format: double
        SocialSecurityRate:
          type: number
          description: >-
            Bağ-Kur oranı, serbest meslek/müstahsil tarzı faturalarda
            kullanılır. Gönderildiği gibi kaydedilir.
          format: double
        MarketRate:
          type: number
          description: >-
            Borsa oranı, müstahsil tarzı faturalarda kullanılır. Gönderildiği
            gibi kaydedilir.
          format: double
        ReturnedInvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Bu faturanın malını iade ettiği faturanın numarası (Alış/Satış
            İade). Serbest metindir, var olan bir faturaya karşı doğrulanmaz.
        ReturnedInvoiceDate:
          type:
            - 'null'
            - string
          description: Bu faturanın malını iade ettiği faturanın tarihi.
          format: date-time
        OrderReferenceNumber:
          type:
            - 'null'
            - string
          description: Referans sipariş numarası (serbest metin, yalnızca bilgi amaçlı).
        OrderReferenceDate:
          type:
            - 'null'
            - string
          description: Referans siparişin tarihi.
          format: date-time
        BranchNumber:
          type:
            - 'null'
            - string
          description: Şube numarası (bilgi amaçlı).
        BranchTitle:
          type:
            - 'null'
            - string
          description: Şube unvanı (bilgi amaçlı).
        BranchAddress:
          type:
            - 'null'
            - string
          description: Şube adresi (bilgi amaçlı).
        InvestmentIncentiveDocumentNumber:
          type:
            - 'null'
            - string
          description: Yatırım teşvik belgesi numarası.
        InvestmentIncentiveDocumentDate:
          type:
            - 'null'
            - string
          description: Yatırım teşvik belgesi tarihi.
          format: date-time
        EnergyPeriodStart:
          type:
            - 'null'
            - string
          description: >-
            Enerji dönemi başlangıç tarihi/saati, enerji sektörü faturaları
            için.
          format: date-time
        EnergyPeriodEnd:
          type:
            - 'null'
            - string
          description: Enerji dönemi bitiş tarihi/saati, enerji sektörü faturaları için.
          format: date-time
        DeliveryInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceDeliveryInfoDto'
        PaymentMeans:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePaymentMeansDto'
          description: >-
            Ödeme yöntemleri. Gönderildiği gibi kaydedilir ve döndürülür,
            doğrulanmaz.
        ReferencedDespatches:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDespatchReferenceDto'
          description: >-
            Referans irsaliyeler. Gönderildiği gibi kaydedilir ve döndürülür,
            doğrulanmaz.
        CustomerIdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePartyIdentificationDto'
          description: >-
            Cari kimlik şemaları. Gönderildiği gibi kaydedilir ve döndürülür,
            doğrulanmaz.
        PublicSectorSpendingUnit:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceKamuHarcamaBirimiDto'
        SgkInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceSgkInfoDto'
        Lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineRequestDto'
          description: >-
            Zorunlu, en az bir satır. Güncellemede, satırların gönderildiği sıra
            kimliklerini belirler, irsaliyedeki gibi: mevcut bir satırla aynı
            pozisyondaki satır o satırla aynı kabul edilir (ürettiği depo
            hareketi, Lot/seri no ve sipariş/irsaliye bağlantısı kayıtları
            onunla birlikte taşınır).
    DataResultOfInvoiceDetailDto:
      required:
        - Success
        - ResultCode
        - Data
      type: object
      properties:
        Success:
          type: boolean
          description: İşlemin başarılı olup olmadığı.
          example: true
        ResultCode:
          type: string
          description: >-
            Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors
            içinde listelenir.
          example: '0000'
        Message:
          type:
            - 'null'
            - string
          description: >-
            Success false olduğunda hata mesajı. Bütün hataların mesajları tek
            metinde birleştirilir.
        Data:
          $ref: '#/components/schemas/InvoiceDetailDto'
    ErrorResult:
      type: object
      properties:
        Success:
          type: boolean
          description: İşlemin başarılı olup olmadığı.
          example: false
        ResultCode:
          type:
            - 'null'
            - string
          description: >-
            Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors
            içinde listelenir.
        Message:
          type:
            - 'null'
            - string
          description: >-
            Success false olduğunda hata mesajı. Bütün hataların mesajları tek
            metinde birleştirilir.
        Errors:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ResultError'
          description: >-
            Kodlarıyla birlikte bütün hatalar. Yalnızca Success false olduğunda
            bulunur.
    InvoiceDeliveryInfoDto:
      type: object
      properties:
        DeliveryTerm:
          type:
            - 'null'
            - string
          description: Teslim şekli kodu.
        TransportModeCode:
          type:
            - 'null'
            - integer
          description: 'Taşıma modu kodu: 1 denizyolu, 2 demiryolu, 3 karayolu, 4 havayolu.'
          format: int32
        Country:
          type:
            - 'null'
            - string
          description: Teslimat ülkesi.
        CityName:
          type:
            - 'null'
            - string
          description: Teslimat ili.
        CitySubdivisionName:
          type:
            - 'null'
            - string
          description: Teslimat ilçesi.
        StreetName:
          type:
            - 'null'
            - string
          description: Teslimat sokak adı.
        BuildingName:
          type:
            - 'null'
            - string
          description: Teslimat bina adı.
        BuildingNumber:
          type:
            - 'null'
            - string
          description: Teslimat bina numarası.
        PostalZone:
          type:
            - 'null'
            - string
          description: Teslimat posta kodu.
        TransportMeans:
          type:
            - 'null'
            - string
          description: >-
            Taşıma aracı kimliği (TransportModeCode'a göre gemi adı, tren
            numarası, plaka ya da uçak numarası).
        DeclaredForCarriageValueAmount:
          type:
            - 'null'
            - number
          description: Beyan edilen taşıma değeri.
          format: double
        DeliveryInsuranceValue:
          type:
            - 'null'
            - number
          description: Teslimat sigorta değeri.
          format: double
      description: Export delivery information. Stored and returned as sent, not validated.
    InvoicePaymentMeansDto:
      type: object
      properties:
        PaymentMeansCode:
          type:
            - 'null'
            - string
          description: Ödeme şekli kodu (UN/EDIFACT 4461, ör. "1" nakit, "42" havale).
        PayeeFinancialAccountID:
          type:
            - 'null'
            - string
          description: IBAN ya da hesap numarası.
        CurrencyCode:
          type:
            - 'null'
            - string
          description: Hesabın döviz kodu.
    InvoiceDespatchReferenceDto:
      type: object
      properties:
        ID:
          type:
            - 'null'
            - string
          description: İrsaliye numarası.
        IssueDate:
          type:
            - 'null'
            - string
          description: İrsaliye düzenleme tarihi.
          format: date-time
    InvoicePartyIdentificationDto:
      type: object
      properties:
        SchemeID:
          type:
            - 'null'
            - string
          description: >-
            Şema ID'si (ör. "MUSTERINO", "BAYINO", "TICARETSICILNO", "MERSISNO",
            "HIZMETNO", "TESISATNO").
        Value:
          type:
            - 'null'
            - string
          description: Bu şemanın değeri.
    InvoiceKamuHarcamaBirimiDto:
      type: object
      properties:
        BCP_Name:
          type:
            - 'null'
            - string
          description: Harcama biriminin adı.
        BCP_VKN:
          type:
            - 'null'
            - string
          description: Harcama biriminin vergi numarası.
        BCP_Country:
          type:
            - 'null'
            - string
          description: Harcama biriminin ülkesi.
        BCP_CityName:
          type:
            - 'null'
            - string
          description: Harcama biriminin ili.
        BCP_CitySubdivisionName:
          type:
            - 'null'
            - string
          description: Harcama biriminin ilçesi.
      description: >-
        Public sector (Kamu) payer spending unit. Stored and returned as sent,
        not validated.
    InvoiceSgkInfoDto:
      type: object
      properties:
        StartDate:
          type:
            - 'null'
            - string
          description: Dönem başlangıç tarihi.
          format: date-time
        EndDate:
          type:
            - 'null'
            - string
          description: Dönem bitiş tarihi.
          format: date-time
        MukellefKodu:
          type:
            - 'null'
            - string
          description: Mükellef kodu.
        MukellefAdi:
          type:
            - 'null'
            - string
          description: Mükellef adı.
        DosyaNo:
          type:
            - 'null'
            - string
          description: Dosya numarası.
        FaturaAltTipi:
          type:
            - 'null'
            - string
          description: Fatura alt tipi.
      description: >-
        SGK (social security) invoice information. Stored and returned as sent,
        not validated.
    InvoiceLineRequestDto:
      type: object
      properties:
        ProductCode:
          type:
            - 'null'
            - string
          description: Zorunlu. Ürün kodu (GET /api/v1/products'taki ürünün Code değeri).
          example: URN-0001
        UnitCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Birim kodu: birimin evrensel kodu (ör. ADET için C62) ya da
            evrensel kodu yoksa adı. Ürünün kendi birimlerinden biri olmalıdır.
            Ürünün ana birimindeki miktar API tarafından hesaplanır.
          example: C62
        Quantity:
          type: number
          description: Satırın birimi cinsinden miktar. 0'dan büyük olmalı.
          format: double
          example: 10
        UnitPrice:
          type: number
          description: >-
            Satır dövizinde birim fiyat. VatIncluded true ise fiyat KDV
            dahildir. Negatif olamaz.
          format: double
          example: 100
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. GET /api/v1/definitions/currencies'ten bu satırın döviz
            kodu. Faturanın kendi dövizi satırlardan türetilir: tüm satırlar
            aynı dövizi kullanıyorsa o döviz, aksi halde şirketin varsayılan
            dövizi.
          example: TRY
        ExchangeRate:
          type: number
          description: >-
            CurrencyCode'un şirketin varsayılan dövizine karşı kuru.
            CurrencyCode varsayılan dövizse 1 olmalı; değilse zorunlu ve 0'dan
            büyük olmalı. Entegratörden gelir, API tarafından hesaplanmaz.
          format: double
          example: 1
        DiscountRate:
          type: number
          description: >-
            Discounts'tan doğan kümülatif satır indirim oranı (%), 0 ile 100
            arasında. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        DiscountAmount:
          type: number
          description: >-
            Satır indirim tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        Discounts:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDiscountDto'
          description: >-
            Satıra art arda uygulanan indirimler. Satırda indirim yoksa boş
            bırakın.
        VatRate:
          type: integer
          description: KDV oranı (%), 0 ile 100 arasında.
          format: int32
          example: 20
        VatIncluded:
          type: boolean
          description: UnitPrice'ın KDV dahil olup olmadığı.
        VatAmount:
          type: number
          description: >-
            Satırın KDV tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AmountExcludingTax:
          type: number
          description: >-
            Satırın vergisiz tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AmountIncludingTax:
          type: number
          description: >-
            Satırın vergili tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        VatBase:
          type: number
          description: >-
            Satırın KDV matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        VatExemptionCode:
          type:
            - 'null'
            - string
          description: KDV muafiyet kodu. En fazla 10 karakter.
        LineGroupName:
          type:
            - 'null'
            - string
          description: GET /api/v1/definitions/line-groups'tan satır grubu adı.
        WarehouseName:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. GET /api/v1/stock/warehouses'tan bir depo adı.
            Gönderilmesi, API'nin bu satır için bir stok hareketi kaydetmesini
            sağlar (faturanın arkasında otomatik bir depo fişi üretilir).
          example: Main Warehouse
        Description:
          type:
            - 'null'
            - string
          description: Satır açıklaması. En fazla 255 karakter.
        Description2:
          type:
            - 'null'
            - string
          description: İkinci satır açıklaması. En fazla 255 karakter.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Tevkifat kodu. En fazla 10 karakter.
        WithholdingNumerator:
          type: integer
          description: Tevkifat oranının payı (ör. 9/10'daki 9).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Tevkifat oranının paydası (ör. 9/10'daki 10).
          format: int32
        WithheldVatAmount:
          type: number
          description: >-
            Tevkif edilen KDV tutarı. API tarafından VatAmount *
            WithholdingNumerator / WithholdingDenominator olarak hesaplanır.
          format: double
        AdditionalTaxCode1:
          type:
            - 'null'
            - string
          description: Ek vergi 1 kodu. En fazla 15 karakter.
        AdditionalTaxRate1:
          type: number
          description: Ek vergi 1 oranı (%).
          format: double
        AdditionalTaxAmount1:
          type: number
          description: Ek vergi 1 tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        AdditionalTaxBase1:
          type: number
          description: >-
            Ek vergi 1 matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AdditionalTaxCode2:
          type:
            - 'null'
            - string
          description: Ek vergi 2 kodu. En fazla 15 karakter.
        AdditionalTaxRate2:
          type: number
          description: Ek vergi 2 oranı (%).
          format: double
        AdditionalTaxAmount2:
          type: number
          description: Ek vergi 2 tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        AdditionalTaxBase2:
          type: number
          description: >-
            Ek vergi 2 matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AdditionalTaxCode3:
          type:
            - 'null'
            - string
          description: Ek vergi 3 kodu. En fazla 15 karakter.
        AdditionalTaxRate3:
          type: number
          description: Ek vergi 3 oranı (%).
          format: double
        AdditionalTaxAmount3:
          type: number
          description: Ek vergi 3 tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        AdditionalTaxBase3:
          type: number
          description: >-
            Ek vergi 3 matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        Lots:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineLotDto'
          description: >-
            Lot izlenen bir ürün için Lot girdileri (ürünün StockType'ı 3, 4, 6
            ya da 7). Yalnızca WarehouseName gönderildiğinde kullanılır.
            StockType 3 ise zorunludur; StockType 4, 6 ya da 7 ise giriş
            hareketinde (alış/satış iade faturası) zorunludur, bu tiplerin çıkış
            hareketinde boş bırakılır (API lotları otomatik seçer). StockType 1,
            2 ya da 5 ise boş bırakılır. Miktarların toplamı (ürünün ana
            birimine çevrilmiş) satırın ana birim miktarına eşit olmalıdır.
        SerialNumbers:
          type: array
          items:
            type: string
          description: >-
            Seri izlenen bir ürün için seri no'lar (StockType 5), her birim için
            bir tane. Yalnızca WarehouseName gönderildiğinde kullanılır. Sayısı
            Quantity'ye eşit olmalıdır.
        ExportInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceLineExportInfoDto'
        MedicineDeviceInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceMedicineDeviceInfoDto'
        HalInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceHalInfoDto'
        ProductInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceLineProductInfoDto'
    InvoiceDetailDto:
      type: object
      properties:
        Id:
          type: string
          description: Fatura ID'si.
          format: uuid
        CustomerId:
          type:
            - 'null'
            - string
          format: uuid
        CurrencyId:
          type:
            - 'null'
            - string
          format: uuid
        CustomerName:
          type:
            - 'null'
            - string
          description: Cari adı.
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Fatura dövizi, satırlardan türetilir: tüm satırlar aynı dövizi
            kullanıyorsa o döviz, aksi halde şirketin varsayılan dövizi. İstekte
            kabul edilmez.
          example: TRY
        ShipmentDefinitionId:
          type:
            - 'null'
            - string
          description: Sevkiyat tanımı ID'si.
          format: uuid
        Address:
          type:
            - 'null'
            - string
          description: >-
            Faturanın kaydedildiği anda carinin tam adresi (anlık görüntü;
            istekten alınmaz).
        CustomerTitle:
          type:
            - 'null'
            - string
          description: Faturanın kaydedildiği anda carinin fatura unvanı (anlık görüntü).
        TaxNumber:
          type:
            - 'null'
            - string
          description: Faturanın kaydedildiği anda carinin vergi numarası (anlık görüntü).
        TaxOffice:
          type:
            - 'null'
            - string
          description: Faturanın kaydedildiği anda carinin vergi dairesi (anlık görüntü).
        EInvoiceType:
          type: integer
          description: >-
            Bu fatura kaydının e-fatura sınıflandırması: 0 e-belge değil, 2
            e-Arşiv. Şirketin e-Fatura kullanıp kullanmadığına göre API
            tarafından belirlenir (kullanmıyorsa 0; kullanıyorsa satış ya da
            alış iade faturasında 2); istekte kabul edilmez.
          format: int32
          example: 2
        InvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Fatura numarası, şirkette bu fatura tipi için benzersizdir.
            Oluştururken "Next" gönderirseniz ilgili numara serisinden ya da
            uygun olduğunda e-fatura numaralandırmasından otomatik üretilir. En
            fazla 20 karakter.
          example: 9446A4D834
        DocumentNumber:
          type:
            - 'null'
            - string
          description: Belge numarası (serbest metin). En fazla 100 karakter.
        Date:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Fatura tarihi. Tarih kısmı fatura tarihi olarak kaydedilir;
            saat gönderilirse fatura saati olarak, gönderilmezse o anki saat
            kullanılır.
          format: date-time
          example: '2026-09-21T10:30:00'
        Description:
          type:
            - 'null'
            - string
          description: Açıklama. En fazla 1000 karakter.
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Cari kodu (GET /api/v1/customers'tan carinin
            CustomerCode'u). Faturanın adres, unvan ve vergi alanları
            kaydedildiği anda cariden kopyalanır, istekte kabul edilmez.
          example: C-0001
        DueDays:
          type: integer
          description: Gün olarak vade. 0'dan küçük olamaz.
          format: int32
        SharingCode:
          type:
            - 'null'
            - string
          description: >-
            Faturayı kimlerin görebileceğini sınırlayan paylaşım kodu. Boşsa
            herkes görebilir; doluysa kullanıcının paylaşım kodlarından biri
            olmalıdır.
        ShipmentDefinitionCode:
          type:
            - 'null'
            - string
          description: >-
            GET /api/v1/definitions/shipment-definitions'tan sevkiyat tanımı
            kodu.
        DiscountTotal:
          type: number
          description: >-
            Toplam indirim tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        SubTotal:
          type: number
          description: >-
            Ara toplam (satır tutarlarının vergisiz toplamı). Entegratör
            tarafından gönderilir, API hesaplamaz.
          format: double
        VatTotal:
          type: number
          description: Toplam KDV tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        GrandTotal:
          type: number
          description: Genel toplam. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        Consolidated:
          type: boolean
          description: >-
            Faturanın birden fazla irsaliyeyi/siparişi birleştirip
            birleştirmediği. Serbest biçimli bir bayraktır, API tarafından
            doğrulanmaz.
        PrintDescription:
          type: boolean
          description: Açıklamanın fatura belgesinde yazdırılıp yazdırılmayacağı.
        Cancelled:
          type: boolean
          description: Faturanın iptal edilip edilmediği.
        AverageExchangeRate:
          type: number
          description: >-
            Satırların ağırlıklı ortalama kuru. Entegratör tarafından
            gönderilir, API hesaplamaz. Her şey şirketin varsayılan dövizindeyse
            1 kullanın.
          format: double
          example: 1
        ApplyWithholding:
          type: boolean
          description: Bu faturaya tevkifat uygulanıp uygulanmadığı.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Tevkifat kodu. En fazla 10 karakter.
        WithholdingNumerator:
          type: integer
          description: Tevkifat oranının payı (ör. 9/10'daki 9).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Tevkifat oranının paydası (ör. 9/10'daki 10).
          format: int32
        WithholdingTotal:
          type: number
          description: >-
            Toplam tevkif edilen KDV tutarı. Satırların tevkif edilen
            KDV'lerinin toplamı olarak API tarafından hesaplanır.
          format: double
        AdditionalTaxTotal:
          type: number
          description: >-
            Toplam ek vergi tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        ProfileId:
          type:
            - 'null'
            - string
          description: >-
            E-belgenin UBL profil ID'si (ör. "TEMELFATURA", "TICARIFATURA").
            Şirket e-Fatura kullanıyorsa zorunludur. ProfileId ve
            InvoiceTypeCode ikisi birlikte gönderildiğinde, InvoiceTypeCode bu
            ProfileId için izin verilen değerlerden biri olmalıdır.
        InvoiceTypeCode:
          type:
            - 'null'
            - string
          description: >-
            E-belgenin UBL fatura tipi kodu (ör. "SATIS", "IADE"). Şirket
            e-Fatura kullanıyorsa zorunludur.
        WithholdingTaxRate:
          type: number
          description: >-
            Stopaj oranı, serbest meslek/müstahsil tarzı faturalarda kullanılır.
            Gönderildiği gibi kaydedilir.
          format: double
        SocialSecurityRate:
          type: number
          description: >-
            Bağ-Kur oranı, serbest meslek/müstahsil tarzı faturalarda
            kullanılır. Gönderildiği gibi kaydedilir.
          format: double
        MarketRate:
          type: number
          description: >-
            Borsa oranı, müstahsil tarzı faturalarda kullanılır. Gönderildiği
            gibi kaydedilir.
          format: double
        ReturnedInvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Bu faturanın malını iade ettiği faturanın numarası (Alış/Satış
            İade). Serbest metindir, var olan bir faturaya karşı doğrulanmaz.
        ReturnedInvoiceDate:
          type:
            - 'null'
            - string
          description: Bu faturanın malını iade ettiği faturanın tarihi.
          format: date-time
        OrderReferenceNumber:
          type:
            - 'null'
            - string
          description: Referans sipariş numarası (serbest metin, yalnızca bilgi amaçlı).
        OrderReferenceDate:
          type:
            - 'null'
            - string
          description: Referans siparişin tarihi.
          format: date-time
        BranchNumber:
          type:
            - 'null'
            - string
          description: Şube numarası (bilgi amaçlı).
        BranchTitle:
          type:
            - 'null'
            - string
          description: Şube unvanı (bilgi amaçlı).
        BranchAddress:
          type:
            - 'null'
            - string
          description: Şube adresi (bilgi amaçlı).
        InvestmentIncentiveDocumentNumber:
          type:
            - 'null'
            - string
          description: Yatırım teşvik belgesi numarası.
        InvestmentIncentiveDocumentDate:
          type:
            - 'null'
            - string
          description: Yatırım teşvik belgesi tarihi.
          format: date-time
        EnergyPeriodStart:
          type:
            - 'null'
            - string
          description: >-
            Enerji dönemi başlangıç tarihi/saati, enerji sektörü faturaları
            için.
          format: date-time
        EnergyPeriodEnd:
          type:
            - 'null'
            - string
          description: Enerji dönemi bitiş tarihi/saati, enerji sektörü faturaları için.
          format: date-time
        DeliveryInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceDeliveryInfoDto'
        PaymentMeans:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePaymentMeansDto'
          description: >-
            Ödeme yöntemleri. Gönderildiği gibi kaydedilir ve döndürülür,
            doğrulanmaz.
        ReferencedDespatches:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDespatchReferenceDto'
          description: >-
            Referans irsaliyeler. Gönderildiği gibi kaydedilir ve döndürülür,
            doğrulanmaz.
        CustomerIdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePartyIdentificationDto'
          description: >-
            Cari kimlik şemaları. Gönderildiği gibi kaydedilir ve döndürülür,
            doğrulanmaz.
        PublicSectorSpendingUnit:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceKamuHarcamaBirimiDto'
        SgkInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceSgkInfoDto'
        CreateDate:
          type:
            - 'null'
            - string
          description: Oluşturulma tarihi.
          format: date-time
        ModifyDate:
          type:
            - 'null'
            - string
          description: Son değişiklik tarihi.
          format: date-time
        Lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDto'
          description: Fatura satırları, satır sırasında.
      description: Response data. Null when Success is false.
    ResultError:
      required:
        - Code
        - Message
      type: object
      properties:
        Code:
          type: string
          description: Hata kodu. Tam liste için sonuç kodları sayfasına bakın.
        Message:
          type: string
          description: Hata açıklaması.
    InvoiceLineDiscountDto:
      type: object
      properties:
        Rate:
          type: number
          description: >-
            İndirim oranı (%), 0 ile 100 arasında. Bir satırın indirimleri liste
            sırasıyla art arda uygulanır: 10, 10 ve 10 satırda %27,1 indirim
            verir.
          format: double
          example: 10
    InvoiceLineLotDto:
      type: object
      properties:
        LotNo:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Lot numarası, her zaman entegratör tarafından verilir (API
            üretmez). Şirkette benzersizdir. Lot izlenen bir ürün için
            (StockType 3) alış iade/satış faturasında bu, hangi mevcut lottan
            düşüleceğini belirtir.
        Quantity:
          type: number
          description: >-
            Zorunlu. Miktar, Unit cinsinden. Sıfırdan büyük olmalıdır;
            giriş/çıkış işaretini API kendi içinde uygular.
          format: double
        UnitCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Quantity'nin ifade edildiği birim kodu (ürünün kendi
            birimlerinden biri).
          example: C62
        SupplierLotNo:
          type:
            - 'null'
            - string
          description: >-
            Tedarikçinin kendi lot numarası. Yalnızca bu Lot girdisi bir giriş
            hareketiyse kullanılır.
        ExpiryDate:
          type:
            - 'null'
            - string
          description: >-
            Son kullanma tarihi. Yalnızca bu Lot girdisi bir giriş hareketiyse
            kullanılır.
          format: date-time
        Description:
          type:
            - 'null'
            - string
          description: >-
            Açıklama. Yalnızca bu Lot girdisi bir giriş hareketiyse kullanılır.
            En fazla 100 karakter.
    InvoiceLineExportInfoDto:
      type: object
      properties:
        PackagingType:
          type:
            - 'null'
            - string
          description: Paketleme tipi.
        DeliveryTerm:
          type:
            - 'null'
            - string
          description: Teslim şekli kodu.
        TransportMode:
          type:
            - 'null'
            - integer
          description: 'Taşıma modu: 1 denizyolu, 2 demiryolu, 3 karayolu, 4 havayolu.'
          format: int32
        RequiredCustomsID:
          type:
            - 'null'
            - string
          description: Gerekli gümrük ID'si.
        DeliveryAddress_CityName:
          type:
            - 'null'
            - string
          description: Teslimat adresi ili.
        DeliveryAddress_CitySubdivisionName:
          type:
            - 'null'
            - string
          description: Teslimat adresi ilçesi.
        DeliveryAddress_Country:
          type:
            - 'null'
            - string
          description: Teslimat adresi ülkesi.
        DeliveryAddress_StreetName:
          type:
            - 'null'
            - string
          description: Teslimat adresi sokağı.
        DeliveryAddress_BuildingName:
          type:
            - 'null'
            - string
          description: Teslimat adresi bina adı.
        DeliveryAddress_BuildingNumber:
          type:
            - 'null'
            - string
          description: Teslimat adresi bina numarası.
        DeliveryAddress_PostalCode:
          type:
            - 'null'
            - string
          description: Teslimat adresi posta kodu.
        TransportMeansID:
          type:
            - 'null'
            - string
          description: Taşıma aracı kimliği.
        GrossWeightMeasure:
          type:
            - 'null'
            - number
          description: Brüt ağırlık.
          format: double
        NetWeightMeasure:
          type:
            - 'null'
            - number
          description: Net ağırlık.
          format: double
        PackageBrand:
          type:
            - 'null'
            - string
          description: Paket markası.
        PackageID:
          type:
            - 'null'
            - string
          description: Paket ID'si.
        PackageQuantity:
          type:
            - 'null'
            - number
          description: Paket miktarı.
          format: double
      description: >-
        Export information for this line. Stored and returned as sent, not
        validated.
    InvoiceMedicineDeviceInfoDto:
      type: object
      properties:
        Ilaclar:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/InvoiceMedicineRowDto'
          description: İlaç satırları.
        TibbiCihazlar:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/InvoiceMedicalDeviceRowDto'
          description: Tıbbi cihaz satırları.
      description: >-
        Pharmaceutical/medical device tracking information for this line. Stored
        and returned as sent, not validated.
    InvoiceHalInfoDto:
      type: object
      properties:
        KUNYENO:
          type:
            - 'null'
            - string
          description: Hal künye numarası.
        MALSAHIBIVKNTCKN:
          type:
            - 'null'
            - string
          description: Mal sahibinin vergi/kimlik numarası.
        MALSAHIBIADSOYADUNVAN:
          type:
            - 'null'
            - string
          description: Mal sahibinin ad/unvanı.
      description: >-
        Hal (wholesale produce market) information for this line. Stored and
        returned as sent, not validated.
    InvoiceLineProductInfoDto:
      type: object
      properties:
        ModelName:
          type:
            - 'null'
            - string
          description: Model adı.
        BrandName:
          type:
            - 'null'
            - string
          description: Marka adı.
        SellersItemIdentification:
          type:
            - 'null'
            - string
          description: Satıcının kendi ürün tanımlaması.
        BuyersItemIdentification:
          type:
            - 'null'
            - string
          description: Alıcının kendi ürün tanımlaması.
        ManufacturersItemIdentification:
          type:
            - 'null'
            - string
          description: Üreticinin kendi ürün tanımlaması.
        OriginCountryCode:
          type:
            - 'null'
            - string
          description: Menşei ülke kodu.
        OriginCountryName:
          type:
            - 'null'
            - string
          description: Menşei ülke adı.
        ProductTraceID:
          type:
            - 'null'
            - string
          description: Ürün takip numarası (yatırım teşvik faturaları).
        CommodityClassification:
          type:
            - 'null'
            - string
          description: Emtia sınıflandırma kodu (yatırım teşvik faturaları).
      description: >-
        Extra product information for this line. Stored and returned as sent,
        not validated.
    InvoiceLineDto:
      type: object
      properties:
        ProductId:
          type:
            - 'null'
            - string
          description: Ürün ID'si.
          format: uuid
        UnitId:
          type:
            - 'null'
            - string
          description: Birim ID'si.
          format: uuid
        CurrencyId:
          type:
            - 'null'
            - string
          description: Döviz ID'si.
          format: uuid
        LineGroupId:
          type:
            - 'null'
            - string
          description: Satır grubu ID'si.
          format: uuid
        WarehouseId:
          type:
            - 'null'
            - string
          description: Depo ID'si.
          format: uuid
        ProductName:
          type:
            - 'null'
            - string
          description: Ürün adı.
        UnitName:
          type:
            - 'null'
            - string
          description: Birim adı.
          example: ADET
        MainUnitQuantity:
          type: number
          description: >-
            Miktarın ürünün ana birimine çevrilmiş hali. Yalnızca WarehouseName
            gönderildiğinde anlamlıdır.
          format: double
        ProductCode:
          type:
            - 'null'
            - string
          description: Zorunlu. Ürün kodu (GET /api/v1/products'taki ürünün Code değeri).
          example: URN-0001
        UnitCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Birim kodu: birimin evrensel kodu (ör. ADET için C62) ya da
            evrensel kodu yoksa adı. Ürünün kendi birimlerinden biri olmalıdır.
            Ürünün ana birimindeki miktar API tarafından hesaplanır.
          example: C62
        Quantity:
          type: number
          description: Satırın birimi cinsinden miktar. 0'dan büyük olmalı.
          format: double
          example: 10
        UnitPrice:
          type: number
          description: >-
            Satır dövizinde birim fiyat. VatIncluded true ise fiyat KDV
            dahildir. Negatif olamaz.
          format: double
          example: 100
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. GET /api/v1/definitions/currencies'ten bu satırın döviz
            kodu. Faturanın kendi dövizi satırlardan türetilir: tüm satırlar
            aynı dövizi kullanıyorsa o döviz, aksi halde şirketin varsayılan
            dövizi.
          example: TRY
        ExchangeRate:
          type: number
          description: >-
            CurrencyCode'un şirketin varsayılan dövizine karşı kuru.
            CurrencyCode varsayılan dövizse 1 olmalı; değilse zorunlu ve 0'dan
            büyük olmalı. Entegratörden gelir, API tarafından hesaplanmaz.
          format: double
          example: 1
        DiscountRate:
          type: number
          description: >-
            Discounts'tan doğan kümülatif satır indirim oranı (%), 0 ile 100
            arasında. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        DiscountAmount:
          type: number
          description: >-
            Satır indirim tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        Discounts:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDiscountDto'
          description: >-
            Satıra art arda uygulanan indirimler. Satırda indirim yoksa boş
            bırakın.
        VatRate:
          type: integer
          description: KDV oranı (%), 0 ile 100 arasında.
          format: int32
          example: 20
        VatIncluded:
          type: boolean
          description: UnitPrice'ın KDV dahil olup olmadığı.
        VatAmount:
          type: number
          description: >-
            Satırın KDV tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AmountExcludingTax:
          type: number
          description: >-
            Satırın vergisiz tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AmountIncludingTax:
          type: number
          description: >-
            Satırın vergili tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        VatBase:
          type: number
          description: >-
            Satırın KDV matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        VatExemptionCode:
          type:
            - 'null'
            - string
          description: KDV muafiyet kodu. En fazla 10 karakter.
        LineGroupName:
          type:
            - 'null'
            - string
          description: GET /api/v1/definitions/line-groups'tan satır grubu adı.
        WarehouseName:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. GET /api/v1/stock/warehouses'tan bir depo adı.
            Gönderilmesi, API'nin bu satır için bir stok hareketi kaydetmesini
            sağlar (faturanın arkasında otomatik bir depo fişi üretilir).
          example: Main Warehouse
        Description:
          type:
            - 'null'
            - string
          description: Satır açıklaması. En fazla 255 karakter.
        Description2:
          type:
            - 'null'
            - string
          description: İkinci satır açıklaması. En fazla 255 karakter.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Tevkifat kodu. En fazla 10 karakter.
        WithholdingNumerator:
          type: integer
          description: Tevkifat oranının payı (ör. 9/10'daki 9).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Tevkifat oranının paydası (ör. 9/10'daki 10).
          format: int32
        WithheldVatAmount:
          type: number
          description: >-
            Tevkif edilen KDV tutarı. API tarafından VatAmount *
            WithholdingNumerator / WithholdingDenominator olarak hesaplanır.
          format: double
        AdditionalTaxCode1:
          type:
            - 'null'
            - string
          description: Ek vergi 1 kodu. En fazla 15 karakter.
        AdditionalTaxRate1:
          type: number
          description: Ek vergi 1 oranı (%).
          format: double
        AdditionalTaxAmount1:
          type: number
          description: Ek vergi 1 tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        AdditionalTaxBase1:
          type: number
          description: >-
            Ek vergi 1 matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AdditionalTaxCode2:
          type:
            - 'null'
            - string
          description: Ek vergi 2 kodu. En fazla 15 karakter.
        AdditionalTaxRate2:
          type: number
          description: Ek vergi 2 oranı (%).
          format: double
        AdditionalTaxAmount2:
          type: number
          description: Ek vergi 2 tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        AdditionalTaxBase2:
          type: number
          description: >-
            Ek vergi 2 matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        AdditionalTaxCode3:
          type:
            - 'null'
            - string
          description: Ek vergi 3 kodu. En fazla 15 karakter.
        AdditionalTaxRate3:
          type: number
          description: Ek vergi 3 oranı (%).
          format: double
        AdditionalTaxAmount3:
          type: number
          description: Ek vergi 3 tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
        AdditionalTaxBase3:
          type: number
          description: >-
            Ek vergi 3 matrahı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
        Lots:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineLotDto'
          description: >-
            Lot izlenen bir ürün için Lot girdileri (ürünün StockType'ı 3, 4, 6
            ya da 7). Yalnızca WarehouseName gönderildiğinde kullanılır.
            StockType 3 ise zorunludur; StockType 4, 6 ya da 7 ise giriş
            hareketinde (alış/satış iade faturası) zorunludur, bu tiplerin çıkış
            hareketinde boş bırakılır (API lotları otomatik seçer). StockType 1,
            2 ya da 5 ise boş bırakılır. Miktarların toplamı (ürünün ana
            birimine çevrilmiş) satırın ana birim miktarına eşit olmalıdır.
        SerialNumbers:
          type: array
          items:
            type: string
          description: >-
            Seri izlenen bir ürün için seri no'lar (StockType 5), her birim için
            bir tane. Yalnızca WarehouseName gönderildiğinde kullanılır. Sayısı
            Quantity'ye eşit olmalıdır.
        ExportInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceLineExportInfoDto'
        MedicineDeviceInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceMedicineDeviceInfoDto'
        HalInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceHalInfoDto'
        ProductInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceLineProductInfoDto'
    InvoiceMedicineRowDto:
      type: object
      properties:
        GTIN:
          type:
            - 'null'
            - string
          description: GTIN (barkod).
        SN:
          type:
            - 'null'
            - string
          description: Seri numarası.
        BN:
          type:
            - 'null'
            - string
          description: Parti/lot numarası.
        XD:
          type:
            - 'null'
            - string
          description: Son kullanma tarihi.
          format: date-time
    InvoiceMedicalDeviceRowDto:
      type: object
      properties:
        UNO:
          type:
            - 'null'
            - string
          description: UDI (benzersiz cihaz kimliği).
        LNO:
          type:
            - 'null'
            - string
          description: Lot numarası.
        SNO:
          type:
            - 'null'
            - string
          description: Seri numarası.
        URT:
          type:
            - 'null'
            - string
          description: Üretim/son kullanma ile ilgili tarih.
          format: date-time
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````