Seeing a 404 error when you request products through the WooCommerce REST API can be frustrating, especially when your store looks fine on the surface. The good news is that these errors are often caused by a few fixable issues, such as incorrect API endpoints, permalink settings, authentication, or product visibility.
This guide walks you through practical ways to troubleshoot WooCommerce REST API 404 products errors, identify what’s preventing the API from finding your products, and get your integration working again.
Diagnose WooCommerce REST API 404 Products Errors
When a product request fails, the response is a clue—not just a dead end. Check the request step by step to find out whether the problem is the URL, the product record, access permissions, or a particular endpoint.
Start by checking that the request points to the intended WooCommerce route and identifies the right resource. Small differences in the API version or ID can make a valid product appear missing.
Check the endpoint URL, API version, and product ID
For example, a product request should follow this pattern: https://example.com/wp-json/wc/v3/products/123. Confirm that wc/v3 matches the version your integration uses, and that the site’s base URL and product ID are correct.
Use the product’s numeric ID in the individual-product route; a SKU is not interchangeable with an ID. If you are unsure of the ID, request the product list or search by SKU, such as /products?sku=ABC-123, then compare the returned record.
Once the route checks out, make sure the requested item is available in the store data your API can access. Product status and resource type can explain why one record is missing while others load normally.
Confirm the product exists and is visible to the API
In the WordPress dashboard, open the product and check that it has been saved and published. Draft, trashed, or otherwise non-public products may not appear in a standard read request; a product’s catalog visibility setting can also affect storefront display.
Check that you are querying the right resource. A variation has its own route nested under its parent product, for example /products/123/variations/456. Verify the parent ID and variation ID rather than requesting the variation as a standalone product.
If the URL and product record look right, review the credentials used by the request. This helps separate a missing-resource problem from an access issue that may be obscured by a proxy or security layer.
Verify API keys, permissions, and authentication
Confirm that the API key is active and has read permission at minimum. Check that the request sends its credentials using the authentication method supported by your site, and that a firewall, CDN, or security plugin is not stripping or blocking them.
Authentication problems usually produce a 401 or 403 response, but intermediaries can alter what you see. Compare the response when using a valid key with the response from an unauthenticated request, and inspect server or security-plugin logs if the results differ.
Finally, compare the failing request with nearby routes to narrow down whether the issue affects one product or the API more broadly. Keep the same host, credentials, and request method so the comparison is useful.
Compare the response with other product endpoints
Try the collection route, /products, and then request a known published product by ID. You can also test a related route, such as /products/categories, to see whether the problem is limited to product records or affects the API more widely.
- Collection works, one ID fails: recheck that product’s ID, status, and resource type.
- All product routes fail: investigate the base URL, authentication, or server rules.
- Only a variation fails: verify its parent product and variation ID.
Refresh WordPress Routes and Clear Conflicting Cache
If the product and request details check out, the problem may be between WordPress and the server rather than in the product record itself. Refreshing rewrite rules and checking for stale or blocked responses can help restore the route without changing product data.
A quick permalink refresh can rebuild the rules WordPress uses to map readable URLs to API routes. It’s a low-risk first step when REST requests return 404s despite a valid endpoint.
Resave permalink settings to rebuild rewrite rules
In WordPress, go to Settings → Permalinks and click Save Changes without changing the current structure. This prompts WordPress to regenerate its rewrite rules, which may resolve routes that stopped working after a migration, plugin change, or server update.
Retest the product request afterward. If it still fails, open /wp-json/ in a browser or request it with your API client. A working REST index but a failing product route points toward a more specific routing or access issue.
When rebuilding the rules doesn’t help, check whether the web server is passing REST requests to WordPress correctly. This is especially useful if the API index and several unrelated routes also fail.
Check server rules and REST API availability
On Apache, review whether the site’s .htaccess file contains the standard WordPress rewrite rules and can be read by the server. On Nginx, confirm that the site configuration forwards requests to WordPress’s front controller; Nginx does not use .htaccess.
Ask your host to check server logs if you’re unsure what changed. Also verify that a hosting setting or maintenance tool hasn’t disabled the REST API. Back up configuration files before editing them, and avoid copying server rules from an unrelated setup.
Even a correct route can appear broken if a cache keeps serving an old response. Clear each caching layer in turn so you can tell whether the latest request reaches WordPress.
Clear plugin, server, and CDN caches
Purge caches from your WordPress caching plugin, hosting control panel, and CDN, then send a fresh request. If your setup supports it, temporarily bypass caching for /wp-json/ routes, particularly for authenticated requests.
Test again after each purge rather than clearing everything repeatedly. This can reveal which layer was holding the stale 404 and helps prevent unnecessary changes to working cache settings.
If fresh requests still fail, a security rule may be intercepting them before WooCommerce can respond. Check access controls next, especially when the issue began after a security update or custom development work.
Look for security plugins or custom code blocking requests
Review security-plugin logs and settings for REST API restrictions, blocked IP addresses, or rules affecting /wp-json/wc/. Temporarily disable a suspected plugin only in a safe testing window, then repeat the same request; restore it promptly and add a narrow exception if the test confirms the cause.
Custom snippets or must-use plugins can also disable routes or alter REST permissions. Search recent code changes for filters involving REST API access, and ask a developer to review them if needed. Allow only the required route and users rather than turning off security protections site-wide.
Test Product Requests and Prevent Future 404s
Once the route and site configuration look sound, a controlled test can show exactly where the request stops working. Use the same request to confirm the fix, then keep a simple record of changes so future failures are easier to trace.
A known, published product makes a useful test case because its expected result is clear. Send a direct request and check both the response code and the returned product data.
Send a simple GET request with a known product ID
Choose a product you can see in the dashboard and copy its numeric ID. Then send a GET request to https://example.com/wp-json/wc/v3/products/123, replacing the domain and ID with your own. Use the same credentials and API version as the integration that reported the error.
With cURL, a basic test looks like this:
curl -u consumerkey:consumersecret "https://example.com/wp-json/wc/v3/products/123"
A successful response should include the product’s ID and details in JSON. If this test works but your application still fails, compare its final URL, HTTP method, and authentication handling with the test request.
The response code helps narrow down the cause, while application logs can provide context that the response alone doesn’t show. Check both before changing product data or server settings.
Review status codes and WooCommerce logs
A 404 generally means the requested resource or route wasn’t found; a 401 or 403 points more directly to authentication or permission trouble. Note the response body as well, since it may contain a REST error code and message that identifies the failing route or check.
In WordPress, open WooCommerce → Status → Logs and review logs around the time of the request. Not every REST failure is recorded there, so also check your host’s PHP or web-server logs and any security-plugin activity. Record the timestamp, URL, status code, and error message before escalating the issue.
Not every product-like URL represents a standard product record. Variations, removed items, and custom endpoints each need a slightly different check.
Troubleshoot variations, deleted products, and custom routes
For a variation, test its nested route using the correct parent product ID and variation ID. If a product was deleted or moved to the trash, a 404 may be expected; confirm its current status in the dashboard rather than assuming the API is malfunctioning.
Custom routes require extra care: verify the route’s namespace and path, and ask the developer to check that its callback and permission settings are registered correctly. Avoid making a custom endpoint public just to eliminate a 404; access should remain limited to authorized users.
After restoring access, a small monitoring routine can help catch regressions before a customer or integration partner reports them. Focus on changes that commonly affect routes and permissions.
Add a routine for monitoring API access and changes
Schedule a periodic request to a known product endpoint and alert someone if it returns an unexpected status. Keep a brief change log for updates to plugins, themes, server rules, API credentials, and custom code.
- Test after significant updates, using the same known product request.
- Store error details securely; never include API secrets in shared logs.
- Recheck permissions and routes after migrations or integration changes.
This gives you a repeatable baseline: when WooCommerce REST API 404 products errors recur, you can compare the failing request with a known-good test and pinpoint what changed.
Get Your WooCommerce Product API Back on Track
WooCommerce REST API 404 products errors can stem from a simple mismatch in the request—or from WordPress routing, caching, or access controls. Narrowing down whether the issue affects one product or the API more broadly helps you focus on the right fix without making unnecessary changes.
After resolving the error, test a known product request and keep an eye on API responses after updates or configuration changes. With a clear troubleshooting routine, you can restore your integration more confidently and catch future issues before they disrupt your store.