Skip to main content

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

MethodPathPurpose
GET/shipping/zonesList shipping zones
POST/shipping/zonesCreate 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>/methodsMethods in a zone
POST/shipping/zones/<zone_id>/methodsAdd a method to a zone
GET/shipping/methodsAvailable 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/regionsList 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>

ParamTypeRequiredNotes
zone_namestringyesDisplay name of the zone.
zone_locationsstring[]noRegion codes assigned to the zone.
zone_postcodesstringnoNewline-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.

ParamTypeRequiredNotes
namestringyesInstance title.
zone_idintegeryesOwning 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.