Sendcloud - Get Rates
Description
Section titled “Description”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.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Sendcloud credential (provider: sendcloud) |
| shipping_method_id | text | No | Shipping method ID (if empty, returns all) |
| from_country | text | Yes | ISO 2-letter origin country code (default: ES) |
| to_country | text | Yes | ISO 2-letter destination country code |
| weight | text | Yes | Package weight in kilograms (e.g.: 1.500) |
| weight_unit | select | No | Weight unit: kilogram (default), gram, pound, ounce |
Credentials
Section titled “Credentials”A sendcloud type credential is required with the following fields:
- public_key: Sendcloud Public Key
- secret_key: Sendcloud Secret Key
Output
Section titled “Output”{ "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"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_sendcloud", "from_country": "ES", "to_country": "ES", "weight": "1.500"}API Used
Section titled “API Used”- Endpoint: GET
/shipping-price - Base: Sendcloud API (via helper
_sendcloudHelper) - Documentation: https://docs.sendcloud.sc/api/v2/
- 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