T-SOFT/Admin API/Müşteriler

Müşteriler

Kapsam: müşteri ve adresleri okumak 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üşteri verisini yalnız uygulamanızın işi için saklayın, uygulama kaldırıldığında silin. Müşteri silme uçları uygulamalara açık değildir.

Müşteriler

UçMetotKapsam
customer/customersGETread_customers
customer/customersPOSTwrite_customers
customer/customers/{id}GET, PATCHread_customers / write_customers
GET /customer/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'
AlanAçıklama
firstName, lastNameAd ve soyad
emailE-posta (mağazada tekil)
mobilePhone, phoneTelefonlar
groupIdMüşteri grubu (Müşteri grupları)
wsAccountCodeEntegrasyon (cari) kodu; verilmezse T<id> atanır
companyFirma adı
acceptsEmail, acceptsSmsTicari ileti izni
acceptsKvkkKVKK onayı (salt okunur)
countryCode, cityCode, townCode, districtCodeKonum kodları
createdAt, lastLoginAtKayı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

POST /customer/customers
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).

AlanAçıklama
customerIdMüşteri
titleAdres başlığı (Ev, İş)
fullName, mobilePhoneAlıcı
address, postCodeAçık adres ve posta kodu
countryCode, cityCode, townCode, districtCodeKonum kodları
isCompanyActive, company, taxOffice, taxNumberKurumsal fatura bilgisi
identityNumberT.C. kimlik no
isDefaultInvoiceVarsayı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.

AlanAçıklama
customerId, customerName, customerSurname, customerEmail, customerMobilePhoneMüşteri
productId, subProductId, productNameÜrün ve varyant
countAdet
updatedAtSepetin son değiştiği zaman

Filtreler: customerId, productName.