This endpoint, unless errors in the name fields and/or incorrect data, always returns the 200, status code, even in the event that the shipment has not successfully performed.
Always check the status field in the pick-up response.
If the value of the field is 0.6 or 10 the pick-up has not been requested (in most of cases because of unmanageable dates or times not accepted by the courier)
Not all the couriers provide these information immediately, therefore check with the Gsped technicians about the couriers you want to use this endpoint with.
Send pick-up request
POST https://api.gsped.it/[INSTANCE]/pickup
Headers
Name
Type
Description
Content-Type*
String
application/json
x-api-key*
String
API key given by GSped
Request Body
Name
Type
Description
client_id*
Integer
Id of the registry you want to generate the shipment with (given value)
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'