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

Was this helpful?

  1. Spedizioni e Dintorni

Shipment Confirm

Operazione di conferma spedizioni

Con questa operazione si conferma che le spedizioni generate sono corrette e sono in processo di affido al corriere / corrieri.

Sull'interfaccia di Gsped le spedizioni confermate vengono spostate dalla sezione Spedizioni in partenza alla sezione Spedizioni partite.

L'operazione di conferma può essere eseguita in due modalità :

  • Indicando l'anagrafica di bollettazione ( client_id ) : In questo caso verranno confermate tutte le spedizioni del client_id indicato.

  • Indicando l'elenco di spedizioni ( ID spedizioni ) : In questo caso verranno confermate le singole spedizioni specificate.

ATTENZIONE : Nell'operazione di conferma vi viene restituito codice HTTP 200 anche quando le spedizioni non vengono effettivamente confermate nei seguenti casi :

  • Si tenta di confermare spedizioni già confermate

  • Si tenta di confermare spedizioni in errore e/o ancora in fase di elaborazione

Fare attenzione al messaggio restituito nel campo status, in quanto qui verranno indicate quante spedizioni sono state confermate e quante no, Esempio : "10 spedizioni confermate, 2 errori"

Nel caso vi siano spedizioni che non siamo stato in grado di confermare, nel array errors verranno indicate le spedizioni che non sono state conferma.

Nota : In questa operazione è possibile richiedere che venga generato il borderò (manifest) da presentare al corriere all'atto del ritiro della merce.

Conferma delle spedizioni e generazione del borderò (opzionale)

POST https://api.gsped.it/[ISTANZA]/shipmentConfirm

Headers

Name
Type
Description

Content-Type*

String

application/json

x-api-key*

String

Api Key fornita da Gsped

Request Body

Name
Type
Description

client_id*

Integer

Valore comunicato da Gsped (In alternativa al parametro id)

id*

Array

Elenco di IDs numerici delle spedizioni da confermare (In alternativa a client_id)

create_manifest

String

Valori ammissibili Y o N. Se Y nella risposta verrà incluso il campo manifest che conterrà il PDF del manifest delle spedizioni confermate.

{
  "status": "25 spedizioni confermate, 0 errori",
  "errors": [],
  "manifest": "JVBERi0xLjMKM......UVPRgo=",
  "manifest_id": 10006
}
{
    "error": "ID spedizione non indicata"
}
{
    "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/shipmentConfirm',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
  "create_manifest" : "Y",
  "id": [
    "12345",
    "12346",
    "12347"
  ]
}',
    CURLOPT_HTTPHEADER => array(
        'Content-Type: application/json',
        'x-api-key: YOUR-API-KEY'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;php
import http.client
import json

conn = http.client.HTTPSConnection("api.gsped.it")
payload = json.dumps({
  "create_manifest": "Y",
  "id": [
    "12345",
    "12346",
    "12347"
  ]
})
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'YOUR-API-KEY'
}
conn.request("POST", "/sandbox/shipmentConfirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.gsped.it/sandbox/shipmentConfirm"
  method := "POST"

  payload := strings.NewReader(`{
  "create_manifest" : "Y",
  "id": [
    "12345",
    "12346",
    "12347"
  ]
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  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 HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("https://api.gsped.it/sandbox/shipmentConfirm"),
    Headers =
    {
        { "x-api-key", "YOUR-API-KEY" },
    },
    Content = new StringContent("{\n  \"create_manifest\" : \"Y\",\n  \"id\": [\n    \"12345\",\n    \"12346\",\n    \"12347\"\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
curl --location --request POST 'https://api.gsped.it/sandbox/shipmentConfirm' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR-API-KEY' \
--data-raw '{
  "create_manifest" : "Y",
  "id": [
    "12345",
    "12346",
    "12347"
  ]
}'

PreviousShipment By DDT NumNextShipment Confirm By Ddt Num

Last updated 7 months ago

Was this helpful?