> ## Documentation Index
> Fetch the complete documentation index at: https://vexidata.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WooCommerce

> Connect your WooCommerce store to VexiData to read and manage store data with your AI assistant.

Connect your WooCommerce store and your AI assistant can answer questions about orders, products, customers, and coupons — and, for anyone with write access to the connection, create and change them. WooCommerce connects with REST API keys instead of OAuth.

## Prerequisites

* A WooCommerce store served over **HTTPS** at a publicly reachable address — VexiData rejects plain `http://` stores, because API keys would travel unencrypted
* A WordPress user allowed to create WooCommerce API keys (shop manager or administrator)
* The **Connect sources** capability in your VexiData organization, to connect the platform — Owners and Admins have it by default

> [!NOTE]
>
> VexiData connects to your store from the public internet, so it refuses
> addresses that only exist on your own machine or network: `localhost`,
> hostnames ending in `.local` or `.internal`, private IP addresses, and
> hostnames that don't resolve or that resolve to a private address. A local
> development store can't be connected. Use a staging or live store with a
> public HTTPS address instead.

## Connect WooCommerce

**1. Create REST API keys in WooCommerce**

1. In your WordPress admin, go to **WooCommerce** > **Settings** > **Advanced** > **REST API**
2. Click **Add key**
3. Enter a description (for example, `VexiData`), pick a user, and set **Permissions** to **Read/Write**
4. Click **Generate API key**, then copy the **Consumer key** and **Consumer secret** — WooCommerce shows them only once

**2. Add the connection in VexiData**

Go to the [**Integrations**](https://vexidata.com/integrations) page in VexiData, click **Connect** on **WooCommerce**, and fill in:

| Field | Value |
| - | - |
| **Store URL** | Your store's address, for example `https://shop.example.com` |
| **Consumer key** | The key starting with `ck_` |
| **Consumer secret** | The secret starting with `cs_` |

**3. Test and connect**

Click **Test connection** to check the keys without saving, then click **Connect**. VexiData tests the keys against your store's REST API again before saving, and names the connection after your store's domain. If the test fails, work through the [troubleshooting](#troubleshooting) section below.

## Managing the connection

To connect more stores, click **Add account** on the WooCommerce card on the [**Integrations**](https://vexidata.com/integrations) page — each store keeps its own URL and keys.

The connection with the **Primary** badge is the primary, which tools use when a request doesn't name one. To change it, open another connection and click **Make primary** in its **Connection** card.

To rotate credentials, revoke the key in WooCommerce, generate a new one, and connect the same store URL again — VexiData updates the existing connection. To remove a store, open its connection and click **Disconnect** in the **Connection** card.

## What the AI can do

| Tool | What it does | Access |
| - | - | - |
| `woocommerce_read` | Reads store data — orders, products, customers, coupons, reports, and settings. | Read |
| `woocommerce_write` | Creates or updates store resources, such as adding a product or changing an order's status. | Write |
| `woocommerce_delete` | Deletes a store resource, such as a product, coupon, or order. | Destructive |

> [!WARNING]
>
> `woocommerce_write` and `woocommerce_delete` act on your live store, and
> deletions can be permanent. Review what the AI proposes before approving a
> change. Both need **Write** access on the connection — by default, Owners
> and Admins. Members can use `woocommerce_read` only.

## Troubleshooting

> [accordion] Connection test fails
>
> * Confirm the store URL is correct and starts with `https://`
> * If the error says the store URL points to a blocked host or a private network address (or resolves to one), VexiData can't reach the store from the public internet — see the note under [Prerequisites](#prerequisites)
> * Check your SSL certificate is valid and not expired
> * Some security plugins and firewalls block REST API requests — allow requests to `/wp-json/wc/`

> [accordion] Authentication errors (401)
>
> * Make sure you copied the full consumer key (`ck_…`) and secret (`cs_…`)
> * Check the key's **Permissions** are set to **Read/Write**
> * If the key was revoked, generate a new one and connect the store again with it

> [accordion] REST API returns 404
>
> WooCommerce's REST API needs pretty permalinks. In WordPress, go to **Settings** > **Permalinks** and pick any structure except "Plain", then save.

> [accordion] Tools don't appear in my AI client
>
> Tools register as soon as the platform is connected, but some clients cache the tool list. Reload or reconnect the VexiData connector in your AI client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.