Bu API, mevcut bir taslak gönderiyi güncellemek için kullanılır. Güncelleme sonrasında taslak hâlâ NEW_DRAFT durumunda kalır ve işleme alınmaz.
| Özellik | Değer |
|---|---|
| URL | {{BASE_URL}}/api/v1/consignments/draft/{draft_consignment_id} |
| HTTP Metodu | PUT |
| İçerik Türü | application/json |
| Kimlik Doğrulama | APIKEY header |
| Senaryo | Açıklama |
|---|---|
| Adres düzeltme | Gönderen veya alıcı adresini güncelleme |
| Paket ekleme | Eksik paket bilgilerini tamamlama |
| Referans güncelleme | Sipariş numarası veya referans değiştirme |
| Provider değiştirme | Farklı kargo firması seçme |
Not: Güncelleme sonrası taslak işlenmez. İşleme almak için Taslak İşle endpoint'ini kullanın.
| Parametre | Tip | Zorunluluk | Açıklama |
|---|---|---|---|
draft_consignment_id |
Integer | ZORUNLU | Taslak gönderi ID'si |
Taslak Gönderi Oluştur sayfasındaki tüm parametreler kullanılabilir.
Kısmi Güncelleme: Sadece güncellemek istediğiniz alanları gönderin. Gönderilmeyen alanlar değişmez.
curl -X PUT "{{BASE_URL}}/api/v1/consignments/draft/242" \
-H "Content-Type: application/json" \
-H "APIKEY: {{APIKEY}}" \
-d '{
"packages": [
{
"package_type": 1,
"post_type": 4,
"weight": 2,
"length": 15,
"width": 15,
"height": 15,
"dangerous_goods": false,
"items": [
{
"description": "Bosch Kahve Makinesi",
"gtip": "851671900000",
"origin": "TR",
"currency_code": "USD",
"quantity": 1,
"unit_price": 200
}
]
}
]
}'
PUT {{BASE_URL}}/api/v1/consignments/draft/242
Content-Type: application/json
APIKEY: {{APIKEY}}
{
"consignee": {
"name": "John Smith",
"address": "456 New Street",
"city": "Munich",
"state": "Bavaria",
"postal_code": "80331"
}
}
PUT {{BASE_URL}}/api/v1/consignments/draft/242
Content-Type: application/json
APIKEY: {{APIKEY}}
{
"reference_no": "ORDER-2024-002-UPDATED"
}
{
"status": true,
"message": "Draft consignment updated",
"data": {
"id": 242,
"uuid": "aa203bc1-c2f0-46c3-a635-f59abccd1c4a",
"provider_id": 7,
"preference": 0,
"barcode": null,
"reference_no": null,
"invoice_number": null,
"status": 24,
"status_message": "New draft",
"weight": 2,
"desi": 0.68,
"consignor": {
"name": "Gönderen Firma A.Ş.",
"country": "Turkey",
"country_iso3": "TUR",
"state": "İstanbul",
"city": "Kadıköy",
"address": "Moda Caddesi No:1",
"postal_code": "34758",
"phone": "+902161234567",
"email": "info@firma.com"
},
"consignee": {
"name": "Hans Mueller",
"country": "Germany",
"country_iso3": "DEU",
"state": "Hamburg",
"city": "Altona",
"address": "Beispielstraße 123",
"postal_code": "22765",
"phone": "+4940123456",
"email": "hans@example.de"
},
"packages": [
{
"id": 238,
"package_type": 1,
"post_type": 4,
"weight": 2,
"width": 15,
"length": 15,
"height": 15,
"desi": 0.68,
"dangerous_goods": false,
"items": [
{
"id": 204,
"description": "Bosch Kahve Makinesi",
"gtip": "851671900000",
"origin": "TR",
"currency": "USD",
"unit_price": 200,
"quantity": 1
}
]
}
],
"documents": [],
"special_services": [],
"consignment_type": 2,
"incoterms_type": 2,
"created_at": "2025-05-07 18:14:45",
"updated_at": "2025-05-07 18:30:06"
}
}
| Alan | Tip | Açıklama |
|---|---|---|
id |
Integer | Taslak gönderi ID'si |
uuid |
String | Taslak gönderi UUID'si |
status |
Integer | Gönderi durumu. Güncelleme sonrası hâlâ 24 |
weight |
Float | Toplam ağırlık (kg) |
desi |
Float | Hesaplanan desi değeri |
packages |
Array | Güncellenmiş paket listesi |
updated_at |
String | Son güncelleme tarihi |
{
"status": false,
"errors": [
{
"message": "reference_no: Reference number \"ORDER-2024-001\" has already been used."
}
]
}
| Hata | Açıklama | Çözüm |
|---|---|---|
Consignment not found |
Taslak bulunamadı | Doğru ID kullanın |
Not in draft status |
Gönderi zaten işlenmiş | Sadece status: 24 taslaklar güncellenebilir |
Reference number has already been used |
Referans numarası mevcut | Benzersiz referans kullanın |
Taslak güncellendikten sonra: