Skip to content

Müşteriler

Taban adres: https://api.winkwop.com/api/v1/integration/customers İzinler: okuma uçları read_customers, yazma uçları write_customers ister.

Listele

bash
curl https://api.winkwop.com/api/v1/integration/customers \
  -H "X-Api-Key: wk_sk_..."
json
{
  "customers": [
    {
      "id": "c9a2...-uuid",
      "first_name": "Ada",
      "last_name": "Yılmaz",
      "email": "ada@ornek.com",
      "phone": "+905551234567",
      "accepts_marketing": true,
      "tax_exempt": false,
      "total_spent": 1249.5,
      "orders_count": 4
    }
  ]
}

Tek müşteri

bash
curl https://api.winkwop.com/api/v1/integration/customers/{id} \
  -H "X-Api-Key: wk_sk_..."

Oluştur

bash
curl -X POST https://api.winkwop.com/api/v1/integration/customers \
  -H "X-Api-Key: wk_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Ada",
    "last_name": "Yılmaz",
    "email": "ada@ornek.com",
    "phone": "+905551234567",
    "accepts_marketing": false
  }'

first_name ve last_name zorunlu. email verilirse geçerli bir e-posta biçiminde olmalı, aksi hâlde 422 VALIDATION_ERROR döner. addresses alanı serbest JSON kabul eder (adres defteri) — panelin kullandığı şekli birebir taşımak isterseniz mevcut bir müşteriyi okuyup örnek alın.

Güncelle

bash
curl -X PUT https://api.winkwop.com/api/v1/integration/customers/{id} \
  -H "X-Api-Key: wk_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Ada",
    "last_name": "Yılmaz",
    "email": "ada@ornek.com",
    "accepts_marketing": true
  }'

Sil

bash
curl -X DELETE https://api.winkwop.com/api/v1/integration/customers/{id} \
  -H "X-Api-Key: wk_sk_..."

Geçmiş siparişleri olan bir müşteriyi silmek, o siparişlerdeki müşteri referansını kaldırmaz — sipariş kaydı kalır, yalnızca müşteri kartı silinir.

Winkwop tema platformu