Gelen irsaliyeye yanıt verme
Gelen irsaliye için sağlayıcı üzerinden irsaliye yanıtı (teslim alındı bildirimi) göndermek için bu endpoint kullanılır. Her kalem için teslim alınan, eksik, reddedilen ve fazla miktarı bildirirsiniz.
İstek
POST /api/waybills/{id}/receipt
Accept: application/json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Yalnızca gelen irsaliyelere ve bir kez
{id}bir gelen irsaliye olmalıdır; aksi haldeYalnızca gelen irsaliyelere yanıt verilebilir.döner.- Her irsaliyeye yalnızca bir kez yanıt verilebilir.
receipted_atalanı doluysa istekBu irsaliyeye daha önce yanıt verilmiş.mesajıyla reddedilir.
Gövde alanları
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
actual_delivery_date | string | Evet | Fiili teslim tarihi, Y-m-d. |
actual_delivery_time | string | Evet | Fiili teslim saati, H:i. |
note | string | Hayır | Yanıt notu; en fazla 500 karakter. |
lines | array | Evet | En az bir kalem; aşağıya bakın. |
lines[] alanları
Kalemler
line_number ile eşleştirilirHer kalemin line_number değeri, irsaliye detayındaki lines[].line_number ile aynı olmalıdır. Dört miktar alanının dördü de zorunludur; ilgisiz olanlara 0 gönderin.
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
line_number | integer | Evet | İrsaliyedeki kalem sırası. |
received_quantity | number | Evet | Teslim alınan miktar, ≥ 0. |
short_quantity | number | Evet | Eksik gelen miktar, ≥ 0. |
rejected_quantity | number | Evet | Reddedilen miktar, ≥ 0. |
oversupply_quantity | number | Evet | Fazla gelen miktar, ≥ 0. |
reject_reason | string | Hayır | Red nedeni; en fazla 255 karakter. |
Örnek istekler
- 💻 cURL
- 🐘 PHP
- 🟢 Node.js
- 🐍 Python
curl -X POST "https://app.faturaentegrator.com/api/waybills/305/receipt" \
-H "Accept: application/json" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{
"note": "Eksik teslim alındı.",
"actual_delivery_date": "2026-09-30",
"actual_delivery_time": "14:00",
"lines": [
{ "line_number": 1, "received_quantity": 1, "short_quantity": 1, "rejected_quantity": 0, "oversupply_quantity": 0 }
]
}'
<?php
$body = [
'note' => 'Eksik teslim alındı.',
'actual_delivery_date' => '2026-09-30',
'actual_delivery_time' => '14:00',
'lines' => [
['line_number' => 1, 'received_quantity' => 1, 'short_quantity' => 1, 'rejected_quantity' => 0, 'oversupply_quantity' => 0],
],
];
$ch = curl_init('https://app.faturaentegrator.com/api/waybills/305/receipt');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($body),
CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
const res = await fetch('https://app.faturaentegrator.com/api/waybills/305/receipt', {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
note: 'Eksik teslim alındı.',
actual_delivery_date: '2026-09-30',
actual_delivery_time: '14:00',
lines: [
{ line_number: 1, received_quantity: 1, short_quantity: 1, rejected_quantity: 0, oversupply_quantity: 0 },
],
}),
});
const data = await res.json();
import requests
r = requests.post(
'https://app.faturaentegrator.com/api/waybills/305/receipt',
json={
'note': 'Eksik teslim alındı.',
'actual_delivery_date': '2026-09-30',
'actual_delivery_time': '14:00',
'lines': [
{'line_number': 1, 'received_quantity': 1, 'short_quantity': 1, 'rejected_quantity': 0, 'oversupply_quantity': 0}
],
},
headers={'Accept': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'},
)
data = r.json()
Örnek yanıt
Yanıt, irsaliye detayı ile aynı yapıdadır. Gönderilen yanıt belgesinin bilgileri receipt_* alanlarında döner.
{
"data": {
"id": 305,
"direction": "incoming",
"receipt_ettn": "8d2f4a61-0b3c-4e5d-9f7a-6b1c2d3e4f5a",
"receipt_document_number": "IYN2026000000007",
"receipted_at": "2026-09-30T11:02:18.000000Z",
"...": "..."
}
}
Sağlayıcı yanıtı kabul etmezse 422 döner. Mesaj sağlayıcıdan gelir; mesaj yoksa İrsaliye yanıtı gönderilemedi. yazar.