Browse the API docs

Shipping zones

Where the store ships and what it charges. Checkout offers the rates of the buyer's country's zone.

Endpoints#

Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.

The shipping zone object#

What the endpoints below return for one shipping zone.

shipping_zone
{
  "id": "cm2zone0001",
  "name": "United States",
  "countries": [
    "US"
  ],
  "rest_of_world": false,
  "shipping_rates": [
    {
      "id": "cm2rate0001",
      "name": "Free shipping",
      "price": "0.00",
      "min_order_subtotal": "75.00",
      "max_order_subtotal": null,
      "min_weight_grams": null,
      "max_weight_grams": null
    },
    {
      "id": "cm2rate0002",
      "name": "Standard shipping",
      "price": "6.00",
      "min_order_subtotal": null,
      "max_order_subtotal": "74.99",
      "min_weight_grams": null,
      "max_weight_grams": null
    },
    {
      "id": "cm2rate0003",
      "name": "Express (1–2 days)",
      "price": "15.00",
      "min_order_subtotal": null,
      "max_order_subtotal": null,
      "min_weight_grams": null,
      "max_weight_grams": null
    }
  ],
  "created_at": "2026-09-20T10:00:00.000Z",
  "updated_at": "2026-10-23T09:30:00.000Z"
}

List shipping zones#

GET/shipping_zones.jsonread_shipping

Every zone with its rates (cheapest first), oldest zone first. Countries without a zone (and no rest-of-world zone) can't be shipped to.

Request
curl "https://store.weftgrid.com/api/admin/2026-10/shipping_zones.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "shipping_zones": [
    {
      "id": "cm2zone0001",
      "name": "United States",
      "countries": [
        "US"
      ],
      "rest_of_world": false,
      "shipping_rates": [
        {
          "id": "cm2rate0001",
          "name": "Free shipping",
          "price": "0.00",
          "min_order_subtotal": "75.00",
          "max_order_subtotal": null,
          "min_weight_grams": null,
          "max_weight_grams": null
        },
        {
          "id": "cm2rate0002",
          "name": "Standard shipping",
          "price": "6.00",
          "min_order_subtotal": null,
          "max_order_subtotal": "74.99",
          "min_weight_grams": null,
          "max_weight_grams": null
        },
        {
          "id": "cm2rate0003",
          "name": "Express (1–2 days)",
          "price": "15.00",
          "min_order_subtotal": null,
          "max_order_subtotal": null,
          "min_weight_grams": null,
          "max_weight_grams": null
        }
      ],
      "created_at": "2026-09-20T10:00:00.000Z",
      "updated_at": "2026-10-23T09:30:00.000Z"
    }
  ]
}

Get a shipping zone#

GET/shipping_zones/{id}.jsonread_shipping
Request
curl "https://store.weftgrid.com/api/admin/2026-10/shipping_zones/$SHIPPING_ZONE_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "shipping_zone": {
    "id": "cm2zone0001",
    "name": "United States",
    "countries": [
      "US"
    ],
    "rest_of_world": false,
    "shipping_rates": [
      {
        "id": "cm2rate0001",
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "75.00",
        "max_order_subtotal": null,
        "min_weight_grams": null,
        "max_weight_grams": null
      },
      {
        "id": "cm2rate0002",
        "name": "Standard shipping",
        "price": "6.00",
        "min_order_subtotal": null,
        "max_order_subtotal": "74.99",
        "min_weight_grams": null,
        "max_weight_grams": null
      },
      {
        "id": "cm2rate0003",
        "name": "Express (1–2 days)",
        "price": "15.00",
        "min_order_subtotal": null,
        "max_order_subtotal": null,
        "min_weight_grams": null,
        "max_weight_grams": null
      }
    ],
    "created_at": "2026-09-20T10:00:00.000Z",
    "updated_at": "2026-10-23T09:30:00.000Z"
  }
}

Create a shipping zone#

POST/shipping_zones.jsonwrite_shipping

countries lists two-letter ISO codes (country names work too), or is ["*"] for a rest-of-world zone that serves every country not in another zone. A country can be in one zone only, and a store has one rest-of-world zone at most.

Each rate has a name and price, and optional conditions: min_order_subtotal / max_order_subtotal (the order value after discounts) and min_weight_grams / max_weight_grams. At checkout, buyers choose from the rates of their country's zone whose conditions the cart meets, cheapest first.

Request body
{
  "shipping_zone": {
    "name": "Europe",
    "countries": [
      "DE",
      "FR",
      "NL",
      "BE"
    ],
    "shipping_rates": [
      {
        "name": "Standard",
        "price": "9.00",
        "max_order_subtotal": "99.99"
      },
      {
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "100.00"
      },
      {
        "name": "Heavy parcel",
        "price": "24.00",
        "min_weight_grams": 5001
      }
    ]
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/shipping_zones.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "shipping_zone": {
    "name": "Europe",
    "countries": [
      "DE",
      "FR",
      "NL",
      "BE"
    ],
    "shipping_rates": [
      {
        "name": "Standard",
        "price": "9.00",
        "max_order_subtotal": "99.99"
      },
      {
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "100.00"
      },
      {
        "name": "Heavy parcel",
        "price": "24.00",
        "min_weight_grams": 5001
      }
    ]
  }
}'
Example responseShow
{
  "shipping_zone": {
    "id": "cm2zone0001",
    "name": "Europe",
    "countries": [
      "DE",
      "FR",
      "NL",
      "BE"
    ],
    "rest_of_world": false,
    "shipping_rates": [
      {
        "id": "cm2rate0001",
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "75.00",
        "max_order_subtotal": null,
        "min_weight_grams": null,
        "max_weight_grams": null
      },
      {
        "id": "cm2rate0002",
        "name": "Standard shipping",
        "price": "6.00",
        "min_order_subtotal": null,
        "max_order_subtotal": "74.99",
        "min_weight_grams": null,
        "max_weight_grams": null
      },
      {
        "id": "cm2rate0003",
        "name": "Express (1–2 days)",
        "price": "15.00",
        "min_order_subtotal": null,
        "max_order_subtotal": null,
        "min_weight_grams": null,
        "max_weight_grams": null
      }
    ],
    "created_at": "2026-09-20T10:00:00.000Z",
    "updated_at": "2026-10-23T09:30:00.000Z"
  }
}

Update a shipping zone#

PUT/shipping_zones/{id}.jsonwrite_shipping

Fields you leave out keep their values. shipping_rates, when sent, is the zone's full list: rates with an id are updated, rates without one are added, and rates left out are removed.

countries lists two-letter ISO codes (country names work too), or is ["*"] for a rest-of-world zone that serves every country not in another zone. A country can be in one zone only, and a store has one rest-of-world zone at most.

Each rate has a name and price, and optional conditions: min_order_subtotal / max_order_subtotal (the order value after discounts) and min_weight_grams / max_weight_grams. At checkout, buyers choose from the rates of their country's zone whose conditions the cart meets, cheapest first.

Request body
{
  "shipping_zone": {
    "countries": [
      "US",
      "PR"
    ],
    "shipping_rates": [
      {
        "id": "cm2rate0001",
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "60.00"
      },
      {
        "id": "cm2rate0002",
        "name": "Standard shipping",
        "price": "6.00",
        "max_order_subtotal": "59.99"
      }
    ]
  }
}
Request with curl
curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/shipping_zones/$SHIPPING_ZONE_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "shipping_zone": {
    "countries": [
      "US",
      "PR"
    ],
    "shipping_rates": [
      {
        "id": "cm2rate0001",
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "60.00"
      },
      {
        "id": "cm2rate0002",
        "name": "Standard shipping",
        "price": "6.00",
        "max_order_subtotal": "59.99"
      }
    ]
  }
}'
Example responseShow
{
  "shipping_zone": {
    "id": "cm2zone0001",
    "name": "United States",
    "countries": [
      "US"
    ],
    "rest_of_world": false,
    "shipping_rates": [
      {
        "id": "cm2rate0001",
        "name": "Free shipping",
        "price": "0.00",
        "min_order_subtotal": "75.00",
        "max_order_subtotal": null,
        "min_weight_grams": null,
        "max_weight_grams": null
      },
      {
        "id": "cm2rate0002",
        "name": "Standard shipping",
        "price": "6.00",
        "min_order_subtotal": null,
        "max_order_subtotal": "74.99",
        "min_weight_grams": null,
        "max_weight_grams": null
      },
      {
        "id": "cm2rate0003",
        "name": "Express (1–2 days)",
        "price": "15.00",
        "min_order_subtotal": null,
        "max_order_subtotal": null,
        "min_weight_grams": null,
        "max_weight_grams": null
      }
    ],
    "created_at": "2026-09-20T10:00:00.000Z",
    "updated_at": "2026-10-23T09:30:00.000Z"
  }
}

Delete a shipping zone#

DELETE/shipping_zones/{id}.jsonwrite_shipping

Its rates go with it. Buyers in its countries then get the rest-of-world zone's rates, or can't check out if there's none.

Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/shipping_zones/$SHIPPING_ZONE_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{}