| Özellik | Değer |
|---|---|
| Base URL | api.mlink.com.tr |
| Endpoint | /Pulpo/Recommendations |
| Method | POST |
| Content-Type | application/json |
POST https://api.mlink.com.tr/Pulpo/Recommendations
API'ye erişim için Bearer Token authentication kullanılmalıdır. Token'ı almak için
Account/GetToken endpoint'ini kullanmanız gerekmektedir.
Token almak için aşağıdaki endpoint'i kullanın:
POST https://api.mlink.com.tr/Account/GetToken
Token almak için aşağıdaki parametreleri göndermeniz gerekmektedir:
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
username |
string | Evet | Kullanıcı adı |
password |
string | Evet | Şifre |
{
"username": "username",
"password": "password"
}
Token alma işlemi başarılı olduğunda aşağıdaki yapıda yanıt döner:
{
"data": {
"accessToken": "bearer_token",
"expiration": "2025-12-05T07:57:28.7880586Z"
},
"isSuccess": true,
"message": null,
"type": 0
}
| Parametre | Tip | Açıklama |
|---|---|---|
data |
object | Token bilgilerini içeren obje |
data.accessToken |
string | Bearer token değeri |
data.expiration |
string (ISO 8601) | Token'ın son kullanma tarihi (1 gün geçerlidir) |
isSuccess |
boolean | İşlemin başarılı olup olmadığını belirten flag |
message |
string | null | İşlem hakkında bilgi mesajı |
type |
int | Yanıt tipi (sabit değer: 0) |
Not: Token'ın geçerlilik süresi 1 gündür. Token süresi dolduğunda yeni bir token almanız gerekmektedir.
| Header | Değer | Açıklama |
|---|---|---|
Authorization |
Bearer {token} | Kimlik doğrulama için gerekli Bearer token |
Content-Type |
application/json | Request body JSON formatında olduğunu belirtir |
API'ye gönderilecek request body JSON formatında olmalı ve aşağıdaki parametreleri içermelidir:
| Parametre | Tip | Zorunlu | Olası Değerler | Açıklama |
|---|---|---|---|---|
wrinkle |
integer[] (enum) | Evet | [kullanıcı_sonucu, sistem_sonucu] 0 (CRITICAL), 1 (AVERAGE), 2 (GOOD), 3 (EXCELLENT) |
Kırışıklık bilgisi (2 değer: kullanıcı ve sistem sonucu) |
oiliness |
integer[] (enum) | Evet | [kullanıcı_sonucu, sistem_sonucu] 0 (CRITICAL), 1 (AVERAGE), 2 (GOOD), 3 (EXCELLENT) |
Yağlılık bilgisi (2 değer: kullanıcı ve sistem sonucu) |
redness |
integer[] (enum) | Evet | [kullanıcı_sonucu, sistem_sonucu] 0 (CRITICAL), 1 (AVERAGE), 2 (GOOD), 3 (EXCELLENT) |
Kızarıklık bilgisi (2 değer: kullanıcı ve sistem sonucu) |
underEyeDarkCircles |
integer[] (enum) | Evet | [kullanıcı_sonucu, sistem_sonucu] 0 (CRITICAL), 1 (AVERAGE), 2 (GOOD), 3 (EXCELLENT) |
Göz altı morluk bilgisi (2 değer: kullanıcı ve sistem sonucu) |
acne |
integer[] (enum) | Evet | [kullanıcı_sonucu, sistem_sonucu] 0 (CRITICAL), 1 (AVERAGE), 2 (GOOD), 3 (EXCELLENT) |
Akne bilgisi (2 değer: kullanıcı ve sistem sonucu) |
underEyeBags |
integer[] (enum) | Evet | [kullanıcı_sonucu, sistem_sonucu] 0 (CRITICAL), 1 (AVERAGE), 2 (GOOD), 3 (EXCELLENT) |
Göz altı torbaları bilgisi (2 değer: kullanıcı ve sistem sonucu) |
age |
integer (enum) | Evet | 0 (18_24), 1 (25_34), 2 (35_44), 3 (45_54), 4 (55) | Yaş bilgisi |
skinType |
integer (enum) | Evet | 0 (SENSITIVE), 1 (DRY), 2 (OILY), 3 (NORMAL), 4 (COMBINATION) | Cilt tipi bilgisi |
{
"wrinkle": "integer[] (enum: [kullanıcı_sonucu, sistem_sonucu], 0=CRITICAL, 1=AVERAGE, 2=GOOD, 3=EXCELLENT)",
"oiliness": "integer[] (enum: [kullanıcı_sonucu, sistem_sonucu], 0=CRITICAL, 1=AVERAGE, 2=GOOD, 3=EXCELLENT)",
"redness": "integer[] (enum: [kullanıcı_sonucu, sistem_sonucu], 0=CRITICAL, 1=AVERAGE, 2=GOOD, 3=EXCELLENT)",
"underEyeDarkCircles": "integer[] (enum: [kullanıcı_sonucu, sistem_sonucu], 0=CRITICAL, 1=AVERAGE, 2=GOOD, 3=EXCELLENT)",
"acne": "integer[] (enum: [kullanıcı_sonucu, sistem_sonucu], 0=CRITICAL, 1=AVERAGE, 2=GOOD, 3=EXCELLENT)",
"underEyeBags": "integer[] (enum: [kullanıcı_sonucu, sistem_sonucu], 0=CRITICAL, 1=AVERAGE, 2=GOOD, 3=EXCELLENT)",
"age": "integer (enum: 0=18_24, 1=25_34, 2=35_44, 3=45_54, 4=55)",
"skinType": "integer (enum: 0=SENSITIVE, 1=DRY, 2=OILY, 3=NORMAL, 4=COMBINATION)"
}
| Key | Value |
|---|---|
0 |
CRITICAL |
1 |
AVERAGE |
2 |
GOOD |
3 |
EXCELLENT |
| Key | Value |
|---|---|
0 |
18_24 |
1 |
25_34 |
2 |
35_44 |
3 |
45_54 |
4 |
55 |
| Key | Value |
|---|---|
0 |
SENSITIVE |
1 |
DRY |
2 |
OILY |
3 |
NORMAL |
4 |
COMBINATION |
{
"wrinkle": [0, 1],
"oiliness": [2, 1],
"redness": [1, 0],
"underEyeDarkCircles": [2, 2],
"acne": [0, 1],
"underEyeBags": [0, 0],
"age": 1,
"skinType": 3
}
curl -X POST https://api.mlink.com.tr/Pulpo/Recommendations \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"wrinkle": [0, 1],
"oiliness": [2, 1],
"redness": [1, 0],
"underEyeDarkCircles": [2, 2],
"acne": [0, 1],
"underEyeBags": [0, 0],
"age": 1,
"skinType": 3
}'
API yanıtı aşağıdaki yapıda döner:
{
"data": {},
"isSuccess": true,
"message": "",
"type": 0
}
| Parametre | Tip | Açıklama |
|---|---|---|
data |
object | Ürün önerileri ve SKU bilgilerini içeren obje |
isSuccess |
boolean | İşlemin başarılı olup olmadığını belirten flag |
message |
string | İşlem hakkında bilgi mesajı |
type |
int | Yanıt tipi (sabit değer: 0) |
| Kategori | Açıklama |
|---|---|
nightCream |
Gece kremi ürün SKU'ları |
eyeCare |
Göz bakımı ürün SKU'ları |
sunscreen |
Güneş kremi ürün SKU'ları |
maskPeeling |
Maske ve peeling ürün SKU'ları |
moisturizer |
Nemlendirici ürün SKU'ları |
serum |
Serum ürün SKU'ları |
cleaners |
Temizleyici ürün SKU'ları |
tonic |
Tonik ürün SKU'ları |
sponsored |
Sponsorlu ürün önerileri (adUnit ve winners array'i içerir) |
{
"data":
{
"nightCream": {
"skus": ["08060192", "08060193", "08060194"]
},
"eyeCare": {
"skus": ["08060201", "08060202", "08060203"]
},
"sunscreen": {
"skus": ["08060211", "08060212", "08060213"]
},
"maskPeeling": {
"skus": ["08060221", "08060222", "08060223"]
},
"moisturizer": {
"skus": ["08060231", "08060232", "08060233"]
},
"serum": {
"skus": ["08060241", "08060242", "08060243"]
},
"cleaners": {
"skus": ["08060251", "08060252", "08060253"]
},
"tonic": {
"skus": ["08060261", "08060262", "08060263"]
},
"sponsored": [
{
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"winners": [
{
"lineItemId": 6270,
"creativeId": 100,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "08060192",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6270,
"creativeId": 101,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "08060193",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6270,
"creativeId": 102,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "02060194",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6280,
"creativeId": 200,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "03060181",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6280,
"creativeId": 201,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "04060188",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6280,
"creativeId": 202,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "05060188",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6290,
"creativeId": 300,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "06060181",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6290,
"creativeId": 301,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "07060188",
"payload": "example_payload_xxx"
},
{
"lineItemId": 6290,
"creativeId": 302,
"adUnit": "pulpo-skin-analysis-sponsored-product-1",
"productSku": "08060188",
"payload": "example_payload_xxx"
}
]
},
{
"adUnit": "pulpo-skin-analysis-sponsored-product-2",
"winners": [
{
"lineItemId": 7296,
"creativeId": 282,
"adUnit": "pulpo-skin-analysis-sponsored-product-2",
"productSku": "08060195",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7297,
"creativeId": 283,
"adUnit": "pulpo-skin-analysis-sponsored-product-2",
"productSku": "08060196",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7298,
"creativeId": 284,
"adUnit": "pulpo-skin-analysis-sponsored-product-2",
"productSku": "08060197",
"payload": "example_payload_xxx"
}
]
},
{
"adUnit": "pulpo-skin-analysis-sponsored-product-3",
"winners": [
{
"lineItemId": 7299,
"creativeId": 285,
"adUnit": "pulpo-skin-analysis-sponsored-product-3",
"productSku": "08060198",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7300,
"creativeId": 286,
"adUnit": "pulpo-skin-analysis-sponsored-product-3",
"productSku": "08060199",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7301,
"creativeId": 287,
"adUnit": "pulpo-skin-analysis-sponsored-product-3",
"productSku": "08060200",
"payload": "example_payload_xxx"
}
]
},
{
"adUnit": "pulpo-skin-analysis-sponsored-product-4",
"winners": [
{
"lineItemId": 7302,
"creativeId": 288,
"adUnit": "pulpo-skin-analysis-sponsored-product-4",
"productSku": "08060201",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7303,
"creativeId": 289,
"adUnit": "mpulpo-skin-analysis-sponsored-product-4",
"productSku": "08060202",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7304,
"creativeId": 290,
"adUnit": "pulpo-skin-analysis-sponsored-product-4",
"productSku": "08060203",
"payload": "example_payload_xxx"
}
]
},
{
"adUnit": "pulpo-skin-analysis-sponsored-product-5",
"winners": [
{
"lineItemId": 7305,
"creativeId": 291,
"adUnit": "pulpo-skin-analysis-sponsored-product-5",
"productSku": "08060204",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7306,
"creativeId": 292,
"adUnit": "pulpo-skin-analysis-sponsored-product-5",
"productSku": "08060205",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7307,
"creativeId": 293,
"adUnit": "pulpo-skin-analysis-sponsored-product-5",
"productSku": "08060206",
"payload": "example_payload_xxx"
}
]
},
{
"adUnit": "pulpo-skin-analysis-sponsored-product-6",
"winners": [
{
"lineItemId": 7308,
"creativeId": 294,
"adUnit": "pulpo-skin-analysis-sponsored-product-6",
"productSku": "08060207",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7309,
"creativeId": 295,
"adUnit": "pulpo-skin-analysis-sponsored-product-6",
"productSku": "08060208",
"payload": "example_payload_xxx"
},
{
"lineItemId": 7310,
"creativeId": 296,
"adUnit": "pulpo-skin-analysis-sponsored-product-6",
"productSku": "08060209",
"payload": "example_payload_xxx"
}
]
}
]
},
"isSuccess": true,
"message": "İşlem başarılı",
"type": 0
}
{
"data": {},
"isSuccess": true,
"type": 0,
"message": ""
}
HTTP 200 status kodu ile döner. isSuccess flag'i false olduğunda, hata mesajı
response objesindeki message alanından alınabilir.
{
"data": null,
"isSuccess": false,
"type": 1,
"message": "Error message here"
}
wrinkle, oiliness,
redness, underEyeDarkCircles,
acne, underEyeBags) array formatında gönderilir.
Array bir veya iki integer değer içerebilir. İki değer gönderildiğinde
1. değer anketten çıkarılan sonuç, 2. değer ise cilt analiz sonucu
olarak değerlendirilir. Örnek: "wrinkle": [0, 1]
sponsored objesi adUnit alanı ve
winners array’inden oluşur. winners array’i en fazla
9 eleman içerir. Her winner için SKU’lar öncelik sırasına göre döndürülür;
ilk SKU kullanılamazsa bir sonraki SKU gösterilir.
skus array'i ürün SKU numaralarını içerir.