Skip to main content

Shipping zones

The shipping zones API allows you to create, view, update, and delete individual shipping zones.

Shipping zone properties

AttributeTypeDescription
idintegerUnique identifier for the resource. READ-ONLY
namestringShipping zone name. MANDATORY
orderintegerShipping zone order.

Create a shipping zone

This API helps you to create a new shipping zone.

POST /wp-json/wc/v2/shipping/zones
curl -X POST https://example.com/wp-json/wc/v2/shipping/zones \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"name": "Brazil"
}'

Retrieve a shipping zone

This API lets you retrieve and view a specific shipping zone by ID.

GET /wp-json/wc/v2/shipping/zones/<id>
curl https://example.com/wp-json/wc/v2/shipping/zones/5 \
-u consumer_key:consumer_secret

List all shipping zones

This API helps you to view all the shipping zones.

GET /wp-json/wc/v2/shipping/zones
curl https://example.com/wp-json/wc/v2/shipping/zones \
-u consumer_key:consumer_secret

Update a shipping zone

This API lets you make changes to a shipping zone.

PUT /wp-json/wc/v2/shipping/zones/<id>
curl -X PUT https://example.com/wp-json/wc/v2/shipping/zones/5 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"order": 1
}'

Delete a shipping zone

This API helps you delete a shipping zone.

DELETE /wp-json/wc/v2/shipping/zones/<id>
curl -X DELETE https://example.com/wp-json/wc/v2/shipping/zones/5?force=true \
-u consumer_key:consumer_secret

Available parameters

ParameterTypeDescription
forcestringRequired to be true, as resource does not support trashing.