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

# Ürün stok durumu (kod ile)

> Ürün stok durumunu getir ile aynı rapor, ürün ID'si yerine ProductCode ya da EcommerceCode ile.

[Ürün stok durumunu getir](/tr/v1/stock/products/status) ile aynı rapor; ürünün ID'si yerine yalnızca `ProductCode`'u ya da e-ticaret entegrasyon kodu (`EcommerceCode`) elinizde olduğunda bu route kullanılır.

* `ProductCode`/`EcommerceCode`'dan tam olarak biri zorunludur.
* Diğer tüm davranış (`WarehouseName`, `Quantity`, `Lots`, `SerialNumbers`, `UnitCode`) Ürün stok durumunu getir ile birebir aynıdır.

## 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ı |
| - | - | - |
| `2000` | 404 | Ürün bulunamadı |
| `4200` | 400 | `warehouseName` ile verilen depo bulunamadı |
| `4201` | 400 | `productId`, `productCode` ya da `eCommerceCode`'dan biri zorunlu |
| `4202` | 404 | `productCode` ile verilen ürün bulunamadı |
| `4203` | 404 | `eCommerceCode` ile verilen ürün bulunamadı |


## OpenAPI

````yaml api-reference/openapi.tr.json GET /api/v1/stock/products/status
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/stock/products/status:
    get:
      tags:
        - Product Stock Status
      summary: Ürün stok durumunu ProductCode ya da EcommerceCode ile getir
      description: >-
        Ürünün ID'si yerine yalnızca ProductCode'u ya da e-ticaret entegrasyon
        kodu (EcommerceCode) elinizde olduğunda kullanılan, Ürün stok durumunu
        getir ile aynı rapor. ProductCode/EcommerceCode'dan tam olarak biri
        zorunludur.
      parameters:
        - name: productCode
          in: query
          description: Ürün kodu (ürünün Code'u, GET /api/v1/products içinden).
          schema:
            type: string
        - name: eCommerceCode
          in: query
          description: >-
            Ürünün e-ticaret entegrasyon kodu (EcommerceProductCode, GET
            /api/v1/products içinden).
          schema:
            type: string
        - name: warehouseName
          in: query
          description: >-
            Yalnızca bu depodaki hareketleri say (ad, GET
            /api/v1/stock/warehouses içinden). Boş bırakılırsa tüm depolar dahil
            olur.
          schema:
            type: string
        - 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/DataResultOfProductStockStatusDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '4201'
                Message: One of productId, productCode or eCommerceCode is required.
                Errors:
                  - Code: '4201'
                    Message: >-
                      One of productId, productCode or eCommerceCode is
                      required.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0102'
                Message: Token has expired. Obtain a new token using the refresh token.
                Errors:
                  - Code: '0102'
                    Message: >-
                      Token has expired. Obtain a new token using the refresh
                      token.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0110'
                Message: You do not have permission for this operation.
                Errors:
                  - Code: '0110'
                    Message: You do not have permission for this operation.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0120'
                Message: Daily request limit (10000) exceeded.
                Errors:
                  - Code: '0120'
                    Message: Daily request limit (10000) exceeded.
components:
  schemas:
    DataResultOfProductStockStatusDto:
      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/ProductStockStatusDto'
    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.
    ProductStockStatusDto:
      type: object
      properties:
        UnitCode:
          type:
            - 'null'
            - string
          description: Ürünün ana birim kodu (evrensel kod doluysa o, değilse birimin adı).
          example: C62
        Quantity:
          type: number
          description: >-
            Eldeki toplam miktar, UnitCode cinsinden. Her depo hareketini içerir
            (irsaliyeler ve transfer, sayım gibi diğer hareket tipleri),
            yalnızca bu API üzerinden oluşturulan irsaliyeleri değil.
          format: double
        Lots:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ProductStockLotDto'
          description: >-
            Lot başına kalan miktar, yalnızca ürünün StockType'ı 3 (Lot), 4
            (FIFO), 6 (LIFO) ya da 7 (FEFO) ise. Kalan miktarı olmayan lotlar
            listede yer almaz. Ürünün StockType'ı bunlardan biri değilse null
            döner.
        SerialNumbers:
          type:
            - 'null'
            - array
          items:
            type: string
          description: >-
            Hâlâ stokta olan (girişi yapılmış, çıkışı yapılmamış) seri
            numaraları, yalnızca ürünün StockType'ı 5 (Seri) ise. Ürünün
            StockType'ı 5 değilse null döner.
      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ı.
    ProductStockLotDto:
      type: object
      properties:
        LotNo:
          type:
            - 'null'
            - string
          description: Lot numarası.
          example: LOT-2026-001
        Quantity:
          type: number
          description: Bu lotun kalan miktarı, UnitCode cinsinden.
          format: double
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````