Create a rate
POST/shipping/{connection_id}/rate
Parameters
fieldsstring array
Fields to return
rawstring
Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
connection_idstring required
ID of the connection
Payload
shipment_idstring
Reference to the shipping object (if rate is for existing shipment)
currencystring
ship_by_atdate-time
Latest date to ship (from order) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
carrier_idstring
Reference to the carrier
idstring
Unique identifier for this rate object
Returns
| Response field | Type | Required | Description |
|---|---|---|---|
shipment_id | string | No | Reference to the shipping object (if rate is for existing shipment) |
currency | string | No | |
from_address | object | No | Origin address |
from_address.address1 | string | No | |
from_address.address2 | string | No | |
from_address.city | string | No | |
from_address.region | string | No | |
from_address.region_code | string | No | |
from_address.postal_code | string | No | |
from_address.country | string | No | |
from_address.country_code | string | No | ISO 2-digit country code |
from_address.name | string | No | Recipientsender name |
from_address.company_name | string | No | Company name (for commercial addresses) |
from_address.telephone | string | No | Phone number (required by FedEx, UPS, DHL) |
from_address.email | string | No | Email address (for delivery notifications) |
from_address.is_residential | boolean | No | Alias for address_type === 'RESIDENTIAL' |
from_address.is_validated | boolean | No | Whether address has been validated |
from_address.delivery_instructions | string | No | Special delivery notes |
to_address | object | No | Destination address |
to_address.address1 | string | No | |
to_address.address2 | string | No | |
to_address.city | string | No | |
to_address.region | string | No | |
to_address.region_code | string | No | |
to_address.postal_code | string | No | |
to_address.country | string | No | |
to_address.country_code | string | No | ISO 2-digit country code |
to_address.name | string | No | Recipientsender name |
to_address.company_name | string | No | Company name (for commercial addresses) |
to_address.telephone | string | No | Phone number (required by FedEx, UPS, DHL) |
to_address.email | string | No | Email address (for delivery notifications) |
to_address.is_residential | boolean | No | Alias for address_type === 'RESIDENTIAL' |
to_address.is_validated | boolean | No | Whether address has been validated |
to_address.delivery_instructions | string | No | Special delivery notes |
packages | ShippingPackage[] | No | Multiple packages (alternative to package) |
packages[].weight | number | No | Weight of the package |
packages[].weight_unit | enum | No | Unit for weight (g, kg, oz, lb) Values: g, kg, oz, lb |
packages[].length | number | No | Length of the package |
packages[].width | number | No | Width of the package |
packages[].height | number | No | Height of the package |
packages[].size_unit | enum | No | Unit for dimensions (cm, inch) Values: cm, inch |
packages[].description | string | No | Description of the package contents |
packages[].value | number | No | Declared value of the package |
packages[].currency | string | No | ISO 4217 currency code |
packages[].tracking_number | string | No | Package-level tracking (for multi-package shipments) |
packages[].insured_amount | number | No | Insured value for this package |
ship_by_at | string (date-time) | No | Latest date to ship (from order) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
carrier_id | string | No | Reference to the carrier |
id | string | No | Unique identifier for this rate object |
rates | ShippingRateRate[] | No | |
rates[].title | string | Yes | |
rates[].description | string | No | |
rates[].amount | number | No | |
rates[].currency | string | No | |
rates[].base_amount | number | No | Base shipping rate |
rates[].tax_amount | number | No | |
rates[].discount_amount | number | No | Applied discount |
rates[].surcharges | ShippingRateSurcharge[] | No | Additional charges |
rates[].surcharges[].code | string | No | Surcharge type (e.g., "RESIDENTIAL", "FUEL", "SIGNATURE") |
rates[].surcharges[].name | string | No | Human-readable name |
rates[].surcharges[].amount | number | No | Surcharge amount |
rates[].surcharges[].description | string | No | Description of surcharge |
rates[].rate_source | string | No | Source of rate (e.g., "carrier", "negotiated", "account") |
rates[].is_negotiated_rate | boolean | No | Whether this is a negotiated rate |
rates[].estimated_days | number | No | Estimated delivery time in days |
rates[].delivery_days | number | No | Delivery days (integer) |
rates[].estimated_delivery_end_at | string (date-time) | No | Specific delivery date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
rates[].estimated_delivery_start_at | string (date-time) | No | Time window (e.g., "10:00 AM - 2:00 PM") (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
rates[].delivery_terms | string | No | Delivery duration terms (e.g., "3-5 business days") |
rates[].transit_hours | number | No | Transit time in hours |
rates[].is_guaranteed | boolean | No | Whether delivery is guaranteed |
rates[].package_type | string | No | Package type (e.g., "package", "envelope", "flat") |
rates[].is_trackable | boolean | No | Whether shipment is trackable |
rates[].is_active | boolean | No | Whether rate is currently available |
Errors
Errors return the HTTP status code and a JSON body with statusCode, error (the short label) and message (a human-readable detail).
{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests to unified.to API; max requests per minute: N"
}| Status | Error | Meaning |
|---|---|---|
400 | Bad Request | The request was malformed or failed validation. |
401 | Unauthorized | The connection is likely broken; re-authorize it. |
403 | Forbidden | The connection is missing permissions or scopes. |
404 | Not Found | The requested resource does not exist. |
429 | Too Many Requests | Rate limit exceeded (see the two sources below). |
500 | Internal Server Error | An unexpected error occurred. |
501 | Not Implemented | Not supported by this integration. |
Errors from the underlying integration pass through: the integration's status comes back as ours (429, 401, 403, 404 or 5xx), usually with its message. When the integration's error body is unclear, Unified extracts what it can and returns a clearer message.
429 Too Many Requests
A 429 has two possible sources:
- The integration's own rate limit, passed through.
- Unified's workspace limit: a rolling 60 seconds, set by plan, with the message
Too many requests to unified.to API; max requests per minute: N.
const options = {
method: 'POST',
url: 'https://api.unified.to/shipping/5de520f96e439b002043d8dc/rate',
headers: {
authorization: 'bearer .....'
},
data: undefined,
params: {
fields: '',
raw: '',
}
};
const results = await axios.request(options); Are we missing anything? Let us know