Prerequisites
- WooCommerce API Keys: You need Consumer Key and Consumer Secret.
- Base URL: Replace
https://yourstore.comwith your actual WooCommerce store URL. - Authorization: Basic Auth with your Consumer Key and Consumer Secret.
Authorization Setup in Postman
- Go to the Authorization tab.
- Select Type: Basic Auth.
- Username: Enter your Consumer Key.
- Password: Enter your Consumer Secret.
1. Retrieve All Settings Groups
- URL:
https://yourstore.com/wp-json/wc/v3/settings - Method: GET
- Headers:
Authorization: Basic Auth
Example in Postman:
- Set method to GET.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/settings - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Send the request.
2. Retrieve a Settings Group
- URL:
https://yourstore.com/wp-json/wc/v3/settings/{group_id} - Method: GET
- Headers:
Authorization: Basic Auth
- Replace
{group_id}with the actual settings group ID.
Example in Postman:
- Set method to GET.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/settings/{group_id} - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Send the request.
3. Retrieve a Setting
- URL:
https://yourstore.com/wp-json/wc/v3/settings/{group_id}/{id} - Method: GET
- Headers:
Authorization: Basic Auth
- Replace
{group_id}with the actual settings group ID. - Replace
{id}with the actual setting ID.
Example in Postman:
- Set method to GET.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/settings/{group_id}/{id} - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Send the request.
4. Update a Setting
- URL:
https://yourstore.com/wp-json/wc/v3/settings/{group_id}/{id} - Method: PUT
- Headers:
Authorization: Basic Auth
- Body: JSON with updated setting data.
- Replace
{group_id}with the actual settings group ID. - Replace
{id}with the actual setting ID.
Example JSON Body:
{
"value": "new_value"
}
Example in Postman:
- Set method to PUT.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/settings/{group_id}/{id} - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Go to the Body tab, select
raw, chooseJSONfrom the dropdown, and paste the example JSON body. - Send the request.
By following these instructions, you can test each WooCommerce settings endpoint in Postman. Each request should include the necessary Authorization header configured through Basic Auth with your Consumer Key and Consumer Secret. Adjust the {group_id} and {id} parameters with the actual settings group ID and setting ID you intend to work with for retrieving or updating operations. Adjust the base URL and endpoint as needed based on your WooCommerce store setup and the specific settings you want to manage.