Sipariş Oluşturma (Internal API)
Bu endpoint, kendi sistemlerinizden (POS, portal vb.) doğrudan sipariş oluşturmak için kullanılır.
Endpoint
POST /internal/orders/new HTTP/1.1
Host: stage.pos.muditakurye.com.tr
Content-Type: application/json
X-Internal-Api-Key: <your-key>
X-Platform: YEMEK_POS
İstek Gövdesi
{
"providerOrderId": "pos-order-001",
"providerRestaurantId": "rest-001",
"customerName": "Mehmet Demir",
"customerPhone": "05551234567",
"customerAddress": "Barbaros Mah. İstiklal Cad. No:42",
"customerAddressDetail": "4. Kat Daire 8",
"latitude": 41.0082,
"longitude": 28.9784,
"totalAmount": 180.00,
"discountAmount": 0,
"deliveryFee": 15.00,
"paymentMethod": "CASH",
"note": "Kapıda nakit ödeme",
"isPickup": false,
"items": [
{
"name": "Adana Kebap",
"quantity": 2,
"unitPrice": 65.00,
"totalPrice": 130.00,
"options": [
{ "name": "Acılı", "price": 0 }
]
},
{
"name": "Ayran",
"quantity": 2,
"unitPrice": 15.00,
"totalPrice": 30.00,
"options": []
}
]
}
Alan Detayları
| Alan |
Tip |
Zorunlu |
Açıklama |
providerOrderId |
string |
✅ |
Sizin sisteminizdeki sipariş ID'si |
providerRestaurantId |
string |
✅ |
Entegrasyondaki restoran ID'si |
customerName |
string |
❌ |
Müşteri adı |
customerPhone |
string |
❌ |
Müşteri telefonu |
customerAddress |
string |
❌ |
Teslimat adresi |
latitude / longitude |
float |
❌ |
Koordinatlar |
totalAmount |
float |
❌ |
Toplam tutar |
paymentMethod |
string |
❌ |
CASH, ONLINE, CREDIT_CARD |
note |
string |
❌ |
Sipariş notu |
isPickup |
bool |
❌ |
Gel-al? (default: false) |
items |
array |
❌ |
Sipariş kalemleri |
| Değer |
Açıklama |
YEMEK_POS |
YemekPOS uygulamasından |
ADISYO |
Adisyo POS'tan |
PORTAL |
Web portaldan |
THIRD_PARTY |
3. parti entegrasyon |
Yanıtlar
Başarılı (201)
{
"status": "accepted",
"orderId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
Entegrasyon Bulunamadı (200)
{
"status": "ignored",
"reason": "no active integration"
}
Mükerrer Sipariş (200)
{
"status": "duplicate"
}
Hata (400/500)
{
"error": "failed to parse order"
}