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

# Sipariş detayı

> Siparişi satırlarıyla döner.

Siparişi satırlarıyla (satır sırasıyla), her satırın indirimleriyle ve ana birim miktarıyla döner. Kullanıcının [paylaşım kodları](/tr/v1/guides/sharing-codes) yüzünden göremediği siparişler 404 döner.

## 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ı             |
| ------ | ---- | ------------------ |
| `6000` | 404  | Sipariş bulunamadı |


## OpenAPI

````yaml api-reference/openapi.tr.json GET /api/v1/orders/{orderId}
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: 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: 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 Statement
  - name: Customer Telephones
paths:
  /api/v1/orders/{orderId}:
    get:
      tags:
        - Orders
      summary: Sipariş detayı
      description: Siparişi satırları ve indirimleriyle döndürür.
      parameters:
        - name: orderId
          in: path
          description: Sipariş ID'si.
          required: true
          schema:
            type: string
            format: uuid
        - 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
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResultOfOrderDetailDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0201'
                Message: X-UserID header is required.
                Errors:
                  - Code: '0201'
                    Message: X-UserID header 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.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '6000'
                Message: Order not found.
                Errors:
                  - Code: '6000'
                    Message: Order 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:
    DataResultOfOrderDetailDto:
      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/OrderDetailDto'
    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.
    OrderDetailDto:
      type: object
      properties:
        Id:
          type: string
          description: Sipariş ID'si.
          format: uuid
        CustomerId:
          type:
            - 'null'
            - string
          description: Cari ID'si.
          format: uuid
        CurrencyId:
          type:
            - 'null'
            - string
          description: Döviz ID'si.
          format: uuid
        StatusId:
          type:
            - 'null'
            - string
          description: >-
            Siparişin güncel durumunun ID'si. Oluşturulurken şirketin varsayılan
            durumundan atanır; API bunu hiçbir zaman değiştirmez.
          format: uuid
        StatusName:
          type:
            - 'null'
            - string
          description: Siparişin güncel durum adı.
        CustomerName:
          type:
            - 'null'
            - string
          description: Cari adı.
        OrderType:
          type: integer
          description: >-
            Zorunlu. 1: Alış siparişi (tedarikçiye verilen), 2: Satış siparişi
            (müşteriden alınan). Cari hareketi olan siparişte değiştirilemez.
          format: int32
          example: 2
        OrderNumber:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Sipariş numarası, şirkette aynı OrderType için benzersiz.
            Oluştururken "Next" gönderilirse şirketin o tip için sipariş
            numarası serisinden üretilir. En fazla 10 karakter.
          example: 9446A4D834
        DocumentNumber:
          type:
            - 'null'
            - string
          description: Belge numarası (serbest metin). En fazla 20 karakter.
          example: 2026-15
        Date:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Sipariş tarihi. Tarih kısmı sipariş tarihi olarak saklanır;
            saat gönderilirse sipariş saati olarak saklanır, gönderilmezse
            şimdiki 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'taki carinin CustomerCode
            değeri). Sipariş carinin adresiyle yazılır: carinin fatura adresi
            varsa o, yoksa ilk adresi.
          example: C-0001
        CurrencyCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. GET /api/v1/definitions/currencies'ten döviz kodu.
            CreateCustomerMovement true ise cari hareketin dövizi de budur.
          example: TRY
        DueDays:
          type: integer
          description: >-
            Gün cinsinden vade. 0'dan küçük olamaz. CreateCustomerMovement true
            ise cari hareketin vadesi Date + DueDays'tir (0 ise vade tarihi
            yoktur).
          format: int32
          example: 30
        DeliveryDate:
          type:
            - 'null'
            - string
          description: Teslim tarihi.
          format: date-time
        SharingCode:
          type:
            - 'null'
            - string
          description: >-
            Siparişi kimin 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.
        DiscountTotal:
          type: number
          description: >-
            Toplam indirim tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
          example: 0
        SubTotal:
          type: number
          description: >-
            Ara toplam (satır tutarlarının vergisiz toplamı). Entegratör
            tarafından gönderilir, API hesaplamaz.
          format: double
          example: 1000
        VatTotal:
          type: number
          description: Toplam KDV tutarı. Entegratör tarafından gönderilir, API hesaplamaz.
          format: double
          example: 200
        AdditionalTaxTotal:
          type: number
          description: >-
            Toplam ek vergi tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
          example: 0
        WithholdingTotal:
          type: number
          description: >-
            Toplam tevkifat tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
          example: 0
        GrandTotal:
          type: number
          description: >-
            Genel toplam. Entegratör tarafından gönderilir, API hesaplamaz.
            CreateCustomerMovement true ise cari hareketin tutarıdır.
          format: double
          example: 1200
        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. CreateCustomerMovement true ise cari hareketin kuru da
            budur.
          format: double
          example: 1
        CreateCustomerMovement:
          type: boolean
          description: >-
            Siparişin cari hareketi olup olmadığı. true ise alış siparişi
            carinin hesabına GrandTotal tutarında alacak, satış siparişi borç
            hareketi oluşturur ve her güncellemede eşitler. false ise siparişin
            cari hareketi yoktur; güncellemede false mevcut hareketi kaldırır.
            Bir tahsilat ya da ödemeyle kapatılmış hareketler değiştirilemez ya
            da kaldırılamaz.
          example: true
        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/OrderLineDto'
          description: Sipariş satırları, satır sırasıyla.
      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ı.
    OrderLineDto:
      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: Satırın 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: >-
            Ürünün ana birimine çevrilmiş miktar. Sipariş kaydedilirken API
            hesaplar: UnitId ana birimse miktarın kendisi, değilse Quantity'nin
            birimin çarpanına bölümü (ürünün o birim için miktarının karşı
            miktarına oranı, karşı miktar 0 ise 1 alınır).
          format: double
          example: 10
        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
            birimin evrensel kodu yoksa adı (ör. KOLİ). Ürünün kendi
            birimlerinden biri olmalı (ana birimi ya da 2./3. birimi). Ürünün
            ana birimi cinsinden miktarı API hesaplar.
          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: Satırın döviz kodu. Varsayılan olarak siparişin dövizidir.
          example: TRY
        ExchangeRate:
          type: number
          description: Satır dövizinin kuru. Negatif olamaz.
          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
          example: 0
        DiscountAmount:
          type: number
          description: >-
            Satır indirim tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
          example: 0
        Discounts:
          type: array
          items:
            $ref: '#/components/schemas/OrderDiscountRequestDto'
          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ığı.
          example: false
        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: >-
            Satırın teslim edildiği ya da alındığı depo adı (GET
            /api/v1/stock/warehouses).
        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.
        DeliveryDate:
          type:
            - 'null'
            - string
          description: Satırın teslim tarihi.
          format: date-time
        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
        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: >-
            Tevkifatla kesilen KDV tutarı. Entegratör tarafından gönderilir, API
            hesaplamaz.
          format: double
    OrderDiscountRequestDto:
      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
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````