Reprint By Reference
Reprint labels to file by reference
Same purpose as the Reprint endpoint, but instead of searching by the unique Gsped shipment ID, it uses the numeric or alphanumeric references.
Reprint labels to file
GET https://api.gsped.it/[INSTANCE]/reprintByReference
Use EITHER the numeric reference OR the alphanumeric one.
Query Parameters
Name
Type
Description
ddt_num*
String
Numeric reference
ddt_alpha*
String
Alphanumeric reference
Headers
Name
Type
Description
x-api-key*
String
Apikey provided by Gsped
{
// Response
}{
"error": "ddt_num non univoco"
}{
"status": false,
"error": "Invalid API key "
}{
"error": "Spedizione non trovata"
}{
"error": "ddt_alpha o ddt_num spedizione non indicata"
}Example code 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;
}Last updated
