Elmatajer · API docs
Shipping

Update shipping zones

Adds or updates zones by name — a zone you don't send stays as it is (nothing is deleted). Handy for shipping companies and suppliers that set the prices.

PATCHhttps://elmatajer.com/api/v1/vendor/shipping/areas
Permission: shipping.write

Request body

NameTypeRequiredDescription
areas[].namestringYesZone name (matched exactly).
areas[].pricenumberYesDelivery price.
areas[].activeboolNoTurn the zone on or off.
citiesstringNoInstead of areas: "Cairo:35,Alexandria:50" (Easy Orders format).

Request

curl -X PATCH "https://elmatajer.com/api/v1/vendor/shipping/areas" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"areas":[{"name":"Cairo","price":35},{"name":"Alexandria","price":50,"active":true}]}'

Response 200

{
    "status": "ok",
    "data": {
        "created": 1,
        "updated": 1,
        "areas": [
            {
                "id": 20,
                "name": "Cairo",
                "price": 35
            },
            {
                "id": 22,
                "name": "Alexandria",
                "price": 50
            }
        ]
    }
}