> ## 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.

# Partially update purchase return invoice

> Changes only the fields sent in the body.

In the body you send **only the fields you want to change**; fields that are not sent keep their current values. Rules and examples: [partial update](/en/v1/guides/partial-update).

* A field that is not sent does not change; a field sent as `null` is cleared.
* Validation runs on the whole merged record; if you set a required field to `null` the request is rejected.
* Lists are not merged: when `Lines` is sent it replaces **all** the invoice's lines, with the same [line-identity rule](/en/v1/purchase-invoices/overview#line-identity-on-update) as a full update; when it is not sent the lines stay as they are.
* The API does not recalculate totals: if you change lines or amounts, send the related totals too.

## Error codes

Codes this endpoint can return. The [general errors](/en/v1/guides/result-codes) that apply to every endpoint (authentication, permissions, request headers, daily limit) are not repeated here.

| Code   | HTTP | Meaning                                                                                                                                                               |
| ------ | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0002` | 400  | Request body could not be read (malformed JSON, wrong field type)                                                                                                     |
| `0003` | 400  | A field exceeds its maximum length (the message names the field and the limit)                                                                                        |
| `0580` | 400  | A value given as text (a code or a name) matches more than one record; add the detail that tells them apart (for example `City` for a district, `Country` for a city) |
| `3000` | 404  | Invoice not found                                                                                                                                                     |
| `3001` | 400  | `InvoiceNumber` is required                                                                                                                                           |
| `3002` | 400  | The invoice number is already used in the company for this invoice type                                                                                               |
| `3003` | 400  | `InvoiceNumber` cannot be `Next` on update                                                                                                                            |
| `3004` | 400  | `Date` is required                                                                                                                                                    |
| `3005` | 400  | `CustomerCode` is required                                                                                                                                            |
| `3006` | 400  | Customer not found or not visible to the user                                                                                                                         |
| `3009` | 400  | `SharingCode` is not one of the user's sharing codes                                                                                                                  |
| `3010` | 400  | At least one line is required                                                                                                                                         |
| `3011` | 400  | `DueDays` cannot be less than 0                                                                                                                                       |
| `3013` | 400  | `ShipmentDefinitionCode` was not found in the company                                                                                                                 |
| `3017` | 400  | The invoice has already been sent to GİB (`EFaturaId` is set) and cannot be updated                                                                                   |
| `3018` | 400  | `InvoiceTypeCode` is not one of the values allowed for this `ProfileId`                                                                                               |
| `3019` | 400  | A return invoice's `InvoiceTypeCode` can only be `IADE`                                                                                                               |
| `3020` | 400  | `InvoiceTypeCode` must be `ISTISNA`, `IHRACKAYITLI` or `SGK` when a line has a `VatExemptionCode`                                                                     |
| `3021` | 400  | `ProfileId` is required when the company uses e-Invoice                                                                                                               |
| `3022` | 400  | `InvoiceTypeCode` is required when the company uses e-Invoice                                                                                                         |
| `3023` | 400  | When the company uses e-Invoice, the customer's tax number, invoice title and tax office must be filled in (sales and purchase-return invoices)                       |
| `3101` | 400  | `ProductCode` is required                                                                                                                                             |
| `3102` | 400  | Product not found in the company                                                                                                                                      |
| `3103` | 400  | `UnitCode` is required                                                                                                                                                |
| `3104` | 400  | `UnitCode` is not one of the product's own units (Unit1/Unit2/Unit3)                                                                                                  |
| `3105` | 400  | `Quantity` must be greater than 0                                                                                                                                     |
| `3106` | 400  | `UnitPrice` cannot be negative                                                                                                                                        |
| `3107` | 400  | `DiscountRate` must be between 0 and 100                                                                                                                              |
| `3108` | 400  | `VatRate` must be between 0 and 100                                                                                                                                   |
| `3109` | 400  | Line group not found in the company                                                                                                                                   |
| `3110` | 400  | `WarehouseName` was not found in the company                                                                                                                          |
| `3111` | 400  | The product defines no conversion quantity for the line's unit, so the main unit quantity cannot be calculated                                                        |
| `3112` | 400  | `WarehouseName` is required                                                                                                                                           |
| `3113` | 400  | The invoice line exceeds the quantity of the order line it is linked to                                                                                               |
| `3114` | 400  | The invoice line exceeds the quantity of the despatch line it is linked to                                                                                            |
| `3115` | 400  | The sum of the Lot/serial number entries does not match the line's `Quantity`                                                                                         |
| `3116` | 400  | `Lots`/`SerialNumbers` were not sent as required for the product's stock type                                                                                         |
| `3117` | 400  | `VatRate` is 0 but `VatExemptionCode` is empty (sales and purchase-return invoices only)                                                                              |
| `3118` | 400  | `CurrencyCode` is required                                                                                                                                            |
| `3119` | 400  | The line's currency was not found in the company                                                                                                                      |
| `3120` | 400  | `ExchangeRate` is invalid: must be `1` for the default currency, otherwise required and greater than 0                                                                |
| `3201` | 400  | The `Rate` of a discount must be between 0 and 100                                                                                                                    |
| `3301` | 400  | `LotNo` is required                                                                                                                                                   |
| `3302` | 400  | `LotNo` is already used in the company                                                                                                                                |
| `3303` | 400  | Lot not found                                                                                                                                                         |
| `3304` | 400  | The lot has already been used in an outbound transaction, so the operation (delete/update) was cancelled                                                              |
| `3305` | 400  | Not enough Lot stock for this product and warehouse                                                                                                                   |
| `3401` | 400  | `SerialNumbers` contains an empty value                                                                                                                               |
| `3402` | 400  | The serial number has already been registered and has not been dispatched yet                                                                                         |
| `3404` | 400  | The serial number cannot be removed because it has already been dispatched                                                                                            |


## OpenAPI

````yaml api-reference/openapi.json PATCH /api/v1/purchase-return-invoices/{invoiceId}
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/{invoiceId}:
    patch:
      tags:
        - Purchase Return Invoices
      summary: Partially update purchase return invoice
      description: >-
        Changes only the fields sent in the body (JSON Merge Patch). Fields that
        are not sent keep their current values; a field sent as null is cleared.
        Lists are not merged: when Lines is sent it replaces all lines (with the
        same line-identity rule as a full update), when it is not sent the lines
        stay as they are.
      parameters:
        - name: invoiceId
          in: path
          description: Invoice ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-UserID
          in: header
          description: >-
            ID of the Noyax user the request is made on behalf of. Written to
            the audit fields of created, updated and deleted records.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-CompanyID
          in: header
          description: >-
            ID of the company. The user must be assigned to this company. All
            reads and writes are limited to this company.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-PeriodID
          in: header
          description: >-
            ID of the accounting period. Optional for customer endpoints; if
            sent, it is written to created records.
          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:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResultOfInvoiceDetailDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '3003'
                Message: InvoiceNumber cannot be 'Next' on update.
                Errors:
                  - Code: '3003'
                    Message: InvoiceNumber cannot be 'Next' on update.
        '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.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '3000'
                Message: Invoice not found.
                Errors:
                  - Code: '3000'
                    Message: Invoice not found.
        '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: >-
            Required. Invoice number, unique within the company for this invoice
            type. Send "Next" on create to generate it automatically from the
            relevant number series or, when applicable, from the e-Invoice
            numbering. At most 20 characters.
          example: 9446A4D834
        DocumentNumber:
          type:
            - 'null'
            - string
          description: Document number (free text). At most 100 characters.
        Date:
          type:
            - 'null'
            - string
          description: >-
            Required. Invoice date. The date part is stored as the invoice date;
            if a time is sent it is stored as the invoice time, otherwise the
            current time is used.
          format: date-time
          example: '2026-09-21T10:30:00'
        Description:
          type:
            - 'null'
            - string
          description: Description. At most 1000 characters.
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Customer code (the customer's CustomerCode from GET
            /api/v1/customers). The invoice's address, title and tax fields are
            copied from the customer at the moment it is saved and are not
            accepted in the request.
          example: C-0001
        DueDays:
          type: integer
          description: Payment term in days. Cannot be less than 0.
          format: int32
        SharingCode:
          type:
            - 'null'
            - string
          description: >-
            Sharing code that limits who can see the invoice. Empty means
            visible to everyone; otherwise it must be one of the user's sharing
            codes.
        ShipmentDefinitionCode:
          type:
            - 'null'
            - string
          description: >-
            Shipment definition code from GET
            /api/v1/definitions/shipment-definitions.
        DiscountTotal:
          type: number
          description: >-
            Total discount amount. Sent by the integrator, not calculated by the
            API.
          format: double
        SubTotal:
          type: number
          description: >-
            Subtotal (sum of the line amounts excluding taxes). Sent by the
            integrator, not calculated by the API.
          format: double
        VatTotal:
          type: number
          description: Total VAT amount. Sent by the integrator, not calculated by the API.
          format: double
        GrandTotal:
          type: number
          description: Grand total. Sent by the integrator, not calculated by the API.
          format: double
        Consolidated:
          type: boolean
          description: >-
            Whether the invoice consolidates several despatches/orders.
            Free-form flag, not validated by the API.
        PrintDescription:
          type: boolean
          description: Whether the description should be printed on the invoice document.
        Cancelled:
          type: boolean
          description: Whether the invoice has been cancelled.
        AverageExchangeRate:
          type: number
          description: >-
            Weighted average exchange rate of the lines. Sent by the integrator,
            not calculated by the API. Use 1 when everything is in the company's
            default currency.
          format: double
          example: 1
        ApplyWithholding:
          type: boolean
          description: Whether withholding (tevkifat) applies to this invoice.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Withholding (tevkifat) code. At most 10 characters.
        WithholdingNumerator:
          type: integer
          description: Numerator of the withholding share (e.g. 9 in 9/10).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Denominator of the withholding share (e.g. 10 in 9/10).
          format: int32
        WithholdingTotal:
          type: number
          description: >-
            Total withheld VAT amount. Calculated by the API as the sum of the
            lines' withheld VAT.
          format: double
        AdditionalTaxTotal:
          type: number
          description: >-
            Total additional tax amount. Sent by the integrator, not calculated
            by the API.
          format: double
        ProfileId:
          type:
            - 'null'
            - string
          description: >-
            UBL profile ID of the e-document (e.g. "TEMELFATURA",
            "TICARIFATURA"). Required when the company uses e-Invoice. When both
            ProfileId and InvoiceTypeCode are sent, InvoiceTypeCode must be one
            of the values allowed for this ProfileId.
        InvoiceTypeCode:
          type:
            - 'null'
            - string
          description: >-
            UBL invoice type code of the e-document (e.g. "SATIS", "IADE").
            Required when the company uses e-Invoice.
        WithholdingTaxRate:
          type: number
          description: >-
            Withholding tax rate (stopaj), used for
            self-employment/producer-receipt style invoices. Stored as sent.
          format: double
        SocialSecurityRate:
          type: number
          description: >-
            Social security (Bağ-Kur) rate, used for
            self-employment/producer-receipt style invoices. Stored as sent.
          format: double
        MarketRate:
          type: number
          description: >-
            Market (borsa) rate, used for producer-receipt style invoices.
            Stored as sent.
          format: double
        ReturnedInvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Number of the invoice this one returns goods against (Alış/Satış
            İade). Free text, not validated against an existing invoice.
        ReturnedInvoiceDate:
          type:
            - 'null'
            - string
          description: Date of the invoice this one returns goods against.
          format: date-time
        OrderReferenceNumber:
          type:
            - 'null'
            - string
          description: Reference order number (free text, informational only).
        OrderReferenceDate:
          type:
            - 'null'
            - string
          description: Date of the reference order.
          format: date-time
        BranchNumber:
          type:
            - 'null'
            - string
          description: Branch number (informational).
        BranchTitle:
          type:
            - 'null'
            - string
          description: Branch title (informational).
        BranchAddress:
          type:
            - 'null'
            - string
          description: Branch address (informational).
        InvestmentIncentiveDocumentNumber:
          type:
            - 'null'
            - string
          description: Investment incentive certificate number.
        InvestmentIncentiveDocumentDate:
          type:
            - 'null'
            - string
          description: Investment incentive certificate date.
          format: date-time
        EnergyPeriodStart:
          type:
            - 'null'
            - string
          description: Energy period start date/time, for energy sector invoices.
          format: date-time
        EnergyPeriodEnd:
          type:
            - 'null'
            - string
          description: Energy period end date/time, for energy sector invoices.
          format: date-time
        DeliveryInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceDeliveryInfoDto'
        PaymentMeans:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePaymentMeansDto'
          description: Payment methods. Stored and returned as sent, not validated.
        ReferencedDespatches:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDespatchReferenceDto'
          description: Referenced despatches. Stored and returned as sent, not validated.
        CustomerIdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePartyIdentificationDto'
          description: >-
            Customer identity schemes. Stored and returned as sent, not
            validated.
        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: >-
            Required, at least one line. On update, the order in which lines are
            sent determines their identity, the same way as for despatches: the
            line at the same position as an existing line is treated as that
            line (its generated warehouse movement, Lot/serial number and
            linked-order/despatch records move with it).
    DataResultOfInvoiceDetailDto:
      required:
        - Success
        - ResultCode
        - Data
      type: object
      properties:
        Success:
          type: boolean
          description: Whether the operation succeeded.
          example: true
        ResultCode:
          type: string
          description: >-
            "0000" on success. On failure, the code of the first error; all
            errors are listed in Errors.
          example: '0000'
        Message:
          type:
            - 'null'
            - string
          description: >-
            Error message when Success is false. Messages of all errors are
            joined into a single text.
        Data:
          $ref: '#/components/schemas/InvoiceDetailDto'
    ErrorResult:
      type: object
      properties:
        Success:
          type: boolean
          description: Whether the operation succeeded.
          example: false
        ResultCode:
          type:
            - 'null'
            - string
          description: >-
            "0000" on success. On failure, the code of the first error; all
            errors are listed in Errors.
        Message:
          type:
            - 'null'
            - string
          description: >-
            Error message when Success is false. Messages of all errors are
            joined into a single text.
        Errors:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ResultError'
          description: All errors with their codes. Only present when Success is false.
    InvoiceDeliveryInfoDto:
      type: object
      properties:
        DeliveryTerm:
          type:
            - 'null'
            - string
          description: Delivery term code.
        TransportModeCode:
          type:
            - 'null'
            - integer
          description: 'Transport mode code: 1 maritime, 2 rail, 3 road, 4 air.'
          format: int32
        Country:
          type:
            - 'null'
            - string
          description: Delivery country.
        CityName:
          type:
            - 'null'
            - string
          description: Delivery city.
        CitySubdivisionName:
          type:
            - 'null'
            - string
          description: Delivery city subdivision (district).
        StreetName:
          type:
            - 'null'
            - string
          description: Delivery street name.
        BuildingName:
          type:
            - 'null'
            - string
          description: Delivery building name.
        BuildingNumber:
          type:
            - 'null'
            - string
          description: Delivery building number.
        PostalZone:
          type:
            - 'null'
            - string
          description: Delivery postal code.
        TransportMeans:
          type:
            - 'null'
            - string
          description: >-
            Transport means identifier (vessel name, train number, license plate
            or aircraft number, depending on TransportModeCode).
        DeclaredForCarriageValueAmount:
          type:
            - 'null'
            - number
          description: Declared value for carriage.
          format: double
        DeliveryInsuranceValue:
          type:
            - 'null'
            - number
          description: Delivery insurance value.
          format: double
      description: Export delivery information. Stored and returned as sent, not validated.
    InvoicePaymentMeansDto:
      type: object
      properties:
        PaymentMeansCode:
          type:
            - 'null'
            - string
          description: >-
            Payment means code (UN/EDIFACT 4461, e.g. "1" cash, "42" wire
            transfer).
        PayeeFinancialAccountID:
          type:
            - 'null'
            - string
          description: IBAN or account number.
        CurrencyCode:
          type:
            - 'null'
            - string
          description: Currency code of the account.
    InvoiceDespatchReferenceDto:
      type: object
      properties:
        ID:
          type:
            - 'null'
            - string
          description: Despatch number.
        IssueDate:
          type:
            - 'null'
            - string
          description: Despatch issue date.
          format: date-time
    InvoicePartyIdentificationDto:
      type: object
      properties:
        SchemeID:
          type:
            - 'null'
            - string
          description: >-
            Scheme ID (e.g. "MUSTERINO", "BAYINO", "TICARETSICILNO", "MERSISNO",
            "HIZMETNO", "TESISATNO").
        Value:
          type:
            - 'null'
            - string
          description: Value for this scheme.
    InvoiceKamuHarcamaBirimiDto:
      type: object
      properties:
        BCP_Name:
          type:
            - 'null'
            - string
          description: Spending unit name.
        BCP_VKN:
          type:
            - 'null'
            - string
          description: Spending unit tax number.
        BCP_Country:
          type:
            - 'null'
            - string
          description: Spending unit country.
        BCP_CityName:
          type:
            - 'null'
            - string
          description: Spending unit city.
        BCP_CitySubdivisionName:
          type:
            - 'null'
            - string
          description: Spending unit city subdivision (district).
      description: >-
        Public sector (Kamu) payer spending unit. Stored and returned as sent,
        not validated.
    InvoiceSgkInfoDto:
      type: object
      properties:
        StartDate:
          type:
            - 'null'
            - string
          description: Period start date.
          format: date-time
        EndDate:
          type:
            - 'null'
            - string
          description: Period end date.
          format: date-time
        MukellefKodu:
          type:
            - 'null'
            - string
          description: Taxpayer code.
        MukellefAdi:
          type:
            - 'null'
            - string
          description: Taxpayer name.
        DosyaNo:
          type:
            - 'null'
            - string
          description: File number.
        FaturaAltTipi:
          type:
            - 'null'
            - string
          description: Invoice sub-type.
      description: >-
        SGK (social security) invoice information. Stored and returned as sent,
        not validated.
    InvoiceLineRequestDto:
      type: object
      properties:
        ProductCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Product code (the product's Code from GET
            /api/v1/products).
          example: URN-0001
        UnitCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Unit code: the unit's universal code (for example C62 for
            ADET) or, when the unit has no universal code, its name. It must be
            one of the product's own units. The quantity in the product's main
            unit is calculated by the API.
          example: C62
        Quantity:
          type: number
          description: Quantity, in the line unit. Must be greater than 0.
          format: double
          example: 10
        UnitPrice:
          type: number
          description: >-
            Unit price, in the line currency. When VatIncluded is true the price
            includes VAT. Cannot be negative.
          format: double
          example: 100
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Currency code for this line, from GET
            /api/v1/definitions/currencies. The invoice's own currency is
            derived from the lines: when every line uses the same currency, that
            is the invoice currency; otherwise it is the company's default
            currency.
          example: TRY
        ExchangeRate:
          type: number
          description: >-
            Exchange rate of CurrencyCode against the company's default
            currency. Must be 1 when CurrencyCode is the default currency;
            required and greater than 0 otherwise. Sent by the integrator, not
            calculated by the API.
          format: double
          example: 1
        DiscountRate:
          type: number
          description: >-
            Cumulative line discount rate (%) resulting from Discounts, between
            0 and 100. Sent by the integrator, not calculated by the API.
          format: double
        DiscountAmount:
          type: number
          description: >-
            Line discount amount. Sent by the integrator, not calculated by the
            API.
          format: double
        Discounts:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDiscountDto'
          description: >-
            Discounts applied to the line one after another. Leave empty when
            the line has no discount.
        VatRate:
          type: integer
          description: VAT rate (%), between 0 and 100.
          format: int32
          example: 20
        VatIncluded:
          type: boolean
          description: Whether UnitPrice includes VAT.
        VatAmount:
          type: number
          description: >-
            VAT amount of the line. Sent by the integrator, not calculated by
            the API.
          format: double
        AmountExcludingTax:
          type: number
          description: >-
            Line amount excluding taxes. Sent by the integrator, not calculated
            by the API.
          format: double
        AmountIncludingTax:
          type: number
          description: >-
            Line amount including taxes. Sent by the integrator, not calculated
            by the API.
          format: double
        VatBase:
          type: number
          description: >-
            VAT base of the line. Sent by the integrator, not calculated by the
            API.
          format: double
        VatExemptionCode:
          type:
            - 'null'
            - string
          description: VAT exemption code. At most 10 characters.
        LineGroupName:
          type:
            - 'null'
            - string
          description: Name of a line group from GET /api/v1/definitions/line-groups.
        WarehouseName:
          type:
            - 'null'
            - string
          description: >-
            Required. Name of the warehouse from GET /api/v1/stock/warehouses.
            Sending it makes the API record a stock movement for this line (a
            warehouse document is generated automatically behind the invoice).
          example: Main Warehouse
        Description:
          type:
            - 'null'
            - string
          description: Line description. At most 255 characters.
        Description2:
          type:
            - 'null'
            - string
          description: Second line description. At most 255 characters.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Withholding (tevkifat) code. At most 10 characters.
        WithholdingNumerator:
          type: integer
          description: Numerator of the withholding share (e.g. 9 in 9/10).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Denominator of the withholding share (e.g. 10 in 9/10).
          format: int32
        WithheldVatAmount:
          type: number
          description: >-
            Withheld VAT amount. Calculated by the API as VatAmount *
            WithholdingNumerator / WithholdingDenominator.
          format: double
        AdditionalTaxCode1:
          type:
            - 'null'
            - string
          description: Additional tax 1 code. At most 15 characters.
        AdditionalTaxRate1:
          type: number
          description: Additional tax 1 rate (%).
          format: double
        AdditionalTaxAmount1:
          type: number
          description: >-
            Additional tax 1 amount. Sent by the integrator, not calculated by
            the API.
          format: double
        AdditionalTaxBase1:
          type: number
          description: >-
            Additional tax 1 base. Sent by the integrator, not calculated by the
            API.
          format: double
        AdditionalTaxCode2:
          type:
            - 'null'
            - string
          description: Additional tax 2 code. At most 15 characters.
        AdditionalTaxRate2:
          type: number
          description: Additional tax 2 rate (%).
          format: double
        AdditionalTaxAmount2:
          type: number
          description: >-
            Additional tax 2 amount. Sent by the integrator, not calculated by
            the API.
          format: double
        AdditionalTaxBase2:
          type: number
          description: >-
            Additional tax 2 base. Sent by the integrator, not calculated by the
            API.
          format: double
        AdditionalTaxCode3:
          type:
            - 'null'
            - string
          description: Additional tax 3 code. At most 15 characters.
        AdditionalTaxRate3:
          type: number
          description: Additional tax 3 rate (%).
          format: double
        AdditionalTaxAmount3:
          type: number
          description: >-
            Additional tax 3 amount. Sent by the integrator, not calculated by
            the API.
          format: double
        AdditionalTaxBase3:
          type: number
          description: >-
            Additional tax 3 base. Sent by the integrator, not calculated by the
            API.
          format: double
        Lots:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineLotDto'
          description: >-
            Lot entries for a Lot-tracked product (the product's StockType is 3,
            4, 6 or 7). Only used when WarehouseName is sent. Required when
            StockType is 3; required for an inbound movement
            (purchase/sales-return invoice) when StockType is 4, 6 or 7 and left
            empty for an outbound movement of those types (the API selects the
            lots automatically). Left empty when StockType is 1, 2 or 5. The sum
            of the quantities (converted to the product's main unit) must equal
            the line's main unit quantity.
        SerialNumbers:
          type: array
          items:
            type: string
          description: >-
            Serial numbers for a serial-tracked product (StockType 5), one entry
            per unit. Only used when WarehouseName is sent. The count must equal
            Quantity.
        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: Invoice ID.
          format: uuid
        CustomerId:
          type:
            - 'null'
            - string
          format: uuid
        CurrencyId:
          type:
            - 'null'
            - string
          format: uuid
        CustomerName:
          type:
            - 'null'
            - string
          description: Customer name.
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Invoice currency, derived from the lines: when every line uses the
            same currency, that is the invoice currency; otherwise it is the
            company's default currency. Not accepted in the request.
          example: TRY
        ShipmentDefinitionId:
          type:
            - 'null'
            - string
          description: Shipment definition ID.
          format: uuid
        Address:
          type:
            - 'null'
            - string
          description: >-
            Customer's full address at the moment the invoice was saved (a
            snapshot; not taken from the request).
        CustomerTitle:
          type:
            - 'null'
            - string
          description: >-
            Customer's invoice title at the moment the invoice was saved (a
            snapshot).
        TaxNumber:
          type:
            - 'null'
            - string
          description: >-
            Customer's tax number at the moment the invoice was saved (a
            snapshot).
        TaxOffice:
          type:
            - 'null'
            - string
          description: >-
            Customer's tax office at the moment the invoice was saved (a
            snapshot).
        EInvoiceType:
          type: integer
          description: >-
            e-Invoice classification of this invoice record: 0 not an
            e-document, 2 e-Archive. Determined by the API from whether the
            company uses e-Invoice (0 when it does not; for a sales or
            purchase-return invoice, 2 when it does); not accepted in the
            request.
          format: int32
          example: 2
        InvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Required. Invoice number, unique within the company for this invoice
            type. Send "Next" on create to generate it automatically from the
            relevant number series or, when applicable, from the e-Invoice
            numbering. At most 20 characters.
          example: 9446A4D834
        DocumentNumber:
          type:
            - 'null'
            - string
          description: Document number (free text). At most 100 characters.
        Date:
          type:
            - 'null'
            - string
          description: >-
            Required. Invoice date. The date part is stored as the invoice date;
            if a time is sent it is stored as the invoice time, otherwise the
            current time is used.
          format: date-time
          example: '2026-09-21T10:30:00'
        Description:
          type:
            - 'null'
            - string
          description: Description. At most 1000 characters.
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Customer code (the customer's CustomerCode from GET
            /api/v1/customers). The invoice's address, title and tax fields are
            copied from the customer at the moment it is saved and are not
            accepted in the request.
          example: C-0001
        DueDays:
          type: integer
          description: Payment term in days. Cannot be less than 0.
          format: int32
        SharingCode:
          type:
            - 'null'
            - string
          description: >-
            Sharing code that limits who can see the invoice. Empty means
            visible to everyone; otherwise it must be one of the user's sharing
            codes.
        ShipmentDefinitionCode:
          type:
            - 'null'
            - string
          description: >-
            Shipment definition code from GET
            /api/v1/definitions/shipment-definitions.
        DiscountTotal:
          type: number
          description: >-
            Total discount amount. Sent by the integrator, not calculated by the
            API.
          format: double
        SubTotal:
          type: number
          description: >-
            Subtotal (sum of the line amounts excluding taxes). Sent by the
            integrator, not calculated by the API.
          format: double
        VatTotal:
          type: number
          description: Total VAT amount. Sent by the integrator, not calculated by the API.
          format: double
        GrandTotal:
          type: number
          description: Grand total. Sent by the integrator, not calculated by the API.
          format: double
        Consolidated:
          type: boolean
          description: >-
            Whether the invoice consolidates several despatches/orders.
            Free-form flag, not validated by the API.
        PrintDescription:
          type: boolean
          description: Whether the description should be printed on the invoice document.
        Cancelled:
          type: boolean
          description: Whether the invoice has been cancelled.
        AverageExchangeRate:
          type: number
          description: >-
            Weighted average exchange rate of the lines. Sent by the integrator,
            not calculated by the API. Use 1 when everything is in the company's
            default currency.
          format: double
          example: 1
        ApplyWithholding:
          type: boolean
          description: Whether withholding (tevkifat) applies to this invoice.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Withholding (tevkifat) code. At most 10 characters.
        WithholdingNumerator:
          type: integer
          description: Numerator of the withholding share (e.g. 9 in 9/10).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Denominator of the withholding share (e.g. 10 in 9/10).
          format: int32
        WithholdingTotal:
          type: number
          description: >-
            Total withheld VAT amount. Calculated by the API as the sum of the
            lines' withheld VAT.
          format: double
        AdditionalTaxTotal:
          type: number
          description: >-
            Total additional tax amount. Sent by the integrator, not calculated
            by the API.
          format: double
        ProfileId:
          type:
            - 'null'
            - string
          description: >-
            UBL profile ID of the e-document (e.g. "TEMELFATURA",
            "TICARIFATURA"). Required when the company uses e-Invoice. When both
            ProfileId and InvoiceTypeCode are sent, InvoiceTypeCode must be one
            of the values allowed for this ProfileId.
        InvoiceTypeCode:
          type:
            - 'null'
            - string
          description: >-
            UBL invoice type code of the e-document (e.g. "SATIS", "IADE").
            Required when the company uses e-Invoice.
        WithholdingTaxRate:
          type: number
          description: >-
            Withholding tax rate (stopaj), used for
            self-employment/producer-receipt style invoices. Stored as sent.
          format: double
        SocialSecurityRate:
          type: number
          description: >-
            Social security (Bağ-Kur) rate, used for
            self-employment/producer-receipt style invoices. Stored as sent.
          format: double
        MarketRate:
          type: number
          description: >-
            Market (borsa) rate, used for producer-receipt style invoices.
            Stored as sent.
          format: double
        ReturnedInvoiceNumber:
          type:
            - 'null'
            - string
          description: >-
            Number of the invoice this one returns goods against (Alış/Satış
            İade). Free text, not validated against an existing invoice.
        ReturnedInvoiceDate:
          type:
            - 'null'
            - string
          description: Date of the invoice this one returns goods against.
          format: date-time
        OrderReferenceNumber:
          type:
            - 'null'
            - string
          description: Reference order number (free text, informational only).
        OrderReferenceDate:
          type:
            - 'null'
            - string
          description: Date of the reference order.
          format: date-time
        BranchNumber:
          type:
            - 'null'
            - string
          description: Branch number (informational).
        BranchTitle:
          type:
            - 'null'
            - string
          description: Branch title (informational).
        BranchAddress:
          type:
            - 'null'
            - string
          description: Branch address (informational).
        InvestmentIncentiveDocumentNumber:
          type:
            - 'null'
            - string
          description: Investment incentive certificate number.
        InvestmentIncentiveDocumentDate:
          type:
            - 'null'
            - string
          description: Investment incentive certificate date.
          format: date-time
        EnergyPeriodStart:
          type:
            - 'null'
            - string
          description: Energy period start date/time, for energy sector invoices.
          format: date-time
        EnergyPeriodEnd:
          type:
            - 'null'
            - string
          description: Energy period end date/time, for energy sector invoices.
          format: date-time
        DeliveryInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceDeliveryInfoDto'
        PaymentMeans:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePaymentMeansDto'
          description: Payment methods. Stored and returned as sent, not validated.
        ReferencedDespatches:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDespatchReferenceDto'
          description: Referenced despatches. Stored and returned as sent, not validated.
        CustomerIdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePartyIdentificationDto'
          description: >-
            Customer identity schemes. Stored and returned as sent, not
            validated.
        PublicSectorSpendingUnit:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceKamuHarcamaBirimiDto'
        SgkInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceSgkInfoDto'
        CreateDate:
          type:
            - 'null'
            - string
          description: Creation date.
          format: date-time
        ModifyDate:
          type:
            - 'null'
            - string
          description: Last modification date.
          format: date-time
        Lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDto'
          description: Invoice lines, in line order.
      description: Response data. Null when Success is false.
    ResultError:
      required:
        - Code
        - Message
      type: object
      properties:
        Code:
          type: string
          description: Error code. See the result codes page for the full list.
        Message:
          type: string
          description: Error description.
    InvoiceLineDiscountDto:
      type: object
      properties:
        Rate:
          type: number
          description: >-
            Discount rate (%), between 0 and 100. Discounts of a line are
            applied one after another in list order: 10, 10 and 10 give a 27.1%
            line discount.
          format: double
          example: 10
    InvoiceLineLotDto:
      type: object
      properties:
        LotNo:
          type:
            - 'null'
            - string
          description: >-
            Required. Lot number, always provided by the integrator (the API
            does not generate it). Unique within the company. On a
            purchase-return/sales invoice for a Lot-tracked product (StockType
            3) this identifies which existing lot to consume from.
        Quantity:
          type: number
          description: >-
            Required. Quantity, in Unit. Must be greater than 0; the API applies
            the inbound/outbound sign internally.
          format: double
        UnitCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Unit code the Quantity is expressed in (one of the
            product's own units).
          example: C62
        SupplierLotNo:
          type:
            - 'null'
            - string
          description: >-
            Supplier's own lot number. Only used when this Lot entry is an
            inbound movement.
        ExpiryDate:
          type:
            - 'null'
            - string
          description: Expiry date. Only used when this Lot entry is an inbound movement.
          format: date-time
        Description:
          type:
            - 'null'
            - string
          description: >-
            Description. Only used when this Lot entry is an inbound movement.
            At most 100 characters.
    InvoiceLineExportInfoDto:
      type: object
      properties:
        PackagingType:
          type:
            - 'null'
            - string
          description: Packaging type.
        DeliveryTerm:
          type:
            - 'null'
            - string
          description: Delivery term code.
        TransportMode:
          type:
            - 'null'
            - integer
          description: 'Transport mode: 1 maritime, 2 rail, 3 road, 4 air.'
          format: int32
        RequiredCustomsID:
          type:
            - 'null'
            - string
          description: Required customs ID.
        DeliveryAddress_CityName:
          type:
            - 'null'
            - string
          description: Delivery address city.
        DeliveryAddress_CitySubdivisionName:
          type:
            - 'null'
            - string
          description: Delivery address city subdivision (district).
        DeliveryAddress_Country:
          type:
            - 'null'
            - string
          description: Delivery address country.
        DeliveryAddress_StreetName:
          type:
            - 'null'
            - string
          description: Delivery address street.
        DeliveryAddress_BuildingName:
          type:
            - 'null'
            - string
          description: Delivery address building name.
        DeliveryAddress_BuildingNumber:
          type:
            - 'null'
            - string
          description: Delivery address building number.
        DeliveryAddress_PostalCode:
          type:
            - 'null'
            - string
          description: Delivery address postal code.
        TransportMeansID:
          type:
            - 'null'
            - string
          description: Transport means identifier.
        GrossWeightMeasure:
          type:
            - 'null'
            - number
          description: Gross weight.
          format: double
        NetWeightMeasure:
          type:
            - 'null'
            - number
          description: Net weight.
          format: double
        PackageBrand:
          type:
            - 'null'
            - string
          description: Package brand.
        PackageID:
          type:
            - 'null'
            - string
          description: Package ID.
        PackageQuantity:
          type:
            - 'null'
            - number
          description: Package quantity.
          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: Pharmaceutical product rows.
        TibbiCihazlar:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/InvoiceMedicalDeviceRowDto'
          description: Medical device rows.
      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 receipt number (Künye No).
        MALSAHIBIVKNTCKN:
          type:
            - 'null'
            - string
          description: Goods owner's tax/ID number.
        MALSAHIBIADSOYADUNVAN:
          type:
            - 'null'
            - string
          description: Goods owner's name/title.
      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 name.
        BrandName:
          type:
            - 'null'
            - string
          description: Brand name.
        SellersItemIdentification:
          type:
            - 'null'
            - string
          description: Seller's own item identification.
        BuyersItemIdentification:
          type:
            - 'null'
            - string
          description: Buyer's own item identification.
        ManufacturersItemIdentification:
          type:
            - 'null'
            - string
          description: Manufacturer's own item identification.
        OriginCountryCode:
          type:
            - 'null'
            - string
          description: Origin country code.
        OriginCountryName:
          type:
            - 'null'
            - string
          description: Origin country name.
        ProductTraceID:
          type:
            - 'null'
            - string
          description: Product trace ID (investment incentive invoices).
        CommodityClassification:
          type:
            - 'null'
            - string
          description: Commodity classification code (investment incentive invoices).
      description: >-
        Extra product information for this line. Stored and returned as sent,
        not validated.
    InvoiceLineDto:
      type: object
      properties:
        ProductId:
          type:
            - 'null'
            - string
          description: Product ID.
          format: uuid
        UnitId:
          type:
            - 'null'
            - string
          description: Unit ID.
          format: uuid
        CurrencyId:
          type:
            - 'null'
            - string
          description: Currency ID.
          format: uuid
        LineGroupId:
          type:
            - 'null'
            - string
          description: Line group ID.
          format: uuid
        WarehouseId:
          type:
            - 'null'
            - string
          description: Warehouse ID.
          format: uuid
        ProductName:
          type:
            - 'null'
            - string
          description: Product name.
        UnitName:
          type:
            - 'null'
            - string
          description: Unit name.
          example: ADET
        MainUnitQuantity:
          type: number
          description: >-
            Quantity converted to the product's main unit. Only meaningful when
            WarehouseName is sent.
          format: double
        ProductCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Product code (the product's Code from GET
            /api/v1/products).
          example: URN-0001
        UnitCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Unit code: the unit's universal code (for example C62 for
            ADET) or, when the unit has no universal code, its name. It must be
            one of the product's own units. The quantity in the product's main
            unit is calculated by the API.
          example: C62
        Quantity:
          type: number
          description: Quantity, in the line unit. Must be greater than 0.
          format: double
          example: 10
        UnitPrice:
          type: number
          description: >-
            Unit price, in the line currency. When VatIncluded is true the price
            includes VAT. Cannot be negative.
          format: double
          example: 100
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Currency code for this line, from GET
            /api/v1/definitions/currencies. The invoice's own currency is
            derived from the lines: when every line uses the same currency, that
            is the invoice currency; otherwise it is the company's default
            currency.
          example: TRY
        ExchangeRate:
          type: number
          description: >-
            Exchange rate of CurrencyCode against the company's default
            currency. Must be 1 when CurrencyCode is the default currency;
            required and greater than 0 otherwise. Sent by the integrator, not
            calculated by the API.
          format: double
          example: 1
        DiscountRate:
          type: number
          description: >-
            Cumulative line discount rate (%) resulting from Discounts, between
            0 and 100. Sent by the integrator, not calculated by the API.
          format: double
        DiscountAmount:
          type: number
          description: >-
            Line discount amount. Sent by the integrator, not calculated by the
            API.
          format: double
        Discounts:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDiscountDto'
          description: >-
            Discounts applied to the line one after another. Leave empty when
            the line has no discount.
        VatRate:
          type: integer
          description: VAT rate (%), between 0 and 100.
          format: int32
          example: 20
        VatIncluded:
          type: boolean
          description: Whether UnitPrice includes VAT.
        VatAmount:
          type: number
          description: >-
            VAT amount of the line. Sent by the integrator, not calculated by
            the API.
          format: double
        AmountExcludingTax:
          type: number
          description: >-
            Line amount excluding taxes. Sent by the integrator, not calculated
            by the API.
          format: double
        AmountIncludingTax:
          type: number
          description: >-
            Line amount including taxes. Sent by the integrator, not calculated
            by the API.
          format: double
        VatBase:
          type: number
          description: >-
            VAT base of the line. Sent by the integrator, not calculated by the
            API.
          format: double
        VatExemptionCode:
          type:
            - 'null'
            - string
          description: VAT exemption code. At most 10 characters.
        LineGroupName:
          type:
            - 'null'
            - string
          description: Name of a line group from GET /api/v1/definitions/line-groups.
        WarehouseName:
          type:
            - 'null'
            - string
          description: >-
            Required. Name of the warehouse from GET /api/v1/stock/warehouses.
            Sending it makes the API record a stock movement for this line (a
            warehouse document is generated automatically behind the invoice).
          example: Main Warehouse
        Description:
          type:
            - 'null'
            - string
          description: Line description. At most 255 characters.
        Description2:
          type:
            - 'null'
            - string
          description: Second line description. At most 255 characters.
        WithholdingCode:
          type:
            - 'null'
            - string
          description: Withholding (tevkifat) code. At most 10 characters.
        WithholdingNumerator:
          type: integer
          description: Numerator of the withholding share (e.g. 9 in 9/10).
          format: int32
        WithholdingDenominator:
          type: integer
          description: Denominator of the withholding share (e.g. 10 in 9/10).
          format: int32
        WithheldVatAmount:
          type: number
          description: >-
            Withheld VAT amount. Calculated by the API as VatAmount *
            WithholdingNumerator / WithholdingDenominator.
          format: double
        AdditionalTaxCode1:
          type:
            - 'null'
            - string
          description: Additional tax 1 code. At most 15 characters.
        AdditionalTaxRate1:
          type: number
          description: Additional tax 1 rate (%).
          format: double
        AdditionalTaxAmount1:
          type: number
          description: >-
            Additional tax 1 amount. Sent by the integrator, not calculated by
            the API.
          format: double
        AdditionalTaxBase1:
          type: number
          description: >-
            Additional tax 1 base. Sent by the integrator, not calculated by the
            API.
          format: double
        AdditionalTaxCode2:
          type:
            - 'null'
            - string
          description: Additional tax 2 code. At most 15 characters.
        AdditionalTaxRate2:
          type: number
          description: Additional tax 2 rate (%).
          format: double
        AdditionalTaxAmount2:
          type: number
          description: >-
            Additional tax 2 amount. Sent by the integrator, not calculated by
            the API.
          format: double
        AdditionalTaxBase2:
          type: number
          description: >-
            Additional tax 2 base. Sent by the integrator, not calculated by the
            API.
          format: double
        AdditionalTaxCode3:
          type:
            - 'null'
            - string
          description: Additional tax 3 code. At most 15 characters.
        AdditionalTaxRate3:
          type: number
          description: Additional tax 3 rate (%).
          format: double
        AdditionalTaxAmount3:
          type: number
          description: >-
            Additional tax 3 amount. Sent by the integrator, not calculated by
            the API.
          format: double
        AdditionalTaxBase3:
          type: number
          description: >-
            Additional tax 3 base. Sent by the integrator, not calculated by the
            API.
          format: double
        Lots:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineLotDto'
          description: >-
            Lot entries for a Lot-tracked product (the product's StockType is 3,
            4, 6 or 7). Only used when WarehouseName is sent. Required when
            StockType is 3; required for an inbound movement
            (purchase/sales-return invoice) when StockType is 4, 6 or 7 and left
            empty for an outbound movement of those types (the API selects the
            lots automatically). Left empty when StockType is 1, 2 or 5. The sum
            of the quantities (converted to the product's main unit) must equal
            the line's main unit quantity.
        SerialNumbers:
          type: array
          items:
            type: string
          description: >-
            Serial numbers for a serial-tracked product (StockType 5), one entry
            per unit. Only used when WarehouseName is sent. The count must equal
            Quantity.
        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 (barcode).
        SN:
          type:
            - 'null'
            - string
          description: Serial number.
        BN:
          type:
            - 'null'
            - string
          description: Batch/lot number.
        XD:
          type:
            - 'null'
            - string
          description: Expiry date.
          format: date-time
    InvoiceMedicalDeviceRowDto:
      type: object
      properties:
        UNO:
          type:
            - 'null'
            - string
          description: UDI (unique device identifier).
        LNO:
          type:
            - 'null'
            - string
          description: Lot number.
        SNO:
          type:
            - 'null'
            - string
          description: Serial number.
        URT:
          type:
            - 'null'
            - string
          description: Production/expiry-related date.
          format: date-time
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````