LogoLogo
Italiano
Italiano
  • OVERVIEW
    • Etichette in 5 minuti
    • Introduzione
    • Autenticazione
    • Formato Richieste e Risposte
    • Corrieri e servizi
    • Codici Gsped
    • Throttling
  • Spedizioni e Dintorni
    • Shipment
      • Shipment objects
        • carrierData
        • courierSpecificData
        • courierData
          • additional_charges
        • dettagli_ordine
        • dati_colli
        • dettagli_scarico
        • incoterm
        • operativita_destinatario
        • parties
        • qrCode
        • trade_documents
      • Casi d'uso
        • Contrassegni
          • Contrassegno nazionale
          • Contrassegno Internazionale
        • PUDO (punti di ritiro)
        • Ritiro contestuale
        • Servizi accessori
      • Corrieri
        • Corrieri abilitati al PLT(paperless)
        • AlpiExpress
        • ALT
        • Amazon Prime
        • Amazon Shipping
        • Arcese B2C
        • Arco Spedizioni
        • Asendia
        • Bianchi Trasporti
        • Bracchi
        • BRT
        • Ceva
        • Chronopost
        • Colissimo
        • Correos ES
        • Correos Express
        • CSI Logistica
        • Dachser Iberia
        • Db Schenker
        • DHL
          • Resi in franchigia - RGR
        • DHL BENELUX
        • DHL Freight
        • DHL Parcel
        • DHL Paket
        • DHL Parcel DE
        • DHL WLA
        • DSV
        • Dummy 1-10
        • Ecourier
        • Fedex
        • Fercam
        • Ferrari Trasporti
        • Geodis
        • Glovo
        • GLS
        • GLS France
        • GLS Spain
        • HR Parcel
        • Inpost
        • Italsempione
        • Liccardi
        • Lynx
        • Logisticando
        • MBE
        • Milkman
        • Nacex
        • Nexive
        • Paack
        • Poste CH
        • Poste Delivery Business
        • QHD
        • Rhenus Logistics
        • Ribosped
        • San Marino Mail
        • SDA
        • Sendabox
        • Sending
        • Seur
        • Skynet
        • Speditalia
        • Spring
        • Stef
        • Susa
        • SVL
        • Stuart
        • SwissPost
        • Tiesse Zust
        • Tipsa
        • TNT
        • UPS
        • USPS Return
        • VEEPEE
    • ShipmentsList
    • Shipment by DDT Alpha
    • Shipment By DDT Num
    • Shipment Confirm
    • Shipment Confirm By Ddt Num
    • Shipment References
    • Pickup (richieste di ritiro)
    • POD (prove di consegna)
    • RefreshQr
    • Reprint
    • Reprint By Reference
    • Tracking
    • Upload Documents
    • Add Parcel
    • CloseDoc
    • ShipmentFromCourier
  • Gestione Ordini
    • Orders
    • Order To Shipment
  • Rating
    • Rate Comparativa
  • Mail transazionali
    • TransactionalEmail
  • Validation
    • Validation
      • Codice Fiscale (TIN)
      • Partita IVA (VAT)
  • Webhooks
    • Webhooks
      • Webhook Spedizioni
Powered by GitBook
On this page
  • Shipment by DDT Num - GET
  • Recupera informazioni spedizione
  • Snippets codice di esempio
  • Shipment by DDT Num - DELETE
  • Cancella una spedizione
  • Snippets codice di esempio

Was this helpful?

  1. Spedizioni e Dintorni

Shipment By DDT Num

PreviousShipment by DDT AlphaNextShipment Confirm

Last updated 2 days ago

Was this helpful?

Shipment by DDT Num - GET

Restituisce le informazioni riguardo a una spedizione insieme alle relative etichette nei formati disponibili esattamente come la 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.

Recupera informazioni spedizione

GET https://api.gsped.it/[ISTANZA]/ShipmentByDdtnum

Query Parameters

Name
Type
Description

ddt_num*

Integer

Riferimento numerico della spedizione

client_id

String

ID anagrafica di bollettazione

Headers

Name
Type
Description

x-api-key*

String

Api Key fornita da Gsped

{
  "client_id": 390,
  "cod_destinatario": "",
  "colli": 1,
  "contrassegno": 0,
  "corriere": 1,
  "date_req_cons": "0000-00-00 00:00:00",
  "ddt_alpha": "ONLINES69512708",
  "ddt_num": 123,
  "merce": "Informatica",
  "note_sender": "",
  "origine": "",
  "peso": 1.5,
  "preavviso_telefonico": "",
  "rcpt_addr": "via gandhi",
  "rcpt_cap": 83020,
  "rcpt_city": "sperone",
  "rcpt_contact": "danilo",
  "rcpt_country_code": "IT",
  "rcpt_email": "test@il.it",
  "rcpt_name": "r-store",
  "rcpt_phone": 81,
  "rcpt_prov": "av",
  "servizio": 0,
  "tipo_incasso": 0,
  "valore": 0,
  "valore_doganale": 0,
  "volume": 0,
  "status": 0,
  "fid_partenza": 39,
  "num_serie": 0,
  "num_spedizione": "0",
  "date_upd": "0000-00-00 00:00:00",
  "error": "",
  "sender_name": "TEST mittente",
  "sender_addr": "Via Stilicone 20",
  "sender_cap": 20154,
  "sender_city": "Milano",
  "sender_contact": "TEST contatto",
  "sender_prov": "MI",
  "sender_country_code": "IT",
  "sender_email": "test@gsped.com",
  "label_jpg": [
    "/9j/4AAQSkZJRgA...AAAAAD/9k="
  ],
  "label_pdf": [
    "JVBERi0xLjQKJeL...Tk4CiGCg=="
  ],
  "label_zpl": [
    "^XA\r^LH20,20^P....^LH0,0^XZ"
  ],
  "id": 68409660,
  "daticolli": [
    {
      "peso": 1.5,
      "volume": 0,
      "larghezza": 0,
      "lunghezza": 0,
      "altezza": 0,
      "n_collo": 1,
      "barcode": ""
    }
  ],
  "tnt_options": [],
  "tracking_link": "https://vas.brt.it/vas/sped_ricDocMit_load.hsm?KSU=1234567&DocMit=000000000000123",
  "sender_phone": 131349123,
  "dropshipping": 0,
  "valuta": "",
  "al_piano": "",
  "al_sabato": "",
  "reso_contestuale": "",
  "fermo_deposito": 0,
  "note": "",
  "centro_costo": "",
  "sda_servizio": "",
  "date_req_ritiro": "2022-01-18 00:00:00",
  "opening_time": "09:00:00",
  "closing_time": "18:00:00",
  "barcode": "T68409660",
  "ups_uap_id": "",
  "sda_id_fermoposta": "",
  "flag_reso": 0,
  "note_2": "",
  "documenti": 0,
  "brt_num_segnacollo_da": 108,
  "brt_num_segnacollo_a": 108,
  "confermato": 0,
  "ups_signature_required": 0,
  "id_pickup": null,
  "data_consegna_prevista": "0000-00-00 00:00:00",
  "sda_accessori": 0,
  "codice_merce_fercam": "C",
  "milkman_tracking_code": 0,
  "opening_time2": null,
  "closing_time2": null,
  "chi_paga": 0,
  "dangerous_goods": "",
  "vat_seller": "",
  "vat_buyer": "",
  "generic_service_point": "",
  "user_id": 0,
  "sender_eori": "",
  "rcpt_eori": "",
  "link_pickup_booking": ""
}
{
    "error": "DDT_num spedizione non indicata(1)"
}
{
    "status": false,
    "error": "Invalid API key "
}
{
    "error": "Spedizione non trovata (10)"
}

Snippets codice di esempio

<?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

Cancella una spedizione

DELETE https://api.gsped.it/sandbox/ShipmentByDdtnum

Query Parameters

Name
Type
Description

ddt_num*

Integer

Riferimento numerico della spedizione

client_id

String

ID anagrafica di bollettazione

Headers

Name
Type
Description

x-api-key*

String

Api Key fornita da Gsped

{
    "error": ""
}
{
    "error": "Spedizione non trovata (10)"
}
{
    "error": "DDT_num spedizione non indicata (10)"
}
{
    "status": false,
    "error": "Invalid API key "
}

Snippets codice di esempio

<?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'
Shipment - GET