Müşteriler
read_customers, oluşturmak ve güncellemek write_customers; gruplar read_customer_groups / write_customer_groups; sepetler read_carts. Müşteri ve sepet kapsamları kişisel veri içerdiği için onay ekranında hassas olarak işaretlenir. read_customers siparişlerdeki müşteri adını, e-postasını, telefonunu ve adresini de açar; yalnız siparişteki bu bilgilere ihtiyacınız varsa daha dar olan read_customer_personal_data kapsamını isteyin.Müşteriler
| Uç | Metot | Kapsam |
|---|---|---|
customer/customers | GET | read_customers |
customer/customers | POST | write_customers |
customer/customers/{id} | GET, PATCH | read_customers / write_customers |
curl 'https://magaza.com/api/v3/admin/2026-01/customer/customers?filter[email]=ayse@example.com' \
-H 'Authorization: Bearer <access_token>' \
-H 'Accept: application/vnd.api+json'
| Alan | Açıklama |
|---|---|
firstName, lastName | Ad ve soyad |
email | E-posta (mağazada tekil) |
mobilePhone, phone | Telefonlar |
groupId | Müşteri grubu (Müşteri grupları) |
wsAccountCode | Entegrasyon (cari) kodu; verilmezse T<id> atanır |
company | Firma adı |
acceptsEmail, acceptsSms | Ticari ileti izni |
acceptsKvkk | KVKK onayı (salt okunur) |
countryCode, cityCode, townCode, districtCode | Konum kodları |
createdAt, lastLoginAt | Kayıt ve son giriş zamanı |
Filtreler: id, email, segmentId, createdAt, loginCount, orderCount, phoneVerified. Sıralama: firstName, lastName, email, createdAt, lastLoginAt. İlişki: orders.
Müşteri oluşturma
curl -X POST 'https://magaza.com/api/v3/admin/2026-01/customer/customers' \
-H 'Authorization: Bearer <access_token>' \
-H 'Accept: application/vnd.api+json' \
-H 'Content-Type: application/vnd.api+json' \
-d '{"data": {"type": "customers", "attributes": {"firstName": "Ayşe", "lastName": "Yılmaz", "email": "ayse@example.com", "password": "<en az 6 karakter>", "groupId": 1}}}'
firstName, lastName, email, password ve groupId zorunludur. Aynı e-postayla ikinci kayıt 422 döner.
Adresler
customer/customer-addresses: okuma read_customers, yazma write_customers. Listeleme müşteri filtresi ister (filter[customerId]=318).
| Alan | Açıklama |
|---|---|
customerId | Müşteri |
title | Adres başlığı (Ev, İş) |
fullName, mobilePhone | Alıcı |
address, postCode | Açık adres ve posta kodu |
countryCode, cityCode, townCode, districtCode | Konum kodları |
isCompanyActive, company, taxOffice, taxNumber | Kurumsal fatura bilgisi |
identityNumber | T.C. kimlik no |
isDefaultInvoice | Varsayılan fatura adresi |
Müşteri grupları
customer/customer-groups: okuma read_customer_groups, yazma write_customer_groups. Alanlar: name, isVendor (bayi grubu), wsCustomerGroupCode. Filtreler: id, name, isVendor.
Sepetler
customer/carts (yalnız listeleme, read_carts). Müşterilerin sepetindeki ürünler; terk edilmiş sepet hatırlatması yapan uygulamalar içindir. Her kayıt bir sepet satırıdır.
| Alan | Açıklama |
|---|---|
customerId, customerName, customerSurname, customerEmail, customerMobilePhone | Müşteri |
productId, subProductId, productName | Ürün ve varyant |
count | Adet |
updatedAt | Sepetin son değiştiği zaman |
Filtreler: customerId, productName.