Aller au contenu principal
Version: 1.x

API04002: Unexpected Response Code

What This Means

The server returned an HTTP status code that wasn't expected for this request. Common codes include 500 (server error), 403 (forbidden), 404 (not found), etc.

Common Causes

  • 500 Internal Server Error — PHP crashed or encountered an error
  • 403 Forbidden — Access denied by security settings
  • 404 Not Found — The endpoint doesn't exist
  • 502/503/504 — Server gateway or availability issues

How to Fix

For 500 Errors (Server Error)

  1. Check PHP error logs
  2. Increase PHP memory limit
  3. Look for plugin conflicts
  4. Check wp-content/debug.log

For 403 Errors (Forbidden)

  1. Check security plugin settings (Wordfence, Sucuri, etc.)
  2. Whitelist the POS or your IP
  3. Check .htaccess for blocking rules
  4. Verify ModSecurity isn't blocking requests

For 404 Errors (Not Found)

  1. Verify the WCPOS plugin is active
  2. Flush WordPress permalinks (Settings → Permalinks → Save)
  3. Check if REST API is enabled
  4. Verify URL configuration

For 502/503/504 Errors (Gateway Issues)

  1. Contact your hosting provider
  2. Wait for server to recover
  3. Check if site is under heavy load
  4. Verify server is running

General Troubleshooting

  1. Try accessing your site directly
  2. Check hosting control panel for issues
  3. Review server access logs
  4. Contact hosting support if needed