Skip to content

Create a Shipping Zone

Endpoint: https://api.youcan.shop/shipping-zones

Method: POST

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

Response

[201] Created

json
{
    "id": "b5f5e964-c34a-4e48-90f2-8a1853bc1596",
    "name": "Fast Shipping Worldwide",
    "display_name": "Fast Shipping Worldwide",
    "countries": [
        "rotw"
    ],
    "is_free": false,
    "is_active": true,
    "rate_type": "price",
    "rates": [
        {
            "id": "c1095c02-ad79-4a77-a06c-fa3bad157fcc",
            "min": 20.1,
            "max": 30,
            "price": 30
        },
        {
            "id": "ce7b658a-49ed-4808-9a9c-d768157799f7",
            "min": 10.1,
            "max": 20,
            "price": 20
        },
        {
            "id": "e8558101-d47b-4ec3-b901-e26452f9e9fa",
            "min": 0,
            "max": 10,
            "price": 10
        },
        {
            "id": "feb23f02-3f0d-4cbe-9d4d-bad547723ab6",
            "min": 30.1,
            "max": null,
            "price": 30.1
        }
    ]
}