> ## 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 grup detayı listesi

> Ürün gruplarının seçilebilir değerlerini listeler.

Ürün grupları **hiyerarşiktir**: bir detayın üstü (`ParentGroupDetailId`) her zaman bir önceki grubun detayıdır.

* Grup 1 detaylarının üstü olmaz, hepsi her zaman seçilebilir.
* Grup 2'de bir detay seçildiyse, grup 3'te yalnızca **üstü o detay olanlar** ile **üstü boş olanlar** seçilebilir. Aynı kural 3 → 4 ve 4 → 5 için de geçerlidir.
* **Üstü boş olan detay her üst seçiminde seçilebilir.** Örneğin her markada geçerli bir "SUV" gövde tipi, üstü boş bırakılarak tanımlanır.

```
AUDİ (grup 1)
└── SEDAN (grup 2, üstü AUDİ)
    └── JETTA (grup 3, üstü SEDAN)
SUV (grup 2, üstü yok) -> her markayla birlikte seçilebilir
```

Ürün kaydederken bu kural doğrulanır: `GroupDetailId3` alanına, üstü `GroupDetailId2` ile seçilen detay olmayan (ve üstü boş da olmayan) bir detay gönderirseniz istek `2013` ile reddedilir.

## Seçilebilir detayları getirme

Bir üst grupta seçim yaptıysanız, `groupNumber` ile birlikte `parentGroupDetailId` gönderin: yanıt, o üste bağlı detaylarla üstü boş detayları birlikte döner. Ekrandaki açılır listeyi bu şekilde doldurabilirsiniz.

```
GET /api/v1/products/groups?groupNumber=3&parentGroupDetailId=<grup 2 seçimi>
```


## OpenAPI

````yaml api-reference/openapi.tr.json GET /api/v1/products/groups
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://api.noyax.com
security:
  - Bearer: []
tags:
  - name: Sections
  - name: Warehouses
  - name: Product Critical Stock
  - name: Product groups
  - name: Product Parameter Definitions
  - name: Product Parameters
  - name: Product Prices
  - name: Products
  - name: Cities
  - name: Countries
  - name: Currencies
  - name: Districts
  - 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/products/groups:
    get:
      tags:
        - Product groups
      summary: Ürün grup detaylarını listele
      description: >-
        Beş ürün grubunun seçilebilir değerlerini döner. Dönen Id değerleri
        üründe GroupDetailId1...GroupDetailId5 alanlarında kullanılır.

        Bir üst grupta seçim yaptıysanız groupNumber ile birlikte
        parentGroupDetailId gönderin: yanıt, o üste bağlı detaylarla üstü boş
        detayları birlikte döner.
      parameters:
        - name: groupNumber
          in: query
          description: Yalnızca bu grubun (1-5) detaylarını döner.
          schema:
            type: integer
            format: int32
        - name: parentGroupDetailId
          in: query
          description: Yalnızca üstü bu detay olanları ve üstü boş olan detayları döner.
          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/DataResultOfListOfProductGroupDetailDto'
        '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.
        '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:
    DataResultOfListOfProductGroupDetailDto:
      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:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ProductGroupDetailDto'
          description: Yanıt verisi. Success false olduğunda null döner.
    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.
    ProductGroupDetailDto:
      type: object
      properties:
        Id:
          type: string
          description: >-
            Ürün grup detayı ID'si. Üründe GroupDetailId1...GroupDetailId5
            alanlarında kullanılır.
          format: uuid
        ParentName:
          type:
            - 'null'
            - string
          description: Üst detayın adı.
          example: AUDİ
        GroupNumber:
          type: integer
          description: >-
            Zorunlu. Detayın hangi ürün grubuna ait olduğu: üründeki
            GroupDetailId1...GroupDetailId5 alanlarına karşılık gelen 1-5
            değeri.
          format: int32
          example: 2
        Name:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Detay adı, grup içinde benzersiz olmalıdır. En fazla 50
            karakter.
          example: SEDAN
        ParentGroupDetailId:
          type:
            - 'null'
            - string
          description: >-
            Üst detayın ID'si; bir önceki gruba (GroupNumber - 1) ait olmalıdır.
            Boş bırakılırsa detay her üst seçiminde seçilebilir olur. Grup 1
            detaylarının üstü olamaz.
          format: uuid
    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ı.
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````