Ürün Listesi
Mağazaya ait ürünleri sayfalama, filtreleme ve tarih aralıkları ile birlikte listeler. Variant (varyant) bazında stok, fiyat ve niteliklerle döner.
Gerekli yetki: product:read
Endpoint
GET /integration/product/sellers/{sellerId}/products
Production
https://api.milagron.com/integration/product/sellers/{sellerId}/products
Stage
https://stageapi.milagron.com/integration/product/sellers/{sellerId}/products
Sorgu Parametreleri
Sayfalama ve Sıralama
| Parametre | Tip | Varsayılan | Açıklama |
page | integer | 0 | Sayfa numarası (sıfırdan başlar). |
size | integer | 50 | Sayfa başına dönen ürün adedi (en fazla 1000). |
creationDate | string | ASC | Oluşturma tarihine göre sıralama yönü: ASC veya DESC. |
Ürün Filtreleri
| Parametre | Tip | Açıklama |
barcode | string | Belirli bir barkoda göre filtreleme. |
stockCode | string | Belirli bir SKU'ya göre filtreleme. |
productMainId | string | Ürün ana kimliği ile filtreleme. |
status | string | Ürün durumu: onSale, notOnSale, archived. |
Marka / Kategori Filtreleri
| Parametre | Tip | Açıklama |
brand | string | Marka adı (virgülle çoklu). |
brandIds | string | Marka ID'si (virgülle çoklu). |
category | string | Ana kategori adı (virgülle çoklu). |
categoryId | integer | Ana kategori ID (virgülle çoklu). |
subCategory | string | Alt kategori adı (virgülle çoklu). |
subCategoryId | integer | Alt kategori ID (virgülle çoklu). |
productType | string | Ürün tipi adı (virgülle çoklu). |
productTypeId | integer | Ürün tipi ID (virgülle çoklu). |
Tarih Filtreleri
| Parametre | Tip | Açıklama |
startDate | long (ms) | Bu tarihten sonra güncellenen ürünler (Unix milisaniye). |
endDate | long (ms) | Bu tarihten önce güncellenen ürünler. |
creationDateStart | long (ms) | Bu tarihten sonra oluşturulan ürünler. |
creationDateEnd | long (ms) | Bu tarihten önce oluşturulan ürünler. |
Yanıt (200)
{
"totalElements": 487,
"totalPages": 10,
"page": 0,
"size": 50,
"content": [
{
"contentId": 60042,
"productMainId": "9084249637087",
"title": "Ürün Adı",
"description": "Ürün açıklaması...
",
"images": [
{ "url": "https://cdn.milagron.com/products/image1.webp" },
{ "url": "https://cdn.milagron.com/products/image2.webp" }
],
"brand": {
"id": 12,
"name": "By Lamp"
},
"category": {
"id": 3,
"name": "Aydınlatma"
},
"subCategory": {
"id": 7,
"name": "Aplik"
},
"productType": {
"id": 9,
"name": "Aplik"
},
"taxRate": 20,
"productUrl": "https://milagron.com/products/urun-handle",
"creationDate": 1749416400000,
"lastModifiedDate": 1749502800000,
"deliveryOptions": {
"minDeliveryDays": 2,
"maxDeliveryDays": 5
},
"onSale": true,
"archived": false,
"variants": [
{
"variantId": "47115403722975",
"barcode": "8690000000001",
"stockCode": "APLIK-7151",
"stock": {
"quantity": 100,
"lastModifiedDate": 1749502800000
},
"price": {
"salePrice": 2554.74,
"listPrice": 3609.90
},
"productUrl": "https://milagron.com/products/urun-handle?variant=47115403722975",
"attributes": [
{
"attributeId": 1,
"attributeName": "Renk",
"attributeValueId": 8,
"attributeValue": "Lila"
}
]
}
]
}
]
}
Ürün Alanları
| Alan | Tip | Açıklama |
contentId | integer | Ürünün dahili kimliği. |
productMainId | string | Ürün ana kimliği. |
title | string | Ürün başlığı. |
description | string | HTML formatında ürün açıklaması. |
images | array | Ürün görselleri listesi (her biri { url }). |
brand | object | Marka bilgisi: { id, name }. |
category | object | Ana kategori: { id, name }. |
subCategory | object | Alt kategori: { id, name }. |
productType | object | Ürün tipi: { id, name }. |
taxRate | integer | KDV oranı. |
productUrl | string \| null | Satışa açık ürünün genel müşteri URL'si. |
creationDate | long | Oluşturma zamanı, Unix milisaniye. |
lastModifiedDate | long | Son değişiklik zamanı, Unix milisaniye. |
deliveryOptions | object | Teslimat süresi: { minDeliveryDays, maxDeliveryDays }. |
onSale | boolean | Ürün aktif satıştaysa true. |
archived | boolean | Ürün arşivlendiyse true. |
variants | array | Varyantlar listesi (aşağıda). |
Varyant Alanları (variants[])
| Alan | Tip | Açıklama |
variantId | string | Varyant kimliği. |
barcode | string | Barkod. |
stockCode | string | SKU. |
stock.quantity | integer | Stok adedi. |
stock.lastModifiedDate | long | Stokun son güncelleme zamanı, Unix milisaniye. |
price.salePrice | number | Satış fiyatı. |
price.listPrice | number | Liste fiyatı (indirim öncesi). |
productUrl | string \| null | Varyant seçimi ile oluşturulmuş ürün URL'si. |
attributes | array | Varyant nitelikleri (renk, beden vb.). |
Attribute Alanları (variants[].attributes[])
| Alan | Tip | Açıklama |
attributeId | integer | Nitelik ID. |
attributeName | string | Nitelik adı (örn. Renk). |
attributeValueId | integer | Değer ID. |
attributeValue | string | Değer adı (örn. Kırmızı). |
Kullanım Örnekleri
curl -u "API_KEY:API_SECRET" \
-X GET "https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale"
<?php
$ch = curl_init('https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'API_KEY:API_SECRET',
CURLOPT_CUSTOMREQUEST => 'GET',
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
const auth = Buffer.from('API_KEY:API_SECRET').toString('base64');
const res = await fetch('https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale', {
method: 'GET',
headers: {
'Authorization': `Basic ${auth}`
}
});
const data = await res.json();
import requests
response = requests.get(
'https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale',
auth=('API_KEY', 'API_SECRET')
)
response.raise_for_status()
data = response.json()
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale", nil)
req.SetBasicAuth("API_KEY", "API_SECRET")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
}
import java.net.URI;
import java.net.http.*;
import java.util.Base64;
HttpClient client = HttpClient.newHttpClient();
String auth = Base64.getEncoder()
.encodeToString("API_KEY:API_SECRET".getBytes());
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale"))
.header("Authorization", "Basic " + auth)
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth('API_KEY', 'API_SECRET')
response = http.request(request)
data = JSON.parse(response.body)
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
var client = new HttpClient();
var auth = Convert.ToBase64String(
Encoding.UTF8.GetBytes("API_KEY:API_SECRET"));
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Basic", auth);
var response = await client.GetAsync("https://api.milagron.com/integration/product/sellers/123/products?page=0&size=50&status=onSale");
var data = await response.Content.ReadAsStringAsync();
Hata Kodları
| Kod | Sebep |
| 400 | page sınırı aşılmış (maks 5000). |
| 401 / 403 | Kimlik doğrulama veya yetki problemi. |
| 404 | Seller bulunamadı. |
Notlar
- Bu endpoint salt-okunur niteliktedir; stage ortamında dahi gerçek veri döner.
barcode, stockCode, status filtreleri aktifken ürünün yalnızca eşleşen varyantları variants dizisinde döner.
productUrl alanı, ürün aktif olarak satışta değilse null olur.