Örnek İstekler

Ürün aktarım, güncelleme ve işlem kontrol servislerine ait örnek cURL bilgilerini bu dokümandan elde edebilirsiniz.

İşlemlerinizde supplierId, authorization ve User-Agent bilgilerini kendi verilerinize göre düzenlemeniz gerekmektedir.

Prod endpoint : https://api.trendyol.com/sapigw/...

Stage endpoint : https://stageapi.trendyol.com/stagesapigw/...

Ürün Aktarımı

curl --location --request POST 'https://api.trendyol.com/sapigw/suppliers/200300444/v2/products' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc=' \
--header 'User-Agent: 200300444 - Trendyolsoft' \
--header 'Content-Type: application/json' \
--data-raw '{
  "items": [
    {
      "barcode": "8680000000",
      "title": "Bebek Takımı Pamuk",
      "productMainId": "1234BT",
      "brandId": 8242,
      "categoryId": 14728,
      "quantity": 100,
      "stockCode": "Ornek-Stok-Kodu",
      "dimensionalWeight": 2,
      "description": "Ürün açıklama bilgisi",
      "currencyType": "TRY",
      "listPrice": 250.99,
      "salePrice": 120.99,
      "vatRate": 18,
      "cargoCompanyId": 10,
      "images": [
        {
          "url": "https://www.sampleadress/path/folder/image_1.jpg"
        }
      ],
      "attributes": [
        {
          "attributeId": 296,
          "attributeValueId": 2873
        },
        {
          "attributeId": 293,
          "attributeValueId": 17790
        },
        {
           "attributeId": 47,
           "customAttributeValue": "PUDRA"
         },
        {
          "attributeId": 294,
          "attributeValueId": 2879
        }
      ]
    }
  ]
}'

Ürün Güncelleme

curl --location --request PUT 'https://api.trendyol.com/sapigw/suppliers/200300444/v2/products' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \
--header 'Content-Type: application/json' \
--data-raw '{
  "items": [
    {
      "barcode": "8680000000",
      "title": "Bebek Takımı Pamuk",
      "productMainId": "1234BT",
      "brandId": 1791,
      "categoryId": 411,
      "quantity": 100,
      "stockCode": "STK-345",
      "dimensionalWeight": 2,
      "description": "Ürün açıklama bilgisi",
      "currencyType": "TRY",
      "listPrice": 250.99,
      "salePrice": 120.99,
      "vatRate": 18,
      "deliveryDuration": 2,
      "cargoCompanyId": 10,
      "images": [
        {
          "url": "https://www.sampleadress/path/folder/image_1.jpg"
        }
      ],
      "attributes": [
        {
          "attributeId": 338,
          "attributeValueId": 6980
        },
        {
           "attributeId": 47,
           "customAttributeValue": "PUDRA"
         },
        {
          "attributeId": 346,
          "attributeValueId": 4290
        }
      ]
    }
  ]
}'

Stok & Fiyat Güncelleme

curl --location --request POST 'https://api.trendyol.com/sapigw/suppliers/200300444/products/price-and-inventory' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \
--header 'Content-Type: application/json' \
--data-raw '{
  "items": [
    {
      "barcode": "8680000000",
      "quantity": 100,
      "salePrice": 112.85,
      "listPrice": 113.85
    }
  ]
}'
Yalnızca Fiyat Güncelleme
curl --location --request POST 'https://api.trendyol.com/sapigw/suppliers/200300444/products/price-and-inventory' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \
--header 'Content-Type: application/json' \
--data-raw '{
  "items": [
    {
      "barcode": "8680000000",
      "salePrice": 112.85,
      "listPrice": 113.85
    }
  ]
}'
Yalnızca Stok Güncelleme
curl --location --request POST 'https://api.trendyol.com/sapigw/suppliers/200300444/products/price-and-inventory' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \
--header 'Content-Type: application/json' \
--data-raw '{
  "items": [
    {
      "barcode": "8680000000",
      "quantity": 100
    }
  ]
}'

Toplu İşlem Kontrolü

curl --location --request GET 'https://api.trendyol.com/sapigw/suppliers/200300444/products/batch-requests/56fb618b-bff6-47e5-a249-62e2ab42bc20-1620063393' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \

Ürün Listesini Çekme

curl --location --request GET 'https://api.trendyol.com/sapigw/suppliers/200300444/products?page=0&size=50&approved=True' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \

Kategori Listesi Çekme

curl --location --request GET 'https://api.trendyol.com/sapigw/product-categories' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \

Kategori Özelliklerini Çekme

curl --location --request GET 'https://api.trendyol.com/sapigw/product-categories/123/attributes' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \

Marka Çekme

curl --location --request GET 'https://api.trendyol.com/sapigw/brands' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \

İade ve Sevkiyat Adreslerini Çekme

curl --location --request GET 'https://api.trendyol.com/sapigw/suppliers/200300444/addresses' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \

Kargo Şirketlerini Çekme

curl --location --request GET 'https://api.trendyol.com/sapigw/shipment-providers' \
--header 'Authorization: Basic NmF1M3R4NDZMS3ZFYW1ObFJjdkE6blNMblBtdERxZ2R5SGlsVUVPZVc==' \
--header 'User-Agent: 200300444 - Trendyolsoft' \