API Documentation
Italiano
Search…
⌃K

Shipment By DDT Num

Shipment by DDT Num - 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 numerico passato in fase di creazione.
Il Riferimento numerico 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 numerici è 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]/ShipmentByDdtnum
Recupera informazioni spedizione

Snippets codice di esempio

PHP
PYTHON
GO
C#
cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.gsped.it/sandbox/ShipmentByDdtnum?ddt_num=123',
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/ShipmentByDdtnum?ddt_num=123", 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/ShipmentByDdtnum?ddt_num=123"
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 client = new RestClient("https://api.gsped.it/sandbox/ShipmentByDdtnum?ddt_num=123");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "YOUR-API-KEY");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'https://api.gsped.it/sandbox/ShipmentByDdtnum?ddt_num=123' \
--header 'x-api-key: YOUR-API-KEY'

Shipment by DDT Num - DELETE

Elimina la spedizione utilizzando come parametro per la ricerca il riferimento numerico passato in fase di creazione.
Il Riferimento numerico deve essere univoco per poter utilizzare questo endpoint
delete
https://api.gsped.it
/sandbox/ShipmentByDdtnum
Cancella una spedizione

Snippets codice di esempio

PHP
PYTHON
GO
C#
cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.gsped.it/sandbox/ShipmentByDdtnum?ddt_num=124',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
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("DELETE", "/sandbox/ShipmentByDdtnum?ddt_num=124", 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/ShipmentByDdtnum?ddt_num=124"
method := "DELETE"
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 client = new RestClient("https://api.gsped.it/sandbox/ShipmentByDdtnum?ddt_num=124");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("x-api-key", "YOUR-API-KEY");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request DELETE 'https://api.gsped.it/sandbox/ShipmentByDdtnum?ddt_num=124' \
--header 'x-api-key: YOUR-API-KEY'