Bu endpoint, Varolan bir taslak sevkiyat üzerinde güncelleme/düzenleme yapılmasını sağlar. Bu süreçte taslak sevkiyat halen taslak aşamasındadır herhangi bir işleme alınmaz.
{{BASE_URL}}/api/v1/consignments/draft/{draft_consignment_id}PUTapplication/jsonAPIKEY| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
draft_consignment_id |
Integer | ZORUNLU | Daha önce oluşturulmuş TASLAK SEVKİYAT ID numarası |
Taslak Sevkiyat Oluştur dökümanında bulunan tüm parametreleri kullanabilirsiniz.Aşağıda, API isteği için bir örnek JSON verisi bulunmaktadır. Bu örnekte önceden oluşturulan Taslak Sevkiyata, Gövde Parametreleri kullanılarak olmayan veriler(paket bilgileri) doldurulmuş/güncellenmiştir.
PUT {{BASE_URL}}/api/v1/consignments/draft/242
Content-Type: application/json
Authorization: APIKEY {{APIKEY}}
{
"package": {
"package_type": 1,
//"provider_packaging_type":"FEDEX_BOX_10KG",
"post_type": 4,
"quantity": 1,
"weight": 2,
"length": 15,
"width": 15,
"height": 15,
"dangerous_goods": false,
"items": [
{
"description": "Bosch Kahve makinesi",
"gtip": "12345678901",
"origin": "TR",
"currency_code": "USD",
"quantity": 1,
"category": "Beyaz eşya",
"unit_price": 200
}
]
}
}
Başarılı bir istekte, API aşağıdaki gibi bir yanıt döndürecektir:
{
"status": true,
"message": "Draft consignment updated",
"data": {
"specific_provider_barcode": null,
"id": 242,
"provider_id": 7,
"preference": 0,
"uuid": "aa203bc1-c2f0-46c3-a635-f59abccd1c4a",
"barcode": null,
"reference_no": null,
"invoice_number": null,
"status": 24,
"status_message": "New draft",
"weight": 2,
"desi": 0.68,
"consignor": {
"name": "XYZ COMP",
"attention_name": "XYZ COMP",
"country": "Turkey",
"country_iso3": "TUR",
"state": "İstanbul",
"city": "Kadıköy",
"address": "istanbul",
"postal_code": "34758",
"phone": "2122512222",
"email": "admin@comtohome.com"
},
"consignee": {
"name": "Clonberg Duates",
"attention_name": "Clonberg Duates",
"country": "Germany",
"country_iso3": "DEU",
"state": "Hamburg",
"city": "Altona",
"address": "example address .",
"postal_code": "16909",
"phone": "09606468625",
"email": "testConsignee@comtohome.com"
},
"warehouse_id": null,
"consignee_id": null,
"details": [],
"packages": [
{
"items": [
{
"description": "Bosch Kahve makinesi",
"gtip": "12345678901",
"origin": "TR",
"currency": "USD",
"unit_price": 200,
"quantity": 1,
"category": "Beyaz eşya",
"id": 204
}
],
"package_type": 1,
"post_type": 4,
"quantity": 1,
"weight": 2,
"width": 15,
"length": 15,
"height": 15,
"id": 238,
"desi": 0.68,
"dangerous_goods": false,
"provider_packaging_type": null
}
],
"documents": [],
"labels": [],
"created_at": "2025-05-07 18:14:45",
"updated_at": "2025-05-07 18:30:06",
"consignment_type": 2,
"incoterms_type": 2,
"special_services": [],
"specific_shipping_method": null
}
}
API isteği başarısız olursa, API aşağıdaki gibi bir hata yanıtı döndürecektir:
{
"status": false,
"errors": [
{
"message": "reference_no:Reference number \"XYZ123\" has already been used. Please provide a unique reference number."
}
]
}