Scopri tutto ciò che devi sapere sulla chiamata GetRates API
Questo Metodo recupera le tariffe del corriere per una spedizione specifica per oltre 170 Corrieri con la stessa chiamata API.
Con questo Metodo potrai:
-
Recuperare in tempo reale tutte le tariffe del tuo corriere
-
Confrontare le tariffe del tuo Corriere per scegliere le opzioni migliori per evadere gli ordini
-
Migliorare il tasso di conversione mostrando le tariffe in tempo reale al momento del checkout
-
Applicare un markup sul costo di spedizione
Sommario:
Per la modalità test puoi usare il Corriere Generic ShippyPro per generare tariffe di prova. Consulta questa sezione se hai bisogno di aiuto per configurare il Corriere Generic ShippyPro.
- Puoi anche aggiungere l'attributo CarrierOptions per ottenere tariffe per servizi corriere specifici.
- La chiamata GetRates seguirà le impostazione delle Regole di Invio applicate. Se la chiamata GetRates non restituisce alcuna tariffa e nessun errore, verificare che le regole di spedizione siano impostate correttamente e non blocchino gli SKU.
- Ricorda di valorizzare il
transactionID
dell'ordine nella chiamata API_GetRates per utilizzare la regola ShippingService, altrimenti verrà saltata. Se il campotransactionID
non è popolato, il filtro per ShippingService non può essere applicato.
Per poter valorizzare correttamente iltransactionID
avrai bisogno di un ordine precedentemente importato da un marketplace o creato manualmente tramite PutOrder - Se le tariffe GetRates non corrispondono a quelle riportate in "Da spedire", assicurati che le unità di misura di GetRates e de Il mio profilo > Preferenze corrispondano!
- Copiando il RateID della response della chiamata API Shipping potrai utilizzare la nostra funzione Analisi Fatture. (questa funzione non è supportata da tutti i corrieri. Chiedi al nostro team se il corriere che vorrai utilizzare supporta questa funzionalità)
- Puoi filtrare questa chiamata solo per alcuni servizi specifici compilando il campo RateCarriers con CarrierName e CarrierID, che puoi recuperare dalla pagina APIKEYS.
Es. RateCarriers: [“CarrierName|CarrierID,CarrierName|CarrierID”
La risposta alla chiamata di GetRates è lenta?
Consigliamo di utilizzare i filtri compilando il campo RateCarriers.
Se sono presenti diverse connessioni corrieri interrogarle tutte per ricevere i rates potrebbe allungare l'attesa.
Come posso filtrare questa chiamata solo per alcuni Corrieri connessi?
Puoi filtrare questa chiamata solo per alcuni servizi specifici compilando il campo RateCarriers con CarrierName e CarrierID, che puoi recuperare dalla pagina APIKEYS.
Per ottenere i rates da Amazon e AMF bisogna avere l'ordine di riferimento già importato sulla piattaforma di ShippyPro nella sezione "Da spedire"
2. Come funziona
Per effettuare la chiamata GetRate API, devono passare i seguenti parametri:
Name |
Data Type |
Required |
Empty |
Description |
Max length |
to_address |
Array |
true |
false |
Recipient address information |
|
name |
string |
true |
false |
Recipient name |
|
company |
string |
true |
true |
Recipient company |
|
street1 |
string |
true |
false |
Recipient street1 |
Depends on the specific carrier |
street2 |
string |
true |
true |
Recipient street2 |
Depends on the specific carrier |
city |
string |
true |
false |
Recipient city |
|
state |
string |
true |
false |
Recipient state |
|
zip |
string |
true |
false |
Recipient zip code |
Depends on the country |
country |
string |
true |
false |
Recipient country (ISO 3166) |
2 char |
phone |
string |
true |
false |
Recipient Phone |
Country specific phone length |
|
string |
false |
false |
Recipient Email |
64 char |
from_address |
Array |
true |
false |
Sender address information |
|
name |
string |
true |
false |
Sender name |
|
company |
string |
true |
true |
Sender company |
|
street1 |
string |
true |
false |
Sender street1 |
|
street2 |
string |
true |
true |
Sender street2 |
|
city |
string |
true |
false |
Sender city |
|
state |
string |
false |
true |
Sender state |
|
zip |
string |
true |
false |
Sender zip code |
Depends on the country |
country |
string |
true |
false |
Sender country (ISO 3166) |
2 char |
phone |
string |
true |
false |
Sender phone |
Depends on the country |
|
string |
true |
false |
Sender email |
|
parcels |
Array |
true |
false |
Parcels information (Minimum 1) |
4 objects each |
dimension_unit |
string |
false |
false |
Parcel unit of measurement for lenght: "CM" (default), "IN" |
2 char |
length |
int |
true |
false |
Parcel Length |
|
width |
int |
true |
false |
Parcel width |
|
height |
int |
true |
false |
Parcel height |
|
weight_unit |
string |
false |
false |
Parcel unit of measurement for weight: "KG" (default), "LB", "OZ" |
2 char |
weight |
float |
true |
false |
Parcel weight |
2 decimals |
Insurance |
float |
false |
false |
Insurance value (default: 0) |
|
InsuranceCurrency |
string |
false |
false |
Insurance currency (default: "EUR"), see here |
3 char |
CashOnDelivery |
float |
false |
false |
Cash on delivery value (default: 0) |
|
CashOnDeliveryCurrency |
string |
false |
false |
Cash on delivery currency (default: "EUR"), see here |
3 char |
ContentDescription |
string |
true |
false |
Description of the content |
255 char |
TotalValue |
string |
false ⚠️ |
true |
Value of the order including the currency (e.g. 120.50 EUR) ⚠️ It's required for international shipment! |
|
ShippingService |
string |
true |
true |
Customer selected shipping service (e.g. Express, Standard) |
|
RateCarriers |
Array |
false |
false |
Rate only specific carriers ["DHLExpress", …] |
|
TransactionID |
string |
false |
false |
Your internal reference order number |
35 char |
Nota che l'attributo di risposta delivery_days potrebbe essere sia un numero (es. 2) che una stringa (es. "2-5").
Visita la nostra Documentazione API per visualizzare un esempio di richieste e risposte GetRates API.
Parla con i nostri esperti per saperne di più sulle nostre API e portare il tuo business al livello successivo!