Tracking
Shipment tracking on Gsped
This endpoint allows you to check the status of a shipment.
It is possible to search for a shipment using one of the following parameters:
id : Shipment ID
ddt_num : Numeric reference of the shipment
ddt_alpha : Alphanumeric reference of the shipment
Please note : You must indicate at least one of the abovementioned parameters.
If the parameters are not unique and if the ddt_num and/or the ddt_alpha are used as parameters, an array with the data of all the shipments corresponding to the used parameters will be shown in the response.
Shows the shipment status
GET https://api.gsped.it/[INSTANCE]/tracking
Path Parameters
id
Integer
Shipment ID
ddt_num
String
Numeric reference of the shipment
ddt_alpha
String
Alphanumeric reference of the shipment
Headers
x-api-key*
String
Apikey given by Gsped
{
    "status_code": 19,
    "status": "CONSEGNATO",
    "delivery_date": "2021-03-30 11:00:00",
    "fid_partenza": 2,
    "num_serie": 1,
    "num_spedizione": "0585596",
    "corriere_id": 1,
    "corriere": "BRT",
    "ddt_num": 18795,
    "ddt_alpha": "100027946",
    "client_id": 1,
    "tracking_link": "https://vas.brt.it/vas/sped_det_show.hsm?nspediz=002010585132",
    "id_gsped": 18795
}{
    "error": "Riferimento spedizione non indicato"
}{
    "status": false,
    "error": "Invalid API key "
}{
    "error": "Spedizione non trovata"
}Example Snippets :
ID calls examples:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.gsped.it/sandbox/tracking?id=18795',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
        'x-api-key: YOUR-API-KEY'
    ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import http.client
conn = http.client.HTTPSConnection("api.gsped.it")
payload = ''
headers = {
  'x-api-key': 'YOUR-API-KEY'
}
conn.request("GET", "/sandbox/tracking?id=jhon", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))phpackage main
import (
  "fmt"
  "net/http"
  "io/ioutil"
)
func main() {
  url := "https://api.gsped.it/sandbox/tracking?id=jhon"
  method := "GET"
  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)
  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("x-api-key", "YOUR-API-KEY")
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()
  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}var clientHandler = new HttpClientHandler
{
    UseCookies = false,
};
var client = new HttpClient(clientHandler);
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://api.gsped.it/sandbox/tracking?id=18795"),
    Headers =
    {
        { "x-api-key", "YOUR-API-KEY" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}curl --location --request GET 'https://api.gsped.it/sandbox/tracking?id=jhon' \
--header 'x-api-key: YOUR-API-KEY'Last updated
