Shipping API
The Shipping controller (api/shipping.php, base shipping) manages the store's shipping configuration: zones, the methods attached to each zone, and the catalog of available method types and regions.
Authentication
Admin only — every route calls Helper::check_rest_user_cap( 'manage_options' ). See Authentication.
Routes
| Method | Path | Purpose |
|---|---|---|
| GET | /shipping/zones | List shipping zones |
| POST | /shipping/zones | Create a zone |
| GET | /shipping/zones/<zone_id> | Get a zone |
| PUT/PATCH | /shipping/zones/<zone_id> | Update a zone |
| DELETE | /shipping/zones/<zone_id> | Delete a zone |
| GET | /shipping/zones/<zone_id>/methods | Methods in a zone |
| POST | /shipping/zones/<zone_id>/methods | Add a method to a zone |
| GET | /shipping/methods | Available method types |
| GET | /shipping/methods/<method_id>/<instance_id> | Get a configured method instance |
| PUT/PATCH | /shipping/methods/<method_id>/<instance_id> | Update a method instance |
| DELETE | /shipping/methods/<method_id>/<instance_id> | Delete a method instance |
| GET | /shipping/regions | List selectable regions |
All paths are relative to /wp-json/storeengine/v1.
Zones
GET /shipping/zones
Lists all shipping zones with their locations and attached methods.
curl https://your-store.example/wp-json/storeengine/v1/shipping/zones \
-u "admin:APPLICATION_PASSWORD"
POST /shipping/zones · PUT/PATCH /shipping/zones/<zone_id>
| Param | Type | Required | Notes |
|---|---|---|---|
zone_name | string | yes | Display name of the zone. |
zone_locations | string[] | no | Region codes assigned to the zone. |
zone_postcodes | string | no | Newline-separated postcodes/ranges. |
curl -X POST https://your-store.example/wp-json/storeengine/v1/shipping/zones \
-u "admin:APPLICATION_PASSWORD" \
-H "Content-Type: application/json" \
-d '{ "zone_name": "North America", "zone_locations": ["US", "CA"] }'
DELETE /shipping/zones/<zone_id>
Deletes a zone and its method instances.
Zone methods
GET /shipping/zones/<zone_id>/methods
Lists the method instances configured in a zone.
POST /shipping/zones/<zone_id>/methods
Adds a shipping method to the zone. The body follows the method's own settings schema (discover it with an OPTIONS request against the route). The response includes the new instance's method_id + instance_id, which you then use on the method-instance routes below.
Method instances
A configured method is addressed by its method_id (the method type, e.g. flat_rate) and its numeric instance_id.
GET /shipping/methods/<method_id>/<instance_id>
Returns the configured settings for a single method instance.
PUT/PATCH /shipping/methods/<method_id>/<instance_id>
Updates a method instance.
| Param | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Instance title. |
zone_id | integer | yes | Owning zone. |
Plus the method-type-specific settings.
DELETE /shipping/methods/<method_id>/<instance_id>
Removes the method instance from its zone.
Catalog
GET /shipping/methods
Lists the available shipping method types that can be added to a zone (flat rate, free shipping, and any registered by addons).
GET /shipping/regions
Lists the selectable regions (countries/continents) for assigning to zones.
Related
- Checkout API — shipping rates are surfaced in the checkout state snapshot (
shipping_rates). - Settings API — store-wide configuration.
- Taxes API