API -> Αναλυτικά στατιστικα επιστροφών

Περιγραφή

Χρησιμοποιείστε την συγκεκριμένη υπηρεσία για να κάνετε λήψη αναλυτικών δεδομένων για παραλήπτες που δεν παρέλαβαν ή αρνήθηκαν να παραλάβουν

Endpoint

POST https://api.v-track.gr/statistics/returns/json.php?f=returns

Authentication

Απαιτούνται τα παρακάτω headers:

Header Περιγραφή
X-Public Το username που σας έχει δοθεί από το dashboard
Authorization Bearer

Τα διαπιστευτήρια εκδίδονται από: https://dashboard.v-track.gr

Παράδειγμα Request


$url = "https://api.v-track.gr/statistics/returns/json.php?f=returns";
$username = "";
$api_key = "";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-Public: ' . $username,
"authorization: Bearer ".$api_key
));

curl_exec($ch);
curl_close($ch);

Παράδειγμα Response


stdClass Object
(
    [rows] => Array
        (
          [0] => stdClass Object
                (
                    [customer] => stdClass Object
                        (
                            [customer] =>  Νικολάου Τάσος
                            [email] => xxxxxx@GMAIL.COM
                            [mobile] => 6979000000
                        )

                    [return] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [voucher] => 5011787223
                                    [finalization_dates] => 2025-06-06 16:43:00
                                    [return_delivery_date] => 2025-06-11 12:47:00
                                    [with_refusal] => 
                                    [invoice_id] => 46fcb79e-4542-78bc-f8eb-01974500b35d
                                    [web_order_id] => 67QJ0321851
                                )

                        )

                    [delivered] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [voucher] => 5010500634
                                    [finalization_dates] => 2025-06-03 17:21:00
                                    [delivered_date] => 2025-06-04 13:29:00
                                    [invoice_id] => 6983a435-e7ef-2fae-b1cf-01973627709f
                                    [web_order_id] => JCPP0320922
                                )

                            [1] => stdClass Object
                                (
                                    [voucher] => 5011333612
                                    [finalization_dates] => 2025-06-05 17:15:00
                                    [delivered_date] => 2025-06-06 12:38:00
                                    [invoice_id] => 93922ae5-0a3c-47b8-a022-01973fe7e1d0
                                    [web_order_id] => PGNW0321749
                                )

                            [2] => stdClass Object
                                (
                                    [voucher] => 5011808724
                                    [finalization_dates] => 2025-06-06 16:42:00
                                    [delivered_date] => 2025-06-09 12:43:00
                                    [invoice_id] => 2bc47916-1b98-8fde-ddc9-0197451959e6
                                    [web_order_id] => 
                                )

                        )

                )
	)
)