Bu endpoint, Yeni bir taslak sevkiyat oluşturulmasını sağlar.
{{BASE_URL}}/api/v1/consignments/draftPOSTapplication/jsonAPIKEY| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
preference |
Integer | OPSİYONEL | Kargo sağlayıcı Tercihi. Kullanılabilir Değerler |
provider_id |
Integer | PREFERENCE 0 İSE ZORUNLU | Kargo sağlayıcı ID'si. Kullanılabilir Değerler |
specific_shipping_method |
String (MAX 255) | OPSİYONEL | Sağlayıcı Gönderim Methodu.Kullanılabilir Değerler |
address_resolver_type |
Integer | OPSİYONEL | Adres çözümleme türü Kullanılabilir Değerler |
reference_no |
String (MAX 255) | OPSİYONEL | Referans numarası |
invoice_number |
String (MAX 255) | OPSİYONEL | Fatura numarası |
generate_provider_barcode |
Bool | OPSİYONEL | Sıralı barkod aralığı kullanan sağlayıcılarda geçerlidir. True ise, sistem bir sonraki uygun barkodu otomatik atar. Varsayılan: False. |
specific_provider_barcode |
String (MAX 255) | OPSİYONEL | Sıralı barkod aralığı kullanan sağlayıcılarda geçerlidir. Kendi belirlediğiniz özel barkodu tanımlamak için kullanılır. Otomatik atama yapılmaz. |
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
consignor.name |
String (MAX 255) | OPSİYONEL | Gönderen adı |
consignor.attention_name |
String (MAX 255) | OPSİYONEL | Gönderici diğer ad |
consignor.country |
String (2-3 KARAKTER) | OPSİYONEL | Ülke kodu (ISO2 veya ISO3 formatında) |
consignor.state |
String (MAX 100) | OPSİYONEL | İl/Eyalet |
consignor.city |
String (MAX 100) | OPSİYONEL | İlçe |
consignor.postal_code |
String (MAX 30) | OPSİYONEL | Posta kodu |
consignor.address |
String (MAX 1000) | OPSİYONEL | Tam adres |
consignor.phone_number |
String (MAX 20) | OPSİYONEL | Telefon numarası |
consignor.email |
String (MAX 255) | OPSİYONEL | E-posta adresi |
consignor.state_code |
String (MAX 255) | KOŞULLU | State Kodu, ÜLKE (USA, CAN, IRL) ise KOŞULLU GEREKLİLİĞE SAHİP |
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
consignee.name |
String (MAX 255) | OPSİYONEL | Alıcı adı |
consignee.attention_name |
String (MAX 255) | OPSİYONEL | Alıcı diğer ad |
consignee.country |
String (2-3 KARAKTER) | OPSİYONEL | Ülke kodu (ISO2 veya ISO3 formatında) |
consignee.state |
String (MAX 100) | OPSİYONEL | İl/Eyalet |
consignee.city |
String (MAX 100) | OPSİYONEL | İlçe |
consignee.postal_code |
String (MAX 30) | OPSİYONEL | Posta kodu |
consignee.address |
String (MAX 1000) | OPSİYONEL | Tam adres |
consignee.phone_number |
String (MAX 20) | OPSİYONEL | Telefon numarası |
consignee.email |
String (MAX 255) | OPSİYONEL | E-posta adresi |
consignee.state_code |
String (MAX 255) | KOŞULLU | State Kodu, ÜLKE (USA, CAN, IRL) ise KOŞULLU GEREKLİLİĞE SAHİP |
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
invoice.name |
String (MAX 255) | OPSİYONEL | Fatura sahibi adı |
invoice.tax_number |
String (MAX 255) | OPSİYONEL | Vergi numarası |
invoice.tax_office |
String (MAX 255) | OPSİYONEL | Vergi dairesi |
invoice.email |
String (MAX 255) | OPSİYONEL | E-posta adresi |
invoice.country |
String (2-3 KARAKTER) | OPSİYONEL | Ülke kodu (ISO2 veya ISO3 formatında) |
invoice.state |
String (MAX 100) | OPSİYONEL | İl/Eyalet |
invoice.city |
String (MAX 100) | OPSİYONEL | İlçe |
invoice.address |
String (MAX 1000) | OPSİYONEL | Tam adres |
invoice.phone_number |
String (MAX 20) | OPSİYONEL | Telefon numarası |
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
packages.package_type |
Integer | OPSİYONEL | Paket türü Kullanılabilir Değerler |
packages.provider_packaging_type |
Integer | OPSİYONEL | Sağlayıcı Özel Paketleme türü Kullanılabilir Değerler |
packages.post_type |
Integer | OPSİYONEL | Gönderi türü Kullanılabilir Değerler |
packages.quantity |
Integer | OPSİYONEL | Paket adedi |
packages.weight |
Float | OPSİYONEL | Paket ağırlığı (kg) |
packages.length |
Float | OPSİYONEL | Paket uzunluğu (cm) |
packages.width |
Float | OPSİYONEL | Paket genişliği (cm) |
packages.height |
Float | OPSİYONEL | Paket yüksekliği (cm) |
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
packages.items.description |
String (MAX 255) | OPSİYONEL | Ürün açıklaması |
packages.items.origin |
String (2-3 KARAKTER) | OPSİYONEL | Menşei ülke |
packages.items.currency_code |
String (3 KARAKTER) | OPSİYONEL | Para birimi ISO2 kodu (örn. USD) |
packages.items.unit_price |
Float | OPSİYONEL | Birim fiyat |
packages.items.quantity |
Integer | OPSİYONEL | Miktar |
packages.items.category |
String (MAX 255) | OPSİYONEL | Kategori |
Bu alan tamamen opsiyonel olup, gönderiniz döküman içermeyecek ise kullanılmamalıdır.
Gönderimden önce Döküman Yüklemesi gerekmektedir , Bu işlem için şu dökümanı inceleyiniz: Gönderi Döküman Yükleme API.
Not: Sadece bazı providerlar Dijital Döküman Gönderimini desteklemektedir. Provider ve Kullanılabilir Döküman gönderimi bilgisi için iletişime geçiniz
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
documents.id |
Integer | ZORUNLU | Daha önce yüklenmiş döküman ID’si |
{
//diğer gönderi parametreleri...
"documents": [
{
"id": 4617
}
],
//diğer gönderi parametreleri...
Bu alan tamamen opsiyonel olup, gönderiniz Ek Hizmet içermiyor ise kullanılmamalıdır.
Sistemde yer alan Ek Hizmet Tiplerine ve Detay parametreleri hakkında daha fazla bilgi için şu dökümanı mutlaka inceleyiniz Ek Hizmetler
Not: Sadece bazı Providerlar Ek Hizmetleri desteklemektedir. Provider ve Kullanılabilir Ek hizmet bilgisi için iletişime geçiniz
| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
special_services.service_type |
String | ZORUNLU | Hizmet tipi (örn. CASH_ON_DELIVERY, HOLD_AT_DEPARTMENT) |
special_services.details.$dinamik |
Dinamik | KOŞULLU | Her hizmet tipi için dinamik parametreler olabilmektedir. Detaylı bilgi için Ek Hizmetler |
{
//diğer gönderi parametreleri...
"special_services": [
{
"service_type": "CASH_ON_DELIVERY",
"details": {
"method": "CASH",
"amount": 134.52,
"accountNumber": "12312312"
}
},
{
"service_type": "HOLD_AT_DEPARTMENT"
}
],
//diğer gönderi parametreleri...
}
Aşağıda, API isteği için bir örnek JSON verisi bulunmaktadır. Bu örnekte Normalde Sevkiyat Oluşturma verisinde istenen bazı alanlar sonra belirlenmek üzere hiç gönderilmemiştir. (package, items vs.) Sadece Gönderici Alıcı bilgileri girilmiştir.
POST {{BASE_URL}}/api/v1/consignments/draft
Content-Type: application/json
Authorization: APIKEY {{APIKEY}}
{
"provider_id": 7,
"preference": 0,
"incoterms_type": 1, //1=DDP,2=DDU
"consignor": {
"name": "XYZ COMP",
"attention_name": "XYZ COMP",
"country": "TUR",
"state": "İstanbul",
"city": "Kadıköy",
"postal_code": "34758",
"address": "istanbul",
"phone_number": "2122512222",
"email": "admin@comtohome.com"
},
"consignee": {
"name": "Clonberg Duates",
"attention_name": "Clonberg Duates",
"country": "DEU",
"state": "Hamburg",
"city": "Altona",
"postal_code": "16909",
"address": "example address .",
"phone_number": "09606468625",
"email": "testConsignee@comtohome.com"
}
}
Başarılı bir istekte, API aşağıdaki gibi bir yanıt döndürecektir:
{
"status": true,
"message": "Draft consignment created",
"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": 0,
"desi": 0,
"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": [],
"documents": [],
"labels": [],
"created_at": "2025-05-07 18:14:45",
"updated_at": "2025-05-07 18:14:45",
"consignment_type": 2,
"incoterms_type": 1,
"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."
}
]
}