Skip to content

Update a Shipping Zone

Endpoint: https://api.youcan.shop/shipping-zones/{id}

Method: PUT

Required Scopes

  • edit-shipping-zones

Parameters

Param NameParam TypeDescriptionRequired
namestringshipping zone nameyes
display_namestringshipping zone display nameyes
countriesarray,nullshipping zone countries codes, use rotw as code for the rest of the world countries.no
is_freebooleanis free shippingno
is_activebooleanis shipping zone activeno
rate_typestring(prince, weight)no
ratesarrayshipping zone ratesrequired if is_free false
rates.*.minfloatshipping rate minyes
rates.*.maxfloat,nullshipping rate maxno
rates.*.pricefloatshipping rate priceyes

Responses

[200] OK

json
{
    "message": "Shipping zone updated successfully",
    "http_code": 200,
    "code": "UPDATED",
    "type": "success",
    "data": null
}

[404] Not Found

json
{
    "status": 404,
    "code": 404,
    "detail": "Shipping zone not found",
    "meta": []
}