Pickup (pickup request)
Pick-up management
Pickup - GET
It returns information about the pick-up requests.
Pick-up information retrieval .
GET https://api.gsped.it/[INSTANCE]/pickup
Query Parameters
id*
Integer
Pick-up ID
Headers
x-api-key*
String
API key given by Gsped
{
"status": 2,
"num_spedizione": "",
"error": "",
"id": 70058437,
"note": "",
"note_orm": "",
"num_orm": "CBJ180121002626"
}{
"error": "ID richiesta di ritiro non indicato"
}{
"status": false,
"error": "Invalid API key "
}{
"error": "Richiesta di ritiro non trovata"
}Snippets example
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.gsped.it/sandbox/pickup?id_sped=12345',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: YOUR-API-KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import http.client
conn = http.client.HTTPSConnection("api.gsped.it")
payload = ''
headers = {
'x-api-key': 'YOUR-API-KEY'
}
conn.request("GET", "/sandbox/pickup?id_sped=12345", 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/pickup?id_sped=12345"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
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 RestClient("https://api.gsped.it/sandbox/pickup?id_sped=12345");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "YOUR-API-KEY");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);curl --location --request GET 'https://api.gsped.it/sandbox/pickup?id_sped=12345' \
--header 'x-api-key: YOUR-API-KEY'Pickup - POST
It sends the courier a pick-up request.
Send pick-up request
POST https://api.gsped.it/[INSTANCE]/pickup
Headers
Content-Type*
String
application/json
x-api-key*
String
API key given by GSped
Request Body
client_id*
Integer
Id of the registry you want to generate the shipment with (given value)
corriere*
Integer
Courier code
servizio*
Integer
Service code
colli*
Integer
NUmber of parcels of the shipment
peso*
Float
Total weight (KG)
date_req_ritiro*
String
Date of pick-up (YYYY-MM-DD)
opening_time*
String
Goods ready time (HH:MM:SS)
closing_time*
String
Closing time (HH:MM:SS)
opening_time2
String
Second goods ready time (HH:MM:SS) - only for TNT
closing_time2
String
Second closing time (HH:MM:SS) - only for TNT
note_sender
String
Sender name
ddt_alpha
String
Customer alphanumeric reference
ddt_num
Integer
Customer numeric reference
sender_name
String
Name/ designation/business name of the sender
sender_addr
String
Sender address (street and number)
sender_cap
String
Zip code of the sender
sender_city
String
City of the sender
sender_prov
String
Province of the sender (2 characters)
sender_country_code
String
Country of the sender (ISO 3166-1 alpha-2)
sender_contact
String
Additional sender contact
sender_email
String
E-mail of the sender
sender_phone
String
Phone number of the sender
rcpt_name
String
Name/ designation/business name of the recipient
rcpt_addr
String
Recipient address (street and number)
rcpt_cap
String
Zip code of the recipient
rcpt_city
String
City of the recipient
rcpt_prov
String
Province of the recipient (2 characters)
rcpt_country_code
String
Country of the recipient (ISO 3166-1 alpha-2)
rcpt_contact
String
Additional recipient contact
rcpt_phone
String
Phone number of the recipient
rcpt_email
String
E-mail of the recipient
merce
String
Goods description
daticolli
Array
Size of the parcels (if available)
daticolli.n_collo
Integer
Progressive number
daticolli.altezza
Integer
Height (cm)
daticolli.larghezza
Integer
Width (cm)
daticolli.lunghezza
Integer
Lenght (cm)
daticolli.peso
Float
Weight (kg)
daticolli.volume
Float
Volume (cu m)
{
"status": 2,
"num_spedizione": "",
"error": "",
"id": 70061546,
"note": "",
"note_orm": "",
"num_orm": "CBJ180121002626"
}{
"error": "client_id: valore non valido"
}Example snippets
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.gsped.it/sandbox/pickup',
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 =>'{
"client_id": 390,
"corriere": 1,
"servizio": 0,
"colli": 1,
"peso": 5,
"date_req_ritiro": "2022-01-14",
"opening_time": "09:00",
"closing_time": "17:30",
"ddt_alpha": "2001504697",
"ddt_num": 2001504697,
"sender_name": "Test mittente",
"sender_addr": "VIA PRINCIPESSA CLOTILDE, 70",
"sender_cap": "10134",
"sender_city": "Torino",
"sender_contact": "contatto mittente",
"sender_prov": "TO",
"sender_country_code": "IT",
"sender_email": "[email protected]",
"sender_phone": "3208281234",
"note_sender": "",
"rcpt_addr": "Via Pier Santi Mattarella, 1",
"rcpt_cap": "92100",
"rcpt_city": "AGRIGENTO",
"rcpt_contact": "contatto destinatario",
"rcpt_country_code": "IT",
"rcpt_email": "[email protected]",
"rcpt_name": "test destinatario",
"rcpt_phone": "0922601234",
"rcpt_prov": "AG",
"merce": "Articoli arredamento",
"daticolli": [
{
"n_collo": 1,
"altezza": 50,
"larghezza": 35,
"lunghezza": 25,
"peso": 10,
"volume": 0.014
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'x-api-key: YOUR-API-KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import http.client
import json
conn = http.client.HTTPSConnection("api.gsped.it")
payload = json.dumps({
"client_id": 390,
"corriere": 1,
"servizio": 0,
"colli": 1,
"peso": 5,
"date_req_ritiro": "2022-01-14",
"opening_time": "09:00",
"closing_time": "17:30",
"ddt_alpha": "2001504697",
"ddt_num": 2001504697,
"sender_name": "Test mittente",
"sender_addr": "VIA PRINCIPESSA CLOTILDE, 70",
"sender_cap": "10134",
"sender_city": "Torino",
"sender_contact": "contatto mittente",
"sender_prov": "TO",
"sender_country_code": "IT",
"sender_email": "[email protected]",
"sender_phone": "3208281234",
"note_sender": "",
"rcpt_addr": "Via Pier Santi Mattarella, 1",
"rcpt_cap": "92100",
"rcpt_city": "AGRIGENTO",
"rcpt_contact": "contatto destinatario",
"rcpt_country_code": "IT",
"rcpt_email": "[email protected]",
"rcpt_name": "test destinatario",
"rcpt_phone": "0922601234",
"rcpt_prov": "AG",
"merce": "Articoli arredamento",
"daticolli": [
{
"n_collo": 1,
"altezza": 50,
"larghezza": 35,
"lunghezza": 25,
"peso": 10,
"volume": 0.014
}
]
})
headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR-API-KEY'
}
conn.request("POST", "/sandbox/pickup", 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/pickup"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"client_id": 390,`+"
"+`
"corriere": 1,`+"
"+`
"servizio": 0,`+"
"+`
"colli": 1,`+"
"+`
"peso": 5,`+"
"+`
"date_req_ritiro": "2022-01-14",`+"
"+`
"opening_time": "09:00",`+"
"+`
"closing_time": "17:30",`+"
"+`
"ddt_alpha": "2001504697",`+"
"+`
"ddt_num": 2001504697,`+"
"+`
"sender_name": "Test mittente",`+"
"+`
"sender_addr": "VIA PRINCIPESSA CLOTILDE, 70",`+"
"+`
"sender_cap": "10134",`+"
"+`
"sender_city": "Torino",`+"
"+`
"sender_contact": "contatto mittente",`+"
"+`
"sender_prov": "TO",`+"
"+`
"sender_country_code": "IT",`+"
"+`
"sender_email": "[email protected]",`+"
"+`
"sender_phone": "3208281234",`+"
"+`
"note_sender": "",`+"
"+`
"rcpt_addr": "Via Pier Santi Mattarella, 1",`+"
"+`
"rcpt_cap": "92100",`+"
"+`
"rcpt_city": "AGRIGENTO",`+"
"+`
"rcpt_contact": "contatto destinatario",`+"
"+`
"rcpt_country_code": "IT",`+"
"+`
"rcpt_email": "[email protected]",`+"
"+`
"rcpt_name": "test destinatario",`+"
"+`
"rcpt_phone": "0922601234",`+"
"+`
"rcpt_prov": "AG",`+"
"+`
"merce": "Articoli arredamento",`+"
"+`
"daticolli": [`+"
"+`
{`+"
"+`
"n_collo": 1,`+"
"+`
"altezza": 50,`+"
"+`
"larghezza": 35,`+"
"+`
"lunghezza": 25,`+"
"+`
"peso": 10,`+"
"+`
"volume": 0.014`+"
"+`
}`+"
"+`
]`+"
"+`
}`)
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 RestClient("https://api.gsped.it/sandbox/pickup");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-api-key", "YOUR-API-KEY");
var body = @"{
" + "\n" +
@" ""client_id"": 390,
" + "\n" +
@" ""corriere"": 1,
" + "\n" +
@" ""servizio"": 0,
" + "\n" +
@" ""colli"": 1,
" + "\n" +
@" ""peso"": 5,
" + "\n" +
@" ""date_req_ritiro"": ""2022-01-14"",
" + "\n" +
@" ""opening_time"": ""09:00"",
" + "\n" +
@" ""closing_time"": ""17:30"",
" + "\n" +
@" ""ddt_alpha"": ""2001504697"",
" + "\n" +
@" ""ddt_num"": 2001504697,
" + "\n" +
@" ""sender_name"": ""Test mittente"",
" + "\n" +
@" ""sender_addr"": ""VIA PRINCIPESSA CLOTILDE, 70"",
" + "\n" +
@" ""sender_cap"": ""10134"",
" + "\n" +
@" ""sender_city"": ""Torino"",
" + "\n" +
@" ""sender_contact"": ""contatto mittente"",
" + "\n" +
@" ""sender_prov"": ""TO"",
" + "\n" +
@" ""sender_country_code"": ""IT"",
" + "\n" +
@" ""sender_email"": ""[email protected]"",
" + "\n" +
@" ""sender_phone"": ""3208281234"",
" + "\n" +
@" ""note_sender"": """",
" + "\n" +
@" ""rcpt_addr"": ""Via Pier Santi Mattarella, 1"",
" + "\n" +
@" ""rcpt_cap"": ""92100"",
" + "\n" +
@" ""rcpt_city"": ""AGRIGENTO"",
" + "\n" +
@" ""rcpt_contact"": ""contatto destinatario"",
" + "\n" +
@" ""rcpt_country_code"": ""IT"",
" + "\n" +
@" ""rcpt_email"": ""[email protected]"",
" + "\n" +
@" ""rcpt_name"": ""test destinatario"",
" + "\n" +
@" ""rcpt_phone"": ""0922601234"",
" + "\n" +
@" ""rcpt_prov"": ""AG"",
" + "\n" +
@" ""merce"": ""Articoli arredamento"",
" + "\n" +
@" ""daticolli"": [
" + "\n" +
@" {
" + "\n" +
@" ""n_collo"": 1,
" + "\n" +
@" ""altezza"": 50,
" + "\n" +
@" ""larghezza"": 35,
" + "\n" +
@" ""lunghezza"": 25,
" + "\n" +
@" ""peso"": 10,
" + "\n" +
@" ""volume"": 0.014
" + "\n" +
@" }
" + "\n" +
@" ]
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);curl --location --request POST 'https://api.gsped.it/sandbox/pickup' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR-API-KEY' \
--data-raw '{
"client_id": 390,
"corriere": 1,
"servizio": 0,
"colli": 1,
"peso": 5,
"date_req_ritiro": "2022-01-14",
"opening_time": "09:00",
"closing_time": "17:30",
"ddt_alpha": "2001504697",
"ddt_num": 2001504697,
"sender_name": "Test mittente",
"sender_addr": "VIA PRINCIPESSA CLOTILDE, 70",
"sender_cap": "10134",
"sender_city": "Torino",
"sender_contact": "contatto mittente",
"sender_prov": "TO",
"sender_country_code": "IT",
"sender_email": "[email protected]",
"sender_phone": "3208281234",
"note_sender": "",
"rcpt_addr": "Via Pier Santi Mattarella, 1",
"rcpt_cap": "92100",
"rcpt_city": "AGRIGENTO",
"rcpt_contact": "contatto destinatario",
"rcpt_country_code": "IT",
"rcpt_email": "[email protected]",
"rcpt_name": "test destinatario",
"rcpt_phone": "0922601234",
"rcpt_prov": "AG",
"merce": "Articoli arredamento",
"daticolli": [
{
"n_collo": 1,
"altezza": 50,
"larghezza": 35,
"lunghezza": 25,
"peso": 10,
"volume": 0.014
}
]
}'Last updated
