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. List Tags
- URL:
https://yourstore.com/wp-json/wc/v3/products/tags - Method: GET
- Headers:
Authorization: Basic Auth
Example in Postman:
- Set method to GET.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/products/tags - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Send the request.
2. Retrieve a Tag
- URL:
https://yourstore.com/wp-json/wc/v3/products/tags/{id} - Method: GET
- Headers:
Authorization: Basic Auth
- Replace
{id}with the actual tag ID.
Example in Postman:
- Set method to GET.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/products/tags/{id} - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Send the request.
3. Create a Tag
- URL:
https://yourstore.com/wp-json/wc/v3/products/tags - Method: POST
- Headers:
Authorization: Basic Auth
- Body: JSON with tag data.
Example JSON Body:
{
"name": "New Tag",
"slug": "new-tag",
"description": "This is a new tag"
}
Example in Postman:
- Set method to POST.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/products/tags - 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.
4. Update a Tag
- URL:
https://yourstore.com/wp-json/wc/v3/products/tags/{id} - Method: PUT
- Headers:
Authorization: Basic Auth
- Body: JSON with updated tag data.
- Replace
{id}with the actual tag ID.
Example JSON Body:
{
"name": "Updated Tag",
"description": "This is the updated tag description"
}
Example in Postman:
- Set method to PUT.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/products/tags/{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.
5. Delete a Tag
- URL:
https://yourstore.com/wp-json/wc/v3/products/tags/{id} - Method: DELETE
- Headers:
Authorization: Basic Auth
- Replace
{id}with the actual tag ID.
Example in Postman:
- Set method to DELETE.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/products/tags/{id} - Go to the Authorization tab and set Type to Basic Auth.
- Enter Consumer Key and Consumer Secret.
- Send the request.
6. Batch Update Tags
- URL:
https://yourstore.com/wp-json/wc/v3/products/tags/batch - Method: POST
- Headers:
Authorization: Basic Auth
- Body: JSON with batch operations.
Example JSON Body:
{
"update": [
{
"id": 1,
"name": "Updated Tag 1"
},
{
"id": 2,
"description": "Updated description for tag 2"
}
]
}
Example in Postman:
- Set method to POST.
- Enter URL:
https://yourstore.com/wp-json/wc/v3/products/tags/batch - 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 tags endpoint in Postman. Each request should include the necessary Authorization header configured through Basic Auth with your Consumer Key and Consumer Secret.