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 contract attribute 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_country and to_postal_code. Similarly, to access zonal prices, you need to provide to_country, from_postal_code and to_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

KeyDatatypeRequiredDescription
shipping_method_idstring(Required) The id of the shipping method retrieved via shipping products or shipping methods.
from_countrystring(Required) The sender country of the shipment, as an ISO 3166-1 alpha-2.
to_countrystringThe 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.
weightstring(Required) The weight of the shipment, in weight_unit.
weight_unitstring(Required) One of kilogram or gram.
contractstringId 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_codestringPostal code of the sender. Required if the carrier is zonal.
to_postal_codestringPostal code of the recipient. Required if the carrier is zonal. Also required to see if remote surcharges apply.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

[{&quot;price&quot;:&quot;\u003cstring\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;,&quot;to_country&quot;:&quot;\u003cstring\u003e&quot;,&quot;breakdown&quot;:[{&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cfloat\u003e&quot;},{&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cfloat\u003e&quot;}]},{&quot;price&quot;:&quot;\u003cstring\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;,&quot;to_country&quot;:&quot;\u003cstring\u003e&quot;,&quot;breakdown&quot;:[{&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cfloat\u003e&quot;},{&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cfloat\u003e&quot;}]}]