API Documentation
Italiano
Search
K
Comment on page

Shipment by DDT Alpha

Shipment by DDT Alpha - GET

Restituisce le informazioni riguardo a una spedizione insieme alle relative etichette nei formati disponibili esattamente come la Shipment - GET ma utilizzando come parametro per la ricerca il riferimento alfanumerico passato in fase di creazione.
Il Riferimento alfanumerico deve essere univoco per poter utilizzare questo endpoint
In caso l'utente a cui è associata l'apikey gestisca più anagrafiche e ci sia il rischio di sovrapposizione di riferimenti alfanumerici è possibile passare un parametro aggiuntivo client_id valorizzato con l'intero che indica su quale delle anagrafiche andare a filtrare ulteriormente.
La lista dei client_id che gestisce un utente è fornita da Gsped alla fine di ogni configurazione.
get
https://api.gsped.it
/[ISTANZA]/ShipmentByDdtalpha
Recupero informazioni spedizione

Snippets codice di esempio

PHP
PYTHON
GO
C#
cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test1234567",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"x-api-key: YOUR-API-KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import http.client
conn = http.client.HTTPSConnection("api.gsped.it")
payload = ""
headers = { 'x-api-key': "YOUR-API-KEY" }
conn.request("GET", "/sandbox/ShipmentByDdtalpha?ddt_alpha=test1234567", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test1234567"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "YOUR-API-KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test1234567"),
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 --request GET \
--url 'https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test1234567' \
--header 'x-api-key: YOUR-API-KEY'

Shipment by DDT Alpha - DELETE

delete
https://api.gsped.it
/[ISTANZA]/ShipmentByDdtalpha
Cancella una spedizione

Snippets codice di esempio

PHP
PYTHON
GO
C#
cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test123456",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"x-api-key: YOUR-API-KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test123456",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"x-api-key: YOUR-API-KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test123456"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "YOUR-API-KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test123456"),
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 --request DELETE \
--url 'https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test123456' \
--header 'x-api-key: YOUR-API-KEY'