Retrieve a shipping price
GET {{baseUrl}}/shipping-price?shipping_method_id=<integer>&from_country=<string>&to_country=<string>&weight=<integer>&weight_unit=<string>&contract=<integer>&from_postal_code=<string>&to_postal_code=<string>
This endpoint retrieves shipping rate information for a specific shipping_method_id and from_country.
For users that have uploaded their own prices, the response will show the prices that have been uploaded.
The response is an Array of prices for all available receiver countries. If to_country query parameter is present, the Array will only contain one item.
price and currency will be null when no pricing is available for a receiver country.
If you have more than one added active contracts for specific carrier, you must fill
contractattribute with your desired contract's ID in your request. You can get your contracts ID from Retrieve a list of contracts.
In order to view remote surcharges, you are required to provide the
to_countryandto_postal_code. Similarly, to access zonal prices, you need to provideto_country,from_postal_codeandto_postal_code. This information ensures accurate and customized pricing based on the specific location, enabling you to understand any additional charges associated with remote areas and access pricing based on their designated zones.
Request Params
| Key | Datatype | Required | Description | 
|---|---|---|---|
| shipping_method_id | string | (Required) The id of the shipping method retrieved via shipping products or shipping methods. | |
| from_country | string | (Required) The sender country of the shipment, as an ISO 3166-1 alpha-2. | |
| to_country | string | The receiver country of the shipment, as an ISO 3166-1 alpha-2. Required if the carrier is zonal. Also required to see if remote surcharges apply. | |
| weight | string | (Required) The weight of the shipment, in weight_unit. | |
| weight_unit | string | (Required) One of kilogramorgram. | |
| contract | string | Id of the contract that you would like to use to get the price. If you are requesting price for a direct contract then you need to upload your own price via the panel. | |
| from_postal_code | string | Postal code of the sender. Required if the carrier is zonal. | |
| to_postal_code | string | Postal code of the recipient. Required if the carrier is zonal. Also required to see if remote surcharges apply. | 
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
| Accept | string | 
RESPONSES
status: OK
[{"price":"\u003cstring\u003e","currency":"\u003cstring\u003e","to_country":"\u003cstring\u003e","breakdown":[{"type":"\u003cstring\u003e","label":"\u003cstring\u003e","value":"\u003cfloat\u003e"},{"type":"\u003cstring\u003e","label":"\u003cstring\u003e","value":"\u003cfloat\u003e"}]},{"price":"\u003cstring\u003e","currency":"\u003cstring\u003e","to_country":"\u003cstring\u003e","breakdown":[{"type":"\u003cstring\u003e","label":"\u003cstring\u003e","value":"\u003cfloat\u003e"},{"type":"\u003cstring\u003e","label":"\u003cstring\u003e","value":"\u003cfloat\u003e"}]}]