Yetkilendirme
Basit Kargo API'lerini kullanmak için, öncelikle panelden giriş yaparak ayarlar sayfasından API Token üretmeniz gerekiyor. İsteklerinizde "Authorization" başlığı içinde "Bearer" tokeni olarak belirtmeniz gerekmektedir.
Örnek:
Authorization: Bearer {token}
Aktif Kargo Firmalarını Listeleme
Aktif kargo firmalarının listesini görüntülemek için, bu servisi kullanabilirsiniz.
Servis örnek Cevap
[
{
"name": "MNG Kargo",
"code": "MNG",
"logo": "https://cdn.basitkargo.com/logo/mng.png"
},
{
"name": "Yurtiçi Kargo",
"code": "YURTICI",
"logo": "https://cdn.basitkargo.com/logo/yurtici.png"
}
]
Kargo Bilgisi Ekleme
Kargo bilgilerinizi eklemek ve daha sonra kargo kodu oluşturmak için, bu servisi kullanabilirsiniz.
Servis Örnek İstek (Payload)
{
"content": {
"name": "Test Ürün",
"code": "#123456",
"packages": [
{
"height": 10,
"width": 15,
"depth": 5,
"weight": 1
}
]
},
"client": {
"name": "Test Alıcı",
"phone": "5555555555",
"city": "İstanbul",
"town": "Kadıköy",
"address": "Koşuyolu Mah."
}
}
Servis Örnek Cevap
{
"id": "888-6AR-OUP",
"barcode": null,
"type": "OUTGOING",
"status": "NEW",
"validationFailed": false,
"validationFailedMessage": null,
"createdTime": "2023-01-01T15:41:47.7553603",
"updatedTime": "2023-01-01T15:41:47.7633629",
"content": {
"name": "Test Ürün",
"code": "#123456",
"packages": [
{
"height": 10,
"width": 15,
"depth": 5,
"weight": 1,
"kgDesi": 1
}
],
"totalDesiKg": 1
},
"sender": {
"name": "Gönderici Adı",
"phone": "4444444444"
},
"recipient": {
"name": "Test Alıcı",
"phone": "5555555555",
"city": "İstanbul",
"town": "Kadıköy",
"address": "Koşuyolu Mah."
},
"shipmentInfo": {
"handler": null,
"handlerShipmentCode": null,
"handlerShipmentTrackingLink": "",
"handlerDesi": null,
"lastState": null,
"shippedTime": null,
"deliveredTime": null
},
"priceInfo": {
"paymentMethod": "ADVANCE",
"shipmentFee": 0,
"extraFee": null,
"totalCost": 0
},
"traces": []
}
Kargo Bilgisi Ekleme Ve Kargo Kodu Alma
Kargo bilgilerinizi eklemek ve belirttiğiniz kargo firması için kargo kodu almak için bu servisi kullanabilirsiniz.
Servis Örnek İstek (Payload)
{
"handlerCode": "MNG",
"content": {
"name": "Test Ürün",
"code": "#123456",
"packages": [
{
"height": "10",
"width": "15",
"depth": "5",
"weight": "1"
}
]
},
"client": {
"name": "Test Alıcı",
"phone": "5555555555",
"city": "İstanbul",
"town": "Kadıköy",
"address": "Koşuyolu Mah."
}
}
Servis Örnek Cevap
{
"id": "999-UA7-DEI",
"barcode": "1234567890",
"type": "OUTGOING",
"status": "READY_TO_SHIP",
"validationFailed": false,
"validationFailedMessage": null,
"createdTime": "2023-02-01T15:52:14.0849441",
"updatedTime": "2023-02-01T15:52:14.1609697",
"content": {
"name": "Test Ürün",
"code": "#123456",
"packages": [
{
"height": 10,
"width": 15,
"depth": 5,
"weight": 1,
"kgDesi": 1
}
],
"totalDesiKg": 1
},
"sender": {
"name": "Gönderici Adı",
"phone": "4444444444"
},
"recipient": {
"name": "Test Alıcı",
"phone": "5555555555",
"city": "İstanbul",
"town": "Kadıköy",
"address": "Koşuyolu Mah."
},
"shipmentInfo": {
"handler": {
"name": "MNG Kargo",
"code": "MNG",
"logo": "mng.png"
},
"handlerShipmentCode": null,
"handlerShipmentTrackingLink": "",
"handlerDesi": null,
"lastState": null,
"shippedTime": null,
"deliveredTime": null
},
"priceInfo": {
"paymentMethod": "ADVANCE",
"shipmentFee": 41.99,
"extraFee": null,
"totalCost": 41.99
},
"traces": []
}
Kargo Bilgisi Sorgulama (ID ile)
Bu servisi kullanarak kargo bilgisi ekleyebilir ve servis içinde gönderdiğiniz kargo firması için kargo kodu alabilirsiniz.
Servis Örnek Cevap
{
"id": "101-DM2-XYD",
"barcode": "1234567890",
"type": "OUTGOING",
"status": "COMPLETED",
"validationFailed": false,
"validationFailedMessage": "",
"createdTime": "2022-07-28T20:01:21",
"updatedTime": "2022-08-14T18:12:24",
"content": {
"name": "Ekran Kartı",
"code": "#123456",
"packages": [
{
"height": 25,
"width": 10,
"depth": 20,
"weight": 1,
"kgDesi": 2
}
],
"totalDesiKg": 2.00
},
"sender": {
"name": "Gönderici Adı",
"phone": "4444444444"
},
"recipient": {
"name": "Alıcı Adı",
"phone": "5555555555",
"city": "Yalova",
"town": "Merkez",
"address": "açık adres"
},
"shipmentInfo": {
"handler": {
"name": "MNG Kargo",
"code": "MNG",
"logo": "mng.png"
},
"handlerShipmentCode": "1234567890",
"handlerShipmentTrackingLink": "https://kargotakip.mngkargo.com.tr/?takipNo=1234567890",
"handlerDesi": 5.00,
"lastState": "Teslim Edildi",
"shippedTime": "2022-07-28T20:01:21",
"deliveredTime": null
},
"priceInfo": {
"paymentMethod": "ADVANCE",
"shipmentFee": 29.93,
"extraFee": null,
"totalCost": 29.93
},
"traces": [
{
"status": "Teslim Edildi",
"time": "2022-08-17T18:10:10",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Gönderi Adresinize Yönlendirildi",
"time": "2022-08-17T12:37:35",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Gönderi Varış Birimine Ulaştı",
"time": "2022-08-17T09:46:43",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-17T09:46:42",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-17T01:47:28",
"location": "BURSA",
"locationDetail": "BURSA AKTARMA"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-16T21:07:04",
"location": "İSTANBUL",
"locationDetail": "MARMARA AKTARMA"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-16T15:14:19",
"location": "İSTANBUL (KADIKÖY)",
"locationDetail": "HASANPAŞA Şube"
},
{
"status": "Gönderi Hazırlandı",
"time": "2022-08-16T09:53:09",
"location": "İSTANBUL (KADIKÖY)",
"locationDetail": "HASANPAŞA Şube"
}
]
}
Kargo Bilgisi Sorgulama (Barkod No ile)
Bu servisi kullanarak kargo bilgisi ekleyebilir ve servis içinde gönderdiğiniz kargo firması için kargo kodu alabilirsiniz.
Servis Örnek Cevap
{
"id": "101-DM2-XYD",
"barcode": "1234567890",
"type": "OUTGOING",
"status": "COMPLETED",
"validationFailed": false,
"validationFailedMessage": "",
"createdTime": "2022-07-28T20:01:21",
"updatedTime": "2022-08-14T18:12:24",
"content": {
"name": "Ekran Kartı",
"code": "#123456",
"packages": [
{
"height": 25,
"width": 10,
"depth": 20,
"weight": 1,
"kgDesi": 2
}
],
"totalDesiKg": 2.00
},
"sender": {
"name": "Gönderici Adı",
"phone": "4444444444"
},
"recipient": {
"name": "Alıcı Adı",
"phone": "5555555555",
"city": "Yalova",
"town": "Merkez",
"address": "açık adres"
},
"shipmentInfo": {
"handler": {
"name": "MNG Kargo",
"code": "MNG",
"logo": "mng.png"
},
"handlerShipmentCode": "1234567890",
"handlerShipmentTrackingLink": "https://kargotakip.mngkargo.com.tr/?takipNo=1234567890",
"handlerDesi": 5.00,
"lastState": "Teslim Edildi",
"shippedTime": "2022-07-28T20:01:21",
"deliveredTime": null
},
"priceInfo": {
"paymentMethod": "ADVANCE",
"shipmentFee": 29.93,
"extraFee": null,
"totalCost": 29.93
},
"traces": [
{
"status": "Teslim Edildi",
"time": "2022-08-17T18:10:10",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Gönderi Adresinize Yönlendirildi",
"time": "2022-08-17T12:37:35",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Gönderi Varış Birimine Ulaştı",
"time": "2022-08-17T09:46:43",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-17T09:46:42",
"location": "YALOVA (MERKEZ)",
"locationDetail": "MİMOZA Şube"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-17T01:47:28",
"location": "BURSA",
"locationDetail": "BURSA AKTARMA"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-16T21:07:04",
"location": "İSTANBUL",
"locationDetail": "MARMARA AKTARMA"
},
{
"status": "Transfer Aşamasında",
"time": "2022-08-16T15:14:19",
"location": "İSTANBUL (KADIKÖY)",
"locationDetail": "HASANPAŞA Şube"
},
{
"status": "Gönderi Hazırlandı",
"time": "2022-08-16T09:53:09",
"location": "İSTANBUL (KADIKÖY)",
"locationDetail": "HASANPAŞA Şube"
}
]
}
Kargo Barkod İptal Etme (Barkod No ile)
Bu servisi kullanarak kargo şubesine teslim edilmemiş kargoları iptal edebilirsiniz.
Desi/Kg Bilgisi İle Fiyat Listeleme
Bu servis ile desi/kg bilgisi kullanarak fiyat bilgilerini listeleyebilirsiniz.
Servis örnek Cevap
[
{
"desiKg": 5,
"handlerCode": "MNG",
"price": 25.54
},
{
"desiKg": 5,
"handlerCode": "YURTICI",
"price": 25.54
}
]
Paket Bilgileri İle Fiyat Listeleme
Bu servis ile kargo paket bilgilerini kullanarak fiyat bilgilerini listeleyebilirsiniz.
Servis Örnek İstek (Payload)
[
{
"height": "10",
"width": "15",
"depth": "5",
"weight": "1"
}
]
Servis örnek Cevap
[
{
"desiKg": 1,
"handlerCode": "MNG",
"price": 15.54
},
{
"desiKg": 1,
"handlerCode": "YURTICI",
"price": 15.54
}
]