Items
UpdateIntegrationCode
📥 Request Body (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:
-
ItemIdveyaItemNo’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
-
ItemIdvarsa → direkt match -
ItemIdyoksa →ItemNoile 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
POST
/
UpdateIntegrationCode
UpdateIntegrationCode
curl --request POST \
--url https://api.orionpanel.com/UpdateIntegrationCode \
--header 'Content-Type: application/json' \
--header 'Token: <api-key>' \
--data '
{
"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": ""
}
]
}
'import requests
url = "https://api.orionpanel.com/UpdateIntegrationCode"
payload = {
"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": ""
}
]
}
headers = {
"Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: ''}
]
})
};
fetch('https://api.orionpanel.com/UpdateIntegrationCode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orionpanel.com/UpdateIntegrationCode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orionpanel.com/UpdateIntegrationCode"
payload := strings.NewReader("{\n \"branch\": \"{{branch}}\",\n \"data\": [\n {\n \"ItemId\": 9,\n \"IntegrationCode\": \"32asdasd\"\n },\n {\n \"ItemNo\": 11016,\n \"IntegrationCode\": \"ghgfhfgh\"\n },\n {\n \"ItemId\": 11,\n \"ItemNo\": 11017,\n \"IntegrationCode\": \"23323423\"\n },\n {\n \"ItemId\": 12,\n \"ItemNo\": 11018,\n \"IntegrationCode\": \"test\"\n },\n {\n \"ItemId\": 13,\n \"ItemNo\": 11019,\n \"IntegrationCode\": \"34234234\"\n },\n {\n \"ItemId\": 14,\n \"ItemNo\": 11020,\n \"IntegrationCode\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orionpanel.com/UpdateIntegrationCode")
.header("Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branch\": \"{{branch}}\",\n \"data\": [\n {\n \"ItemId\": 9,\n \"IntegrationCode\": \"32asdasd\"\n },\n {\n \"ItemNo\": 11016,\n \"IntegrationCode\": \"ghgfhfgh\"\n },\n {\n \"ItemId\": 11,\n \"ItemNo\": 11017,\n \"IntegrationCode\": \"23323423\"\n },\n {\n \"ItemId\": 12,\n \"ItemNo\": 11018,\n \"IntegrationCode\": \"test\"\n },\n {\n \"ItemId\": 13,\n \"ItemNo\": 11019,\n \"IntegrationCode\": \"34234234\"\n },\n {\n \"ItemId\": 14,\n \"ItemNo\": 11020,\n \"IntegrationCode\": \"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orionpanel.com/UpdateIntegrationCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch\": \"{{branch}}\",\n \"data\": [\n {\n \"ItemId\": 9,\n \"IntegrationCode\": \"32asdasd\"\n },\n {\n \"ItemNo\": 11016,\n \"IntegrationCode\": \"ghgfhfgh\"\n },\n {\n \"ItemId\": 11,\n \"ItemNo\": 11017,\n \"IntegrationCode\": \"23323423\"\n },\n {\n \"ItemId\": 12,\n \"ItemNo\": 11018,\n \"IntegrationCode\": \"test\"\n },\n {\n \"ItemId\": 13,\n \"ItemNo\": 11019,\n \"IntegrationCode\": \"34234234\"\n },\n {\n \"ItemId\": 14,\n \"ItemNo\": 11020,\n \"IntegrationCode\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ResultCode": 200,
"Data": [
{}
],
"ResultMessage": "OK"
}Authorizations
Body
application/json
⌘I
UpdateIntegrationCode
curl --request POST \
--url https://api.orionpanel.com/UpdateIntegrationCode \
--header 'Content-Type: application/json' \
--header 'Token: <api-key>' \
--data '
{
"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": ""
}
]
}
'import requests
url = "https://api.orionpanel.com/UpdateIntegrationCode"
payload = {
"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": ""
}
]
}
headers = {
"Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: ''}
]
})
};
fetch('https://api.orionpanel.com/UpdateIntegrationCode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orionpanel.com/UpdateIntegrationCode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orionpanel.com/UpdateIntegrationCode"
payload := strings.NewReader("{\n \"branch\": \"{{branch}}\",\n \"data\": [\n {\n \"ItemId\": 9,\n \"IntegrationCode\": \"32asdasd\"\n },\n {\n \"ItemNo\": 11016,\n \"IntegrationCode\": \"ghgfhfgh\"\n },\n {\n \"ItemId\": 11,\n \"ItemNo\": 11017,\n \"IntegrationCode\": \"23323423\"\n },\n {\n \"ItemId\": 12,\n \"ItemNo\": 11018,\n \"IntegrationCode\": \"test\"\n },\n {\n \"ItemId\": 13,\n \"ItemNo\": 11019,\n \"IntegrationCode\": \"34234234\"\n },\n {\n \"ItemId\": 14,\n \"ItemNo\": 11020,\n \"IntegrationCode\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orionpanel.com/UpdateIntegrationCode")
.header("Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branch\": \"{{branch}}\",\n \"data\": [\n {\n \"ItemId\": 9,\n \"IntegrationCode\": \"32asdasd\"\n },\n {\n \"ItemNo\": 11016,\n \"IntegrationCode\": \"ghgfhfgh\"\n },\n {\n \"ItemId\": 11,\n \"ItemNo\": 11017,\n \"IntegrationCode\": \"23323423\"\n },\n {\n \"ItemId\": 12,\n \"ItemNo\": 11018,\n \"IntegrationCode\": \"test\"\n },\n {\n \"ItemId\": 13,\n \"ItemNo\": 11019,\n \"IntegrationCode\": \"34234234\"\n },\n {\n \"ItemId\": 14,\n \"ItemNo\": 11020,\n \"IntegrationCode\": \"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orionpanel.com/UpdateIntegrationCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch\": \"{{branch}}\",\n \"data\": [\n {\n \"ItemId\": 9,\n \"IntegrationCode\": \"32asdasd\"\n },\n {\n \"ItemNo\": 11016,\n \"IntegrationCode\": \"ghgfhfgh\"\n },\n {\n \"ItemId\": 11,\n \"ItemNo\": 11017,\n \"IntegrationCode\": \"23323423\"\n },\n {\n \"ItemId\": 12,\n \"ItemNo\": 11018,\n \"IntegrationCode\": \"test\"\n },\n {\n \"ItemId\": 13,\n \"ItemNo\": 11019,\n \"IntegrationCode\": \"34234234\"\n },\n {\n \"ItemId\": 14,\n \"ItemNo\": 11020,\n \"IntegrationCode\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ResultCode": 200,
"Data": [
{}
],
"ResultMessage": "OK"
}