POST /customer — Müşteri Bilgisi Güncelleme
📋 Genel Bilgi
Müşterinin temel bilgilerini (isim, email) ve özel verilerini (customerData) günceller.
Base URL: {{url}}/customer
Method: POST
Content-Type: application/json
🔐 Headers
| Header | Value |
|---|---|
| Authorization | Bearer {{masked_jwt_0}} |
| Content-Type | application/json |
📥 Request Body
{
"msisdn": "{{customer_msisdn}}",
"firstName": "{{customer_fullName}}",
"lastName": "{{customer_lastName}}",
"email": "{{customer_email}}",
"customerData": {
"vip": true
}
}
Parametreler
| Alan | Tip | Zorunlu | Açıklama | Örnek |
|---|---|---|---|---|
msisdn | string | ✅ | Müşteri telefon numarası | "{{customer_msisdn}}" |
firstName | string | ❌ | Müşteri adı | "{{customer_fullName}}" |
lastName | string | ❌ | Müşteri soyadı | "{{customer_lastName}}" |
email | string | ❌ | Müşteri e-posta | "{{customer_email}}" |
customerData | object | ❌ | Özel müşteri verileri (VIP, sadakat vb.) | - |
✅ Response — 200 OK
{}
Açıklama
- Güncelleme başarılı olduğunda boş JSON döner.
- Hata durumunda HTTP 4xx/5xx ve hata mesajı döner.
❌ Error Responses
Tüm hata yanıtları aşağıdaki formatta döner:
{
"Response": {
"code": 1002,
"description": "Customer phone number cannot be empty"
},
"Success": false
}
| HTTP | code | Enum | description | Ne Zaman Oluşur |
|---|---|---|---|---|
| 400 | 1002 | CustomerMsisdnEmpty | Customer phone number cannot be empty | msisdn alanı boş gönderildi |
| 404 | 1003 | CustomerNotFound | Customer not found | Gönderilen msisdn'e (şifrelenmiş hâliyle) karşılık gelen bir müşteri kaydı bulunamadı |
Örnek — 400 Missing MSISDN
{
"Response": {
"code": 1002,
"description": "Customer phone number cannot be empty"
},
"Success": false
}
Örnek — 404 Customer Not Found
{
"Response": {
"code": 1003,
"description": "Customer not found"
},
"Success": false
}
📝 Notlar
customerDataalanına istediğiniz custom verileri ekleyebilirsiniz (VIP, sadakat puanı vb.).- Güncelleme işlemi anlık olarak yansır.
- Aynı
msisdnile birden fazla güncelleme yapılabilir. - Hata response'larındaki
codealanıAppErrorenum'undaki uygulama-içi hata kodudur (Response.code); tüm hata gövdesiResponseadlı bir alt obje içinde döner, en dışta ayrıcaSuccess: falsealanı bulunur.