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

# UpdateIntegrationCode

> ### 📥 Request Body (JSON)

``` json
{  "branch": "c19890fa-7c2f-49f9-8a8b-80f2daf06657",  "data": [    {      "ItemId": 9,      "IntegrationCode": "32asdasd"    },    {      "ItemNo": 11016,      "IntegrationCode": "ghgfhfgh"    },    {      "ItemId": 11,      "ItemNo": 11017,      "IntegrationCode": "23323423"    },    {      "ItemId": 12,      "ItemNo": 11018,      "IntegrationCode": "test"    },    {      "ItemId": 13,      "ItemNo": 11019,      "IntegrationCode": "34234234"    },    {      "ItemId": 14,      "ItemNo": 11020,      "IntegrationCode": ""    }  ]}

 ```

---

### 📊 Request Field Açıklamaları

#### Root

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| branch | string | ✅ | Şube GUID |
| data | array | ✅ | Güncellenecek ürünler |

#### Data Object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| ItemId | int | ❌\* | Ürün ID |
| ItemNo | int | ❌\* | Ürün No |
| IntegrationCode | string | ✅ | Entegrasyon kodu |

⚠️ **Önemli:**

- `ItemId` veya `ItemNo`’dan en az biri gönderilmeli
    
- İkisi birlikte gönderilirse sistem genelde `ItemId` üzerinden eşler (best practice)
    

---

### 📤 Response

#### ✅ Success Response (200)

```
{  "ResultCode": 200,  "Data": [    {      "ItemId": 9,      "ItemNo": 11009,      "IntegrationCode": "32asdasd"    }  ],  "ResultMessage": "OK"}

 ```

---

### 📊 Response Fields

#### Root

| Field | Type | Description |
| --- | --- | --- |
| ResultCode | int | 200 = başarılı |
| Data | array | Güncellenen kayıtlar |
| ResultMessage | string | Açıklama |

#### Data Object

| Field | Type | Description |
| --- | --- | --- |
| ItemId | int | Ürün ID |
| ItemNo | int | Ürün No |
| IntegrationCode | string | Güncellenmiş değer |

---

## ⚠️ Kritik Davranışlar (Edge Case’ler)

Bu endpoint’i kullanan herkesin bilmesi gereken noktalar:

### 1\. 🔁 Partial Update

- Sadece gönderdiğin kayıtlar update edilir
    
- Diğer ürünler etkilenmez
    

---

### 2\. 🆔 Eşleşme Önceliği

- `ItemId` varsa → direkt match
    
- `ItemId` yoksa → `ItemNo` ile match
    
- Hiçbiri yoksa → kayıt ignore edilir
    

---

### 3\. 🧹 IntegrationCode Temizleme

```
"IntegrationCode": ""

 ```

→ Bu, mevcut mapping’i **silmek** anlamına gelir

---

### 4\. 📦 Bulk İşlem

- Tek request ile yüzlerce ürün update edebilirsin
    
- Ama pratikte:
    
    - 500–1000 arası batch önerilir



## OpenAPI

````yaml /openapi.yaml post /UpdateIntegrationCode
openapi: 3.0.3
info:
  title: ORIONPOS API
  version: 1.0.0
  description: >-
    # 📄 Genel Bakış


    ORIONPOS API Entegrasyonu, ORIONPOS ile entegre olmak isteyen yazılımların
    satış, cari, ürün bilgileri gibi bir çok işlemin aktarımı ve senkronize
    edilmesine olanak sağlar.


    - ORIONPOS on-premise çalışan bir sistem olduğu için gönderdiğiniz tüm
    istekler tarafımızdan hedef Restorana iletilmektedir. Hedef restoranın
    server bilgisayarının kapalı olması, internetinin olmaması, internetinin
    yavaş olması, server bilgisayarının gereksinimleri karşılayamaması gibi
    durumlarda bu hizmetlerin kontrolünü sağlamanızı öneririz.
        

    <img
    src="https://content.pstmn.io/0f35216a-4f73-4d2e-9cb2-fbdc1802c634/T3Jpb25BUElEb2vDvG1hbi5wbmc=">


    **API İstek Limitleri**


    Sistem kararlılığını korumak ve tüm kullanıcılar için adil kullanım sağlamak
    amacıyla API üzerinde kullanıcı bazlı aşağıdaki istek limitleri
    uygulanmaktadır:


    - Dakikada maksimum **60 istek**
        
    - Saniyede maksimum **10 istek**
        

    Bu limitlerin aşılması durumunda istekler sistem tarafından geçici olarak
    reddedilebilir veya sınırlandırılabilir.


    İstemci tarafında bu limitlere uygun olacak şekilde istek kontrolü ve tekrar
    deneme (retry) mekanizmalarının uygulanması önerilir.
servers:
  - url: https://api.orionpanel.com
    description: Üretim (Production)
security:
  - Token: []
tags:
  - name: Authorization
  - name: Branches
  - name: Parameters
  - name: Checks
  - name: Items
paths:
  /UpdateIntegrationCode:
    post:
      tags:
        - Items
      summary: UpdateIntegrationCode
      description: >-
        ### 📥 Request Body (JSON)


        ``` json

        {  "branch": "c19890fa-7c2f-49f9-8a8b-80f2daf06657",  "data": [   
        {      "ItemId": 9,      "IntegrationCode": "32asdasd"    },    {     
        "ItemNo": 11016,      "IntegrationCode": "ghgfhfgh"    },    {     
        "ItemId": 11,      "ItemNo": 11017,      "IntegrationCode":
        "23323423"    },    {      "ItemId": 12,      "ItemNo": 11018,     
        "IntegrationCode": "test"    },    {      "ItemId": 13,      "ItemNo":
        11019,      "IntegrationCode": "34234234"    },    {      "ItemId":
        14,      "ItemNo": 11020,      "IntegrationCode": ""    }  ]}

         ```

        ---


        ### 📊 Request Field Açıklamaları


        #### Root


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | branch | string | ✅ | Şube GUID |

        | data | array | ✅ | Güncellenecek ürünler |


        #### Data Object


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | ItemId | int | ❌\* | Ürün ID |

        | ItemNo | int | ❌\* | Ürün No |

        | IntegrationCode | string | ✅ | Entegrasyon kodu |


        ⚠️ **Önemli:**


        - `ItemId` veya `ItemNo`’dan en az biri gönderilmeli
            
        - İkisi birlikte gönderilirse sistem genelde `ItemId` üzerinden eşler
        (best practice)
            

        ---


        ### 📤 Response


        #### ✅ Success Response (200)


        ```

        {  "ResultCode": 200,  "Data": [    {      "ItemId": 9,      "ItemNo":
        11009,      "IntegrationCode": "32asdasd"    }  ],  "ResultMessage":
        "OK"}

         ```

        ---


        ### 📊 Response Fields


        #### Root


        | Field | Type | Description |

        | --- | --- | --- |

        | ResultCode | int | 200 = başarılı |

        | Data | array | Güncellenen kayıtlar |

        | ResultMessage | string | Açıklama |


        #### Data Object


        | Field | Type | Description |

        | --- | --- | --- |

        | ItemId | int | Ürün ID |

        | ItemNo | int | Ürün No |

        | IntegrationCode | string | Güncellenmiş değer |


        ---


        ## ⚠️ Kritik Davranışlar (Edge Case’ler)


        Bu endpoint’i kullanan herkesin bilmesi gereken noktalar:


        ### 1\. 🔁 Partial Update


        - Sadece gönderdiğin kayıtlar update edilir
            
        - Diğer ürünler etkilenmez
            

        ---


        ### 2\. 🆔 Eşleşme Önceliği


        - `ItemId` varsa → direkt match
            
        - `ItemId` yoksa → `ItemNo` ile match
            
        - Hiçbiri yoksa → kayıt ignore edilir
            

        ---


        ### 3\. 🧹 IntegrationCode Temizleme


        ```

        "IntegrationCode": ""

         ```

        → Bu, mevcut mapping’i **silmek** anlamına gelir


        ---


        ### 4\. 📦 Bulk İşlem


        - Tek request ile yüzlerce ürün update edebilirsin
            
        - Ama pratikte:
            
            - 500–1000 arası batch önerilir
      operationId: UpdateIntegrationCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                branch:
                  type: string
                  example: '{{branch}}'
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      ItemId:
                        type: integer
                        example: 9
                      IntegrationCode:
                        type: string
                        example: 32asdasd
                    required:
                      - ItemId
                      - IntegrationCode
              required:
                - branch
                - data
            example:
              branch: '{{branch}}'
              data:
                - ItemId: 9
                  IntegrationCode: 32asdasd
                - ItemNo: 11016
                  IntegrationCode: ghgfhfgh
                - ItemId: 11
                  ItemNo: 11017
                  IntegrationCode: '23323423'
                - ItemId: 12
                  ItemNo: 11018
                  IntegrationCode: test
                - ItemId: 13
                  ItemNo: 11019
                  IntegrationCode: '34234234'
                - ItemId: 14
                  ItemNo: 11020
                  IntegrationCode: ''
      responses:
        '200':
          description: Başarılı
          content:
            application/json:
              schema:
                type: object
                properties:
                  ResultCode:
                    type: integer
                    example: 200
                  Data:
                    type: array
                    items:
                      type: object
                  ResultMessage:
                    type: string
                    example: OK
      security:
        - Token: []
components:
  securitySchemes:
    Token:
      type: apiKey
      in: header
      name: Token
      description: >-
        GetToken servisinden dönen, 1 gün geçerli oturum token'ı. Diğer tüm
        servisler için zorunludur.

````