Skip to content

Sendcloud - Get Rates

This module gets the available shipping prices in Sendcloud for a given package. It receives the origin country, destination country, weight, and optionally a specific shipping method ID and weight unit. It makes a GET request to the /shipping-price endpoint with the corresponding parameters. It returns the available rates with method ID, carrier, name, price, currency, and weight ranges. It automatically identifies the cheapest rate.

ParameterTypeRequiredDescription
credentials_idcredentialsYesSendcloud credential (provider: sendcloud)
shipping_method_idtextNoShipping method ID (if empty, returns all)
from_countrytextYesISO 2-letter origin country code (default: ES)
to_countrytextYesISO 2-letter destination country code
weighttextYesPackage weight in kilograms (e.g.: 1.500)
weight_unitselectNoWeight unit: kilogram (default), gram, pound, ounce

A sendcloud type credential is required with the following fields:

  • public_key: Sendcloud Public Key
  • secret_key: Sendcloud Secret Key
{
"success": true,
"rates": [
{
"shipping_method_id": 8,
"carrier": "correos_express",
"name": "Correos Express Paq 24h",
"price": "5.50",
"currency": "EUR",
"min_weight": "0.001",
"max_weight": "5.000"
}
],
"rates_count": 4,
"cheapest": {
"shipping_method_id": 12,
"carrier": "correos",
"name": "Correos Paq Standard",
"price": "3.80",
"currency": "EUR"
},
"message": "4 tarifas obtenidas"
}
{
"credentials_id": "mi_credencial_sendcloud",
"from_country": "ES",
"to_country": "ES",
"weight": "1.500"
}
  • If no shipping_method_id is specified, all available rates are returned
  • The default currency is EUR
  • The default weight unit is kilograms; it can be changed with weight_unit
  • Rates include weight ranges (min_weight, max_weight) for each method