LogoLogo
English
English
  • OVERVIEW
    • Labels in 5 minutes
    • Introduction
    • Authentication
    • Requests and responses form
    • Couriers and services
    • PLT-licensed couriers (paperless)
    • Gsped codes
    • Throttling
    • Non-standard payload
  • Spedizioni e Dintorni
    • Shipment
    • ShipmentsList
    • Shipment by DDT Alpha
    • Shipment By DDT Num
    • Shipment Confirm
    • Shipment Confirm By Ddt Num
    • Pickup (pickup request)
    • POD (proof of delivery)
    • Reprint
    • Reprint By Reference
    • Tracking
    • PUP Managing (pick-up points)
    • Upload Documents
    • Add Parcel
    • CloseDoc
  • Gestione Ordini
    • Orders
    • Order To Shipment
  • Rating
    • Comparative Rate
Powered by GitBook
On this page
  • Reprint By Reference
  • Reprint labels via file
  1. Spedizioni e Dintorni

Reprint By Reference

Label reprint by reference

Reprint By Reference

This function has the same aim of Reprint endpoint, but uses the numeric or alphanumeric reference istead of researching with the Gsped ID of the shipment.

For this endpoint you must use unique references.

Reprint labels via file

GET https://api.gsped.it/[INSTANCE]/reprintByReference

Use the numerical OR alphanumerical reference

Query Parameters

Name
Type
Description

ddt_num*

String

Numerical reference

ddt_alpha*

String

Alphanumerical reference

Headers

Name
Type
Description

x-api-key*

String

Apikey given by Gsped

{
    // Response
}
{
    "error": "ddt_num non univoco"
}
{
  "error": "ddt_alpha o ddt_num spedizione non indicata"
}
{
  "status": false,
  "error": "Invalid API key "
}
{
  "error": "Spedizione non trovata"
}

Example Snippets

<?php

$curl = curl_init();

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

	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/ReprintByReference?ddt_alpha=test1234"),
    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/ReprintByReference?ddt_alpha=test1234' \
  --header 'x-api-key: YOUR-API-KEY'
PreviousReprintNextTracking

Last updated 2 years ago