Woo api

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Woo api is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. Build and consume WooCommerce REST API v3 endpoints — authentication, custom endpoints, extending existing resources, webhooks, and batch operations. Use when creating custom API endpoints or integrating external systems with WooCommerce.

How to use this skill

Skill file

WooCommerce REST API Development

Before writing code

Fetch live docs:

  1. Fetch https://woocommerce.github.io/woocommerce-rest-api-docs/ for API reference
  2. Fetch https://developer.wordpress.org/rest-api/ for WordPress REST API handbook
  3. Web-search site:developer.woocommerce.com rest api extending for extension patterns

REST API Architecture

Foundation

WooCommerce REST API v3 extends the WordPress REST API:

Built-In Endpoints

| Resource | Endpoint | Methods |

|----------|----------|---------|

| Products | /wc/v3/products | GET, POST, PUT, DELETE |

| Product Variations | /wc/v3/products/{id}/variations | GET, POST, PUT, DELETE |

| Orders | /wc/v3/orders | GET, POST, PUT, DELETE |

| Customers | /wc/v3/customers | GET, POST, PUT, DELETE |

| Coupons | /wc/v3/coupons | GET, POST, PUT, DELETE |

| Reports | /wc/v3/reports | GET |

| Settings | /wc/v3/settings | GET, PUT |

| Shipping Zones | /wc/v3/shipping/zones | GET, POST, PUT, DELETE |

| Tax Rates | /wc/v3/taxes | GET, POST, PUT, DELETE |

| Webhooks | /wc/v3/webhooks | GET, POST, PUT, DELETE |

| System Status | /wc/v3/system_status | GET |

Authentication

API Keys

WooCommerce generates consumer key/secret pairs:

Application Passwords (WordPress 5.6+)

WordPress-native auth — username + application password via HTTP Basic Auth. Works for all WP REST API endpoints including WooCommerce.

Cookie/Nonce Authentication

For internal (same-site) JavaScript:

Custom Endpoints

Registering Routes

Use rest_api_init action to register routes:

Controller Pattern

Extend WP_REST_Controller for structured endpoints:

Extending WooCommerce Endpoints

Add fields to existing WooCommerce resources:

Filtering Responses

Webhooks

Built-In Webhooks

WooCommerce webhooks fire on resource events:

Custom Webhook Topics

Filter woocommerce_valid_webhook_events and woocommerce_webhook_topic_hooks to add custom topics.

Batch Operations

POST to /wc/v3/products/batch with create, update, delete arrays to perform bulk operations in a single request.

Best Practices

Fetch the WooCommerce REST API docs and WordPress REST API handbook for exact endpoint paths, parameters, and authentication details before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.