Shipment by DDT Alpha
Shipment by Alpha DDT - GET
This endpoint returns the shipment information together with their labels in the available formats, exactly as Shipment - GET, but using the alphanumeric reference as a query parameter.
If the user to whom the apikey is associated operates with several usernames and the alphanumeric references risk to be identical, it is possible to use the additional parameter client_id, valorised with the whole one indicating on which data to further filter the query.
Shipment information retrieval
GET
https://api.gsped.it/[INSTANCE]/ShipmentByDdtalpha
It retrieves the shipment information using the alphanumeric reference as search field.
Query Parameters
ddt_alpha*
String
Alphanumeric reference of the shipment
client_id
String
Client id
Headers
x-api-key*
String
API Key given by Gsped
{
"client_id": 390,
"cod_destinatario": "",
"colli": 1,
"contrassegno": 0,
"corriere": 2,
"date_req_cons": "0000-00-00 00:00:00",
"ddt_alpha": "55880",
"ddt_num": 70059765,
"merce": "",
"note_sender": "",
"origine": "",
"peso": 5.6,
"preavviso_telefonico": "",
"rcpt_addr": "MOLO VENEZIA 10",
"rcpt_cap": 34121,
"rcpt_city": "TRIESTE",
"rcpt_contact": "test contact2",
"rcpt_country_code": "IT",
"rcpt_email": "[email protected]",
"rcpt_name": "Test destinatariotesto aggiuntivo",
"rcpt_phone": 1234545789,
"rcpt_prov": "TS",
"servizio": 11,
"tipo_incasso": 0,
"valore": 0,
"valore_doganale": 1,
"volume": 0,
"status": 0,
"fid_partenza": "MI10",
"num_serie": 0,
"num_spedizione": "WS12345678",
"date_upd": "0000-00-00 00:00:00",
"error": "",
"sender_name": "Test Mittente",
"sender_addr": "Via Cavour 15",
"sender_cap": 20123,
"sender_city": "Milano",
"sender_contact": "test contact",
"sender_prov": "MI",
"sender_country_code": "IT",
"sender_email": "[email protected]",
"label_jpg": [
"base64 encoded label string"
],
"label_pdf": [
"base64 encoded label string"
],
"label_zpl": [
"ZPL label string"
],
"id": 70059765,
"daticolli": [
{
"peso": 5.6,
"volume": 0,
"larghezza": 0,
"lunghezza": 0,
"altezza": 0,
"n_collo": 1,
"barcode": "4646466464test4646"
}
],
"tnt_options": [],
"tracking_link": "",
"sender_phone": 41321234,
"dropshipping": 0,
"valuta": "",
"al_piano": "",
"al_sabato": "",
"reso_contestuale": "",
"fermo_deposito": 0,
"note": "",
"centro_costo": "",
"sda_servizio": "",
"date_req_ritiro": "0000-00-00 00:00:00",
"opening_time": "00:00:00",
"closing_time": "00:00:00",
"barcode": "T70059765",
"ups_uap_id": 0,
"sda_id_fermoposta": "",
"flag_reso": 0,
"note_2": "",
"documenti": 0,
"brt_num_segnacollo_da": 0,
"brt_num_segnacollo_a": 0,
"confermato": 1,
"ups_signature_required": 0,
"id_pickup": null,
"data_consegna_prevista": "0000-00-00 00:00:00",
"sda_accessori": 0,
"codice_merce_fercam": "",
"milkman_tracking_code": "WS24881051",
"opening_time2": "00:00:00",
"closing_time2": "00:00:00",
"chi_paga": 0,
"dangerous_goods": "",
"vat_seller": "",
"vat_buyer": "",
"generic_service_point": "",
"user_id": 0,
"sender_eori": "",
"rcpt_eori": "",
"link_pickup_booking": ""
}
Example Snippets
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test1234567",
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;
}
Shipment by Alpha DDT - DELETE
Delete a shipment
DELETE
https://api.gsped.it/[INSTANCE]/ShipmentByDdtalpha
Delete a shipment using the alphanumeric reference as search field.
Query Parameters
ddt_alpha*
String
Alphanumeric reference of the shipment
client_id
String
Client ID
Headers
x-api-key*
String
APi Key given by Gsped
{
"error": ""
}
Example Snippets
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gsped.it/sandbox/ShipmentByDdtalpha?ddt_alpha=test123456",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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