Tema
Siparişler
Taban adres: https://api.winkwop.com/api/v1/integration/orders İzinler: okuma uçları read_orders, yazma uçları write_orders ister.
Listele
bash
curl https://api.winkwop.com/api/v1/integration/orders \
-H "X-Api-Key: wk_sk_..."Özet alanlarla döner (kalem detayları yok — tek sipariş için detay ucunu kullanın):
json
[
{
"id": "d4e1...-uuid",
"order_number": 1042,
"status": "processing",
"payment_status": "paid",
"total_amount": 379.8,
"currency": "TRY",
"tracking_number": null,
"created_at": "2026-07-28T09:14:00Z"
}
]Sipariş detayı
bash
curl https://api.winkwop.com/api/v1/integration/orders/{id} \
-H "X-Api-Key: wk_sk_..."Müşteri, kalemler (items), teslimat/fatura adresi ve ödeme bilgisiyle birlikte döner:
json
{
"id": "d4e1...-uuid",
"order_number": 1042,
"status": "processing",
"payment_status": "paid",
"total_amount": 379.8,
"subtotal_amount": 399.8,
"discount_amount": 20.0,
"shipping_amount": 0,
"coupon_code": "HOSGELDIN10",
"tracking_number": null,
"shipping_address": { "city": "İstanbul", "line1": "..." },
"billing_address": { "city": "İstanbul", "line1": "..." },
"customer": {
"id": "c9a2...-uuid",
"first_name": "Ada",
"last_name": "Yılmaz",
"email": "ada@ornek.com",
"orders_count": 3
},
"items": [
{
"product_id": "b3f5...-uuid",
"name": "Pamuklu Tişört",
"sku": "TS-001",
"variant_label": "Beden: M",
"quantity": 2,
"unit_price": 199.9,
"total_price": 399.8
}
]
}Durum / kargo takip güncelle
Pazaryeri ya da kargo sisteminizden gelen durumu Winkwop'a yazmak için:
bash
curl -X PUT https://api.winkwop.com/api/v1/integration/orders/{id}/status \
-H "X-Api-Key: wk_sk_..." \
-H "Content-Type: application/json" \
-d '{
"status": "shipped",
"tracking_number": "1234567890",
"carrier_code": "yurtici"
}'status şu değerlerden biri olmalı: pending, processing, shipped, completed, cancelled, refunded. Geçersiz bir değer 400 BAD_REQUEST döner.
cancelled'a geçiş, siparişteki ürünlerin stoğunu otomatik olarak deposuna geri ekler (aynı siparişi iki kez iptal etmek stoğu iki kez artırmaz).
payment_status alanı opsiyonel — havale onayı gibi elle tahsilat teyidi için kullanılır (pending → paid).
Sipariş oluştur
Kendi sisteminizde (pazaryeri, telefon siparişi vb.) oluşan bir siparişi Winkwop'a aktarmak için. Ödeme/checkout akışını atlar — sipariş doğrudan belirttiğiniz durumla oluşturulur, kart tahsilatı yapmaz.
bash
curl -X POST https://api.winkwop.com/api/v1/integration/orders \
-H "X-Api-Key: wk_sk_..." \
-H "Content-Type: application/json" \
-d '{
"customer_id": "c9a2...-uuid",
"total_amount": 399.80,
"payment_status": "paid",
"status": "processing",
"items": [
{ "product_id": "b3f5...-uuid", "quantity": 2, "unit_price": 199.90 }
]
}'customer_id zorunlu — önce müşteri oluşturun ya da mevcut müşteriyi eşleştirin. items[].product_id mağazanızda kayıtlı bir ürüne ait olmalı.