Comparative Rate POST
Preventive analysis of shipment costs
The RateComparativa endpoint allows a preliminary cost analysis of a shipment based on your active or passive price lists saved and managed on Gsped, such as:
Freight (base shipping cost)
Ancillary costs calculable in advance
Cash on delivery cost
Insurance cost
FUEL surcharge
Remote areas or islands
Additional services (floor delivery, Saturday delivery, etc.)
Oversize surcharges based on standard rules
Etc.
Two types of rating are available:
ACTIVE: cost analysis based on active price lists, i.e. the ones you use to resell shipping to your customers
PASSIVE: cost analysis based on the price lists agreed with the courier during contract negotiation. This mode automatically includes the ACTIVE rating as well, allowing a quick comparison between purchasing and selling costs of the shipment
RateComparativa - POST
POST https://api.gsped.it/[INSTANCE]/RateComparativa
Headers
x-api-key*
String
API key provided by Gsped
Content-Type*
String
application/json
Request Body
client_id*
Integer
Client ID to use for rating
colli*
Integer
Number of parcels in the shipment
peso*
Float
Total shipment weight in KG
volume*
Float
Total shipment volume in cubic meters
sender_addr*
String
Sender address
sender_city*
String
Sender city
sender_cap*
String
Sender postal code
sender_prov*
String
Sender province/state abbreviation
sender_country_code*
String
Sender country ISO 2-char code
rcpt_addr*
String
Recipient address
rcpt_city*
String
Recipient city
rcpt_cap*
String
Recipient postal code
rcpt_prov*
String
Recipient province/state abbreviation
rcpt_country_code*
String
Recipient country ISO 2-char code
tipo_listino*
String
attivo | passivo — defines the type of rating to perform. N.B.: Setting passivo returns both
invoiced_client_id
Integer
Client ID to use for ACTIVE rating in RESELLER instances
departure_date_time
String
Estimated goods-ready date/time in YYYY-MM-DD HH:MM:SS format. If not provided, the request datetime is used. N.B.: If the date provided is in the past, the call will return an error!
contrassegno
Float
Cash on delivery amount
valore
Float
Insured value amount
documenti
String
0 | 1 — identifies whether this is a documents-only shipment
al_piano
String
0 | 1 — identifies whether floor delivery service is requested (calculated only if the courier provides the service)
al_sabato
String
0 | 1 — identifies whether Saturday delivery service is requested (calculated only if the courier provides the service)
preavviso_telefonico
String
S | N — identifies whether a phone pre-notification at delivery is requested
gls_exchange
String
N | S — identifies whether the EXCHANGE service is requested for GLS courier
corriereRichiesto
Integer
Identifies the Gsped courier ID for which results are requested
servizioRichiesto
Integer
Identifies the Gsped service ID for which results are requested. Works in combination with corriereRichiesto
corrieriEsclusi
Array
List of Gsped courier IDs to exclude from the calculation. Cannot be used together with corriereRichiesto
serviziEsclusi
Array
List of Gsped service IDs to exclude from the calculation. Can only be used when corriereRichiesto is present and cannot be used together with servizioRichiesto
daticolli
Array
Individual parcel data in CM | KG | cubic meters. Fields: altezza, larghezza, lunghezza, peso, volume
Filter parameter rules
corrieriEsclusiandcorriereRichiestocannot be used togetherserviziEsclusiandservizioRichiestocannot be used togetherserviziEsclusican only be used whencorriereRichiestois present
Code snippets
Response examples
Lowest - POST
POST https://api.gsped.it/[INSTANCE]/RateComparativa/lowest
This endpoint works exactly like RateComparativa POST but returns only the cheapest service for each active/passive price list as requested.
Headers
x-api-key*
String
API key provided by Gsped
Content-Type*
String
application/json
Response examples
Fastest - POST
POST https://api.gsped.it/[INSTANCE]/RateComparativa/fastest
This endpoint works exactly like RateComparativa POST but returns only the fastest courier for each active/passive price list as requested.
Headers
x-api-key*
String
API key provided by Gsped
Content-Type*
String
application/json
