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
  • ShipmentsList
  • ShipmentsList
  • Snippets codice di esempio

Was this helpful?

  1. Spedizioni e Dintorni

ShipmentsList

Elenco delle spedizioni

ShipmentsList

Questo endpoint permette di ottenere l'elenco delle spedizioni.

L'utilizzo delle url previousPageUrl e nextPageUrl presenti nella risposta non è obbligatorio ma è consigliato perché permette di velocizzare notevolmente la chiamata.

ShipmentsList

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

Recupera un elenco di spedizioni

Query Parameters

Name
Type
Description

data_da*

Y-m-d H:i:s

seleziona se data_created >= data_da

data_a*

Y-m-d H:i:s

seleziona se datacreated < data_da

corriere

int | array

seleziona se corriere IN [id, id...]

servizio

int | array

seleziona se servizio IN [id, id...]

cliente

int | array

seleziona se client_id IN [id, id...]

fatt_cliente

int | array

seleziona invoiced_client_id IN [id, id...]

nazionale

1/0

1 seleziona se rcpt_country_code = sender_country_code 0 seleziona se rcpt_country_code != sender_country_code

contrassegno

1/0

1 seleziona se contrassegno > 0 0 seleziona se contrassegno <= 0

assicurazione

1/0

1 seleziona se assicurazione > 0 0 seleziona se assicurazione <= 0 OR NULL

confermato

1/0

1 seleziona se confermato = 1 0 seleziona se confermato = 0

documenti

1/0

1 seleziona se documenti = 1 0 seleziona se documenti = 0

reso

1/0

1 seleziona le spedizioni di reso 0 seleziona le spedizioni normali

tipo

1/0

1 seleziona le spedizioni 0 seleziona i ritiri

perPage

1...200

Numero di elementi per pagina. Default: 200

page

int

Numero della pagina richiesta

order

ASC|DESC

Verso dell'ordinamento. Default: DESC

orderBy

string

Nome del campo su cui ordinare i risultati. Default: id

Valori possibili:

id,

corriere,

client_id,

date_created,

invoiced_client_id

status

float

Indica lo stato della spedizione. Deve essere maggiore o uguale a zero

Headers

Name
Type
Description

x-api-key*

String

Apikey fornita da GSPED

{
    "status": 200,
    "page": 1,
    "totPages": 3,
    "totEntries": 6,
    "entries": 2,
    "payload": [
        {...},
        {...},
    ],
    "previousPageUrl": null,
    "nextPageUrl": "http://apistaging.gsped.it/testbed/shipments?corriere%5B0%5D=1&corriere%5B1%5D=104&perPage=2&page=2&totEntries=6"
}
{
    "status": 400,
    "error" => "Testo descrittivo dell'errore",
}
{
    "status": false,
    "error": "Invalid API key "
}

Snippets codice di esempio

<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.gsped.it/sandbox/ShipmentsList",
  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/ShipmentsList", 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/ShipmentsList"

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

}
// Some codevar client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://api.gsped.it/sandbox/ShipmentsList"),
    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/ShipmentsList' \
  --header 'x-api-key: YOUR-API-KEY'
PreviousVEEPEENextShipment by DDT Alpha

Last updated 4 months ago

Was this helpful?