Calculates the shipping price for a specific product based on the destination country, region, quantity, and whether the product is a sample. It returns the initial, additional, and final shipping prices along with the applicable weight or quantity range.
| Field | Description |
|---|---|
|
(required) |
[string] Name of the destination country. |
|
(optional) |
[string] Name of the region or state within the country. |
|
(required) |
[integer] ID of the product for which shipping price is calculated. |
|
(required) |
[integer] Number of units to be shipped. |
|
(required) |
[boolean] Set to true if the product is a sample, otherwise false. |
{
"country_name": "United Kingdom",
"region_name": null,
"product_id": 2,
"quantity": 12,
"is_sample": false
}
A successful request returns HTTP 200 and a JSON response body with detailed shipping cost information.
| Field | Description |
|---|---|
status |
[integer] HTTP status code of the response. |
response |
[boolean] Indicates if the request was successful (true or false). |
data |
[object] Contains the shipping cost details returned by the API (see "Data object" below). |
msg |
[string] Response message describing the result of the request. |
Data object
| Field | Description |
|---|---|
shipping_initial_price |
[string] Base price for shipping the product. |
shipping_additional_price_1 |
[string] Additional price. |
shipping_additional_price_2 |
[string] Additional price. |
shipping_final_price |
[string] Total shipping price after all calculations. |
range_from |
[string] Minimum quantity or weight applicable for this pricing. |
range_to |
[string] Maximum quantity or weight applicable for this pricing. |
{
"status": 200,
"response": true,
"data": {
"shipping_initial_price": "50.00",
"shipping_additional_price_1": "0.00",
"shipping_additional_price_2": "0.00",
"shipping_final_price": "50.00",
"range_from": "5.00",
"range_to": "1000.00"
},
"msg": ""
}