WooCommerce

{/* Generated by scripts/generate-integration-catalog.mjs. Do not edit by hand. */}

At a glance

  • Availability: Experimental (how to enable).
  • Authentication: Basic auth.
  • Connection: HTTP Basic auth with WOOCOMMERCE_CONSUMER_KEY as the username and WOOCOMMERCE_CONSUMER_SECRET as the password.
  • Provider documentation: Authentication reference.

Credentials

Set these per environment. See Connect an integration.

VariableRequiredDescription
WOOCOMMERCE_CONSUMER_KEYYesWooCommerce REST API consumer key (starts with ck_), used as the HTTP Basic username Docs.
WOOCOMMERCE_CONSUMER_SECRETYesWooCommerce REST API consumer secret (starts with cs_), used as the HTTP Basic password Docs.
WOOCOMMERCE_STORE_DOMAINYesDomain of the WordPress site hosting your WooCommerce store (e.g. shop.example.com); the REST API lives at https://<domain>/wp-json/wc/v3

Setup

  1. Get a WooCommerce store: You need a WordPress site with the WooCommerce plugin active and HTTPS enabled. For testing, spin up a free local site with WordPress Studio or a hosted trial (e.g. WooExpress) and install WooCommerce from Plugins > Add New.
  2. Open the REST API key screen: In the WordPress admin, go to WooCommerce > Settings > Advanced > REST API and click Add key.
  3. Generate the key pair: Enter a description, pick the owning user, and choose the permission level: Read for read-only access, or Read/Write if the agent should update orders and create products. Click Generate API key.
  4. Copy the credentials: Copy the Consumer key (ck_...) into WOOCOMMERCE_CONSUMER_KEY and the Consumer secret (cs_...) into WOOCOMMERCE_CONSUMER_SECRET. The secret is shown only once. Set WOOCOMMERCE_STORE_DOMAIN to your store's domain, e.g. shop.example.com.

Provider notes

  • The REST API is served from your own store domain at https://<store-domain>/wp-json/wc/v3; every tool reads it from the WOOCOMMERCE_STORE_DOMAIN environment variable.
  • Keys generated with Read permission will receive 401 errors on write tools like update_order_status and create_product.
  • Credentials are sent via HTTP Basic auth, so the store must be served over HTTPS.
  • If your site uses non-pretty permalinks, the wp-json route may be unavailable; enable pretty permalinks under Settings > Permalinks.

Provider API reference.

Tools

ToolAccessDescription
List Orders<br /><code className="reference-identifier">woocommerce__list_orders</code>ReadList orders
Get Order<br /><code className="reference-identifier">woocommerce__get_order</code>ReadGet order
Update Order Status<br /><code className="reference-identifier">woocommerce__update_order_status</code>WriteUpdate order status
List Products<br /><code className="reference-identifier">woocommerce__list_products</code>ReadList products
Create Product<br /><code className="reference-identifier">woocommerce__create_product</code>WriteCreate product
Get Product<br /><code className="reference-identifier">woocommerce__get_product</code>ReadGet product
Update Product<br /><code className="reference-identifier">woocommerce__update_product</code>WriteUpdate product
Get Sales Report<br /><code className="reference-identifier">woocommerce__get_sales_report</code>ReadGet sales report
List Customers<br /><code className="reference-identifier">woocommerce__list_customers</code>ReadList customers

Verify the connection

Call a read tool such as woocommerce__list_orders with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.