POST /store/{store-code}/terminal/{terminal-code} — Terminal Güncelleme
📋 Genel Bilgi
Mevcut bir terminalin bilgilerini günceller. Terminal kodu path parametre olarak gönderilir.
Base URL: {{url}}/store/{{store_code}}/terminal/{{terminal_code}}
Method: POST
Content-Type: application/json
🔐 Headers
| Header | Value |
|---|---|
| Authorization | Bearer {{masked_jwt_5}} |
| Content-Type | application/json |
📥 URL Parametreleri
| Parametre | Tip | Açıklama | Örnek |
|---|---|---|---|
store-code | string | Mağaza kodu (path param) | "mobildev-mq" |
terminal-code | string | Terminal kodu (path param) | "TERM-001" |
📥 Request Body
{
"name": "Terminal 1 Updated",
"code": "TERM-001",
"status": "active"
}
Parametreler
| Alan | Tip | Zorunlu | Açıklama | Örnek |
|---|---|---|---|---|
name | string | ❌ | Terminal adı | "Terminal 1 Updated" |
code | string | ❌ | Benzersiz terminal kodu | "TERM-001" |
status | string | ❌ | Durum (active, inactive) | "active" |
✅ Response — 200 OK
{
"terminalKey": "t5ufKwlji"
}
Response Alanları
| Alan | Tip | Açıklama |
|---|---|---|
terminalKey | string | Güncellenen terminal benzersiz anahtarı |
❌ Error Responses
Tüm hata yanıtları aşağıdaki formatta döner:
{
"Response": {
"code": 3008,
"description": "Invalid terminal ID"
},
"Success": false
}
| HTTP | code | Enum | description | Ne Zaman Oluşur |
|---|---|---|---|---|
| 404 | 3006 | StoreTerminalIdInvalid | Invalid terminal ID | storeId + terminal-code kombinasyonuna karşılık gelen bir terminal kaydı bulunamadı |
| 409 | 3005 | StoreTerminalCodeExists | A terminal with this code already exists | code değiştirilmiş ve yeni kod, aynı mağazada zaten kayıtlı başka bir terminalde kullanılıyor (code değişmemişse bu kontrol hiç çalışmaz) |
| 500 | 3010 | StoreTerminalUpdateError | An error occurred while updating the terminal | UPDATE sorgusu veritabanı seviyesinde başarısız olduğunda fırlatılır |
Örnek — 404 Terminal Not Found
{
"Response": {
"code": 3006,
"description": "Invalid terminal ID"
},
"Success": false
}
Örnek — 409 Terminal Code Exists
{
"Response": {
"code": 3005,
"description": "A terminal with this code already exists"
},
"Success": false
}
Örnek — 500 Terminal Update Error
{
"Response": {
"code": 3010,
"description": "An error occurred while updating the terminal"
},
"Success": false
}
📝 Notlar
- Tüm alanlar opsiyoneldir. Sadece güncellenmek istenen alanlar gönderilir.
codedeğiştirilirse benzersizlik kontrolü yapılır.status: inactive→ Terminal pasif, işlem yapılamaz.- 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.