Create Shipping Zone

POST {{baseUrl}}/shipping/zones

This endpoint allows you to create a Custom Shipping Zone.

💡 Note

If you ship to all countries and cities, set the value of country and city in their respective IDs to -1. Note that the variables code and mobile_code will NOT be in the response based on setting the mentioned values to -1.

Fixed vs Rate Types

When you create a Shipping Zone of type fixed, the variable fees.amount is required. When you create a Shipping Zone of type rate, the variables fees.up_to_weight, fees.amount_per_unit, and fees.per_unit are required.

OAuth Scopes


shippings.read_write

Request Body

{"company"=>488260393, "shipping"=>{"country"=>1939592358, "city"=>1592433390, "cities_excluded"=>[257742554, 81998629], "cash_on_delivery"=>{"fees"=>12, "status"=>true}, "fees"=>{"type"=>"rate", "amount"=>11, "up_to_weight"=>5, "amount_per_unit"=>2, "per_unit"=>3}, "duration"=>"13 days"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"status":200,"success":true,"data":{"id":488260393,"zone_code":".SA.riyadh","company":{"id":1473353380,"slug":null},"country":{"id":1473353380,"name":"السعودية","name_en":"Saudi Arabia","code":"SA","mobile_code":"+966"},"city":{"id":1473353380,"name":"الرياض","name_en":"Riyadh"},"cities_excluded":[{"id":257742554,"name":"أبو حليفة","name_en":"ABU HALIFA"}],"fees":{"amount":"15.00","currency":"SAR","type":"fixed","weight_unit":"kg","up_to_weight":5,"amount_per_unit":2,"per_unit":3},"cash_on_delivery":{"status":true,"fees":"12.00"},"duration":"3-5"}}