Method | URL | İçerik Türü |
---|---|---|
POST | post/cancel | application/json |
Açıklama
Servise Gönderilmesi gereken zorunlu başlıklar
Parametre ismi | Tip | Zorunluluk | Açıklama |
---|---|---|---|
Authorization | string | evet | auth/login metodundan aldığınız token |
Servise Gönderilmesi gereken parametreler
Parametre ismi | Tip | Zorunluluk | Açıklama |
---|---|---|---|
post_number | string | evet | Oluşan gönderi numarası |
Örnek İstek
<?php
$data = [
"post_number"=>"MFYS29970"
];
$payload = json_encode($data);
$ch = curl_init('__APIURL__/post/cancel');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-localization : tr',
'Content-Type : application/json',
'Authorization : Bearer __TOKEN__',
]);
$result = curl_exec($ch);
curl_close($ch);
print_r($result);
?>
Örnek Servis Cevapları
{
"status": true,
"message": "Gönderi başarıyla iptal edilmiştir.",
"data": {
"post_number": "MFYS29970",
"reference_id": "LDTN64JV124",
"tracking_url": "https://track.carrtell.co/check/MFYS29970",
"barcode_url": "https://barcode.carrtell.co/MFYS29970.pdf",
"post": {
"carrier_id": 4,
"carrier_name": "MNG Kargo",
"post_type": 2,
"post_type_name": "Standart Teslimat",
"cod_payment_type": 0,
"cod_payment_type_name": "Peşin Ödeme",
"sender": {
"name": "John Doe",
"phone": "+90 535 123 45 67",
"email": "sender@firma.com",
"address": "Deneme Mahallesi, Dolmabahçe Caddesi",
"country": "tr",
"city": "İstanbul",
"district": "Ataşehir",
"post_code": null,
"latitude": null,
"longitude": null
},
"recipient": {
"name": "John Doe",
"phone": "+90 535 123 45 67",
"email": "recipient@firma.com",
"address": "Deneme Mahallesi, Ural Sk. No:999",
"country": "tr",
"city": "İstanbul",
"district": "Maltepe",
"post_code": null,
"latitude": null,
"longitude": null
},
"post": {
"desi": 2.2,
"package_count": 1,
"price": null,
"note": null
},
"custom_data_1": null,
"custom_data_2": null,
"custom_data_3": null,
"custom_data_4": null,
"created_at": "2023-06-01 13:39:46",
"updated_at": "2023-06-01 14:06:12"
}
}
}