[SOURCE="php"]<?php
$url = 'https://api.trendyol.com/sapigw/suppliers/[[TEDARIKCI-ID]]/v2/products';
$ch = curl_init($url);
$json='{
"items": [
{
"barcode": "URUN BARKOD",
"title": "URUN ADI",
"productMainId": "URUN KODU",
"brandId": 647,
"categoryId": 387,
"quantity": 1,
"stockCode": "URUN KODU",
"dimensionalWeight": 1,
"description": "Ürün açıklama bilgisi",
"currencyType": "TRY",
"listPrice": 220,
"salePrice": 209,
"vatRate": 18,
"cargoCompanyId": 2,
"shipmentAddressId": 0,
"returningAddressId": 0,
"color": "Lacivert",
"attributes": [],
"images": [
{
"url": "RESIM LINK"
}
]
}
]
}';
curl_setopt($ch, CURLOPT_POST, 1);
$header = array(
'Authorization: Basic '. base64_encode('[[API USERNAME]]:[[API PASSWORD]]'),
'Content-Type: application/json'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
$result = curl_exec($ch);
?>[/SOURCE]
Yukarıdaki jsonu kendinize göre doldurun ve Tedarikçi ID ve api auth bilgilerini değiştirip çalıştırın :noworry: