POST /store/{store-code}/terminal — Terminal Oluşturma
📋 Genel Bilgi
Belirli bir mağazaya yeni terminal ekler.
Base URL: {{url}}/store/{{store_code}}/terminal
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" |
📥 Request Body
{
"name": "Terminal HQ Terminal",
"code": "TERM-004-hq",
"status": "active"
}
Parametreler
| Alan | Tip | Zorunlu | Açıklama | Örnek |
|---|---|---|---|---|
name | string | ✅ | Terminal adı | "Terminal HQ Terminal" |
code | string | ✅ | Benzersiz terminal kodu | "TERM-004-hq" |
status | string | ❌ | Durum (active, inactive) | "active" |
✅ Response — 200 OK
{
"terminalKey": "UGMQoZ82"
}
Response Alanları
| Alan | Tip | Açıklama |
|---|---|---|
terminalKey | string | Oluşturulan terminal benzersiz anahtarı (8 karakter) |
❌ Error Responses
Tüm hata yanıtları aşağıdaki formatta döner:
{
"Response": {
"code": 3007,
"description": "A terminal with this code already exists"
},
"Success": false
}
| HTTP | code | Enum | description | Ne Zaman Oluşur |
|---|---|---|---|---|
| 409 | 3005 | StoreTerminalCodeExists | A terminal with this code already exists | Gönderilen code, aynı mağazada zaten kayıtlı başka bir terminalde kullanılıyor |
| 500 | 3009 | StoreTerminalCreateError | An error occurred while creating the terminal | INSERT sorgusu veritabanı seviyesinde başarısız olduğunda fırlatılır |
Örnek — 409 Terminal Code Exists
{
"Response": {
"code": 3005,
"description": "A terminal with this code already exists"
},
"Success": false
}
Örnek — 500 Terminal Create Error
{
"Response": {
"code": 3009,
"description": "An error occurred while creating the terminal"
},
"Success": false
}
📝 Notlar
- Terminal kodu benzersiz olmalıdır.
status: active→ Terminal aktif, işlem yapılabilir.status: inactive→ Terminal pasif.- 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.