Cancel Post

Method URL Content Type
POST post/cancel application/json

Description

- It is the method used to cancel the post.

Required Headers

Parameter Type Required  Description 
Authorization Bearer yes auth token

Required Parameters

Parameter Type Required  Description 
post_number string yes Post number

Sample Requests

<?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, 
array(
   'X-localization : tr', 
   'Content-Type : application/json',
   'Authorization : Bearer __TOKEN__',
));

$result = curl_exec($ch);

curl_close($ch);

print_r($result);

?>

Sample Responses

{
    "status": true,
    "message": "Post cancelled successfully.",
    "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": "Azerbaycan Kargo",
            "post_type": 1,
            "post_type_name": "Standart Teslimat",
            "cod_payment_type": 0,
            "cod_payment_type_name": "Peşin Ödeme",
            "sender": {
                "name": "Taleh Həsənov",
                "phone": "+994 111 99 09 08",
                "email": "sender@firma.com",
                "address": "42 Neftchilar Ave, 1000",
                "country": "az",
                "city": "Baku",
                "district": "",
                "post_code": ""
                "latitude": "123.456",
                "longitude": "456.789"
            },
            "recipient": {
                "name": "Akife Məmədov",
                "phone": "+994 111 88 11 08",
                "email": "akifememedov@gmail.com",
                "address": "M9C6+5X3, Mirze Abbas Abbaszada, 44491",
                "country": "az",
                "city": "Gence",
                "district": "",
                "post_code": "",
                "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"
        }
    }
}