Referencia de la API
//
Obtener tarifas
Recupera las tarifas de envío de todos los transportistas y niveles de servicio activos en tu cuenta, opcionalmente filtradas por transportistas y niveles de servicio específicos, y devuelve los resultados ordenados por el más rápido, el más económico y otros criterios, junto con la información de errores aplicable.
Seguridad
BearerAuth
Dirección a la que se debe devolver el paquete si no se puede entregar o si se devuelve al remitente. Nota: Solo USPS admite la impresión de una dirección de devolución específica en la etiqueta.
Marca de tiempo en formato ISO 8601, incluyendo la hora local y el desplazamiento de zona horaria.
Ejemplo:"2025-07-31T00:00:00+08:00"
Al especificar este parámetro, puedes filtrar las tarifas por transportista y nivel de servicio, lo que permite consultas más rápidas.
POST
curl -i -X POST \
https://x-api.shipsaving.com/api/shipment/get_rates \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"return_address_data": {
"first_name": "Alice",
"last_name": "Green",
"company_name": "ShipSaving",
"phone": "1234567890",
"email": "it@shipsaving.com",
"street": "xxxx Olive Street",
"street2": "STE XXX",
"city": "Los Angeles",
"state": "CA",
"zip_code": "021XX",
"country": "US"
},
"from_address_data": {
"first_name": "Alice",
"last_name": "Green",
"company_name": "ShipSaving",
"phone": "1234567890",
"email": "it@shipsaving.com",
"street": "xxxx Olive Street",
"street2": "STE XXX",
"city": "Los Angeles",
"state": "CA",
"zip_code": "021XX",
"country": "US"
},
"to_address_data": {
"first_name": "Alice",
"last_name": "Green",
"company_name": "ShipSaving",
"phone": "1234567890",
"email": "it@shipsaving.com",
"street": "xxxx Olive Street",
"street2": "STE XXX",
"city": "Los Angeles",
"state": "CA",
"zip_code": "021XX",
"country": "US",
"address_type": "residential"
},
"package_data": {
"type": "my_package",
"length": 10,
"width": 10,
"height": 10,
"weight": 10,
"carrier_package_code": "USPS_SMALL_FLAT_RATE_BOX",
"dimension_unit": "in",
"weight_unit": "lb"
},
"option_data": {
"signature": "signature",
"custom_text_on_label_1": "Por favor, deja el paquete en el casillero.",
"custom_text_on_label_2": "Por favor, deja el paquete en el casillero.",
"hazardous_materials": true,
"is_lithium_battery": false,
"additional_handling": false,
"require_saturday_delivery": false
},
"ship_date": "2025-07-31T00:00:00+08:00",
"shipment_rate_carrier_data": [
{
"provider_id": "USPS_X",
"service_levels": [
"USPS_GROUND_ADVANTAGE"
]
}
],
"custom_data": {
"signing_person": "Ray",
"content_type": "merchandise",
"tax_ids": [
{
"tax_id_type": "TIN",
"tax_id_number": "tin2888",
"country_code": "US"
}
],
"eel_pfc_type": "ITN",
"eel_pfc_code": "X20250719123456",
"undeliverable_option": "return_to_sender",
"item_data_list": [
{
"description": "ropa",
"quantity": 10,
"origin": "US",
"weight": 10,
"unit_cost": 19.99,
"weight_unit": "lb",
"hs_tariff_number": "xx"
}
]
}
}'