# WooCommerce

Manage WooCommerce: orders, products, customers, coupons, refunds, reports. Exposes **69 actions** covering the full API surface
the agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `woocommerce_list_products` | List products - GET /products. |
| `woocommerce_get_product` | Get one product - GET /products/&#123;id&#125;. |
| `woocommerce_create_product` | Create a product - POST /products. |
| `woocommerce_update_product` | Update a product - PUT /products/&#123;id&#125;. |
| `woocommerce_delete_product` | Delete a product - DELETE /products/&#123;id&#125;. |
| `woocommerce_list_orders` | List orders - GET /orders. |
| `woocommerce_get_order` | Get one order - GET /orders/&#123;id&#125;. |
| `woocommerce_create_order` | Create an order - POST /orders. |
| `woocommerce_update_order` | Update an order - PUT /orders/&#123;id&#125;. |
| `woocommerce_delete_order` | Delete an order - DELETE /orders/&#123;id&#125;. |
| `woocommerce_list_customers` | List customers - GET /customers. |
| `woocommerce_get_customer` | Get one customer - GET /customers/&#123;id&#125;. |
| `woocommerce_create_customer` | Create a customer - POST /customers. |
| `woocommerce_update_customer` | Update a customer - PUT /customers/&#123;id&#125;. |
| `woocommerce_delete_customer` | Delete a customer - DELETE /customers/&#123;id&#125;. |
| `woocommerce_list_coupons` | List coupons - GET /coupons. |
| `woocommerce_get_coupon` | Get one coupon - GET /coupons/&#123;id&#125;. |
| `woocommerce_create_coupon` | Create a coupon - POST /coupons. |
| `woocommerce_update_coupon` | Update a coupon - PUT /coupons/&#123;id&#125;. |
| `woocommerce_delete_coupon` | Delete a coupon - DELETE /coupons/&#123;id&#125;. |
| `woocommerce_list_refunds` | List refunds for an order - GET /orders/&#123;order_id&#125;/refunds. |
| `woocommerce_get_refund` | Get one refund - GET /orders/&#123;order_id&#125;/refunds/&#123;refund_id&#125;. |
| `woocommerce_create_refund` | Create a refund - POST /orders/&#123;order_id&#125;/refunds. |
| `woocommerce_delete_refund` | Delete a refund - DELETE /orders/&#123;order_id&#125;/refunds/&#123;refund_id&#125;. |
| `woocommerce_list_categories` | List product categories - GET /products/categories. |
| `woocommerce_get_category` | Get one category - GET /products/categories/&#123;id&#125;. |
| `woocommerce_create_category` | Create a category - POST /products/categories. |
| `woocommerce_update_category` | Update a category - PUT /products/categories/&#123;id&#125;. |
| `woocommerce_delete_category` | Delete a category - DELETE /products/categories/&#123;id&#125;. |
| `woocommerce_list_reviews` | List product reviews - GET /products/reviews. |
| `woocommerce_get_review` | Get one product review - GET /products/&#123;product_id&#125;/reviews/&#123;review_id&#125;. |
| `woocommerce_create_review` | Create a product review - POST /products/&#123;product_id&#125;/reviews. |
| `woocommerce_update_review` | Update a review - PUT /products/&#123;product_id&#125;/reviews/&#123;review_id&#125;. |
| `woocommerce_delete_review` | Delete a review - DELETE /products/&#123;product_id&#125;/reviews/&#123;review_id&#125;. |
| `woocommerce_list_order_notes` | List order notes - GET /orders/&#123;order_id&#125;/notes. |
| `woocommerce_get_order_note` | Get one order note - GET /orders/&#123;order_id&#125;/notes/&#123;note_id&#125;. |
| `woocommerce_create_order_note` | Create an order note - POST /orders/&#123;order_id&#125;/notes. |
| `woocommerce_delete_order_note` | Delete an order note - DELETE /orders/&#123;order_id&#125;/notes/&#123;note_id&#125;. |
| `woocommerce_list_shipping_zones` | List shipping zones - GET /shipping/zones. |
| `woocommerce_get_shipping_zone` | Get one shipping zone - GET /shipping/zones/&#123;id&#125;. |
| `woocommerce_create_shipping_zone` | Create a shipping zone - POST /shipping/zones. |
| `woocommerce_update_shipping_zone` | Update a shipping zone - PUT /shipping/zones/&#123;id&#125;. |
| `woocommerce_delete_shipping_zone` | Delete a shipping zone - DELETE /shipping/zones/&#123;id&#125;. |
| `woocommerce_list_shipping_methods` | List shipping methods for a zone - GET /shipping/zones/&#123;zone_id&#125;/methods. |
| `woocommerce_get_shipping_method` | Get one shipping method - GET /shipping/zones/&#123;zone_id&#125;/methods/&#123;method_id&#125;. |
| `woocommerce_create_shipping_method` | Create a shipping method - POST /shipping/zones/&#123;zone_id&#125;/methods. |
| `woocommerce_update_shipping_method` | Update a shipping method - PUT /shipping/zones/&#123;zone_id&#125;/methods/&#123;method_id&#125;. |
| `woocommerce_delete_shipping_method` | Delete a shipping method - DELETE /shipping/zones/&#123;zone_id&#125;/methods/&#123;method_id&#125;. |
| `woocommerce_list_tax_rates` | List tax rates - GET /taxes. |
| `woocommerce_get_tax_rate` | Get one tax rate - GET /taxes/&#123;id&#125;. |
| `woocommerce_create_tax_rate` | Create a tax rate - POST /taxes. |
| `woocommerce_update_tax_rate` | Update a tax rate - PUT /taxes/&#123;id&#125;. |
| `woocommerce_delete_tax_rate` | Delete a tax rate - DELETE /taxes/&#123;id&#125;. |
| `woocommerce_list_payment_gateways` | List payment gateways - GET /payment_gateways. |
| `woocommerce_get_payment_gateway` | Get one payment gateway - GET /payment_gateways/&#123;id&#125;. |
| `woocommerce_list_settings` | List settings - GET /settings. |
| `woocommerce_get_setting` | Get one setting - GET /settings/&#123;id&#125;. |
| `woocommerce_list_product_variations` | List product variations - GET /products/&#123;product_id&#125;/variations. |
| `woocommerce_get_product_variation` | Get one product variation - GET /products/&#123;product_id&#125;/variations/&#123;variation_id&#125;. |
| `woocommerce_create_product_variation` | Create a product variation - POST /products/&#123;product_id&#125;/variations. |
| `woocommerce_update_product_variation` | Update a product variation - PUT /products/&#123;product_id&#125;/variations/&#123;variation_id&#125;. |
| `woocommerce_delete_product_variation` | Delete a product variation - DELETE /products/&#123;product_id&#125;/variations/&#123;variation_id&#125;. |
| `woocommerce_list_product_tags` | List product tags - GET /products/tags. |
| `woocommerce_get_product_tag` | Get one product tag - GET /products/tags/&#123;id&#125;. |
| `woocommerce_create_product_tag` | Create a product tag - POST /products/tags. |
| `woocommerce_update_product_tag` | Update a product tag - PUT /products/tags/&#123;id&#125;. |
| `woocommerce_delete_product_tag` | Delete a product tag - DELETE /products/tags/&#123;id&#125;. |
| `woocommerce_get_sales_report` | Get sales report - GET /reports/sales. |
| `woocommerce_get_top_selling_products_report` | Get top-selling products report - GET /reports/top_sellers. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`WOOCOMMERCE_STORE_URL`** - Your store URL, e.g. https://shop.example.com .
- **`WOOCOMMERCE_CONSUMER_KEY`** - WP Admin - WooCommerce - Settings - Advanced - REST API - Add key. (https://woocommerce.com/document/woocommerce-rest-api/)
- **`WOOCOMMERCE_CONSUMER_SECRET`** - Secret shown when you create the REST API key.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `WOOCOMMERCE_STORE_URL` | Your store URL, e.g. https://shop.example.com . |
| `WOOCOMMERCE_CONSUMER_KEY` | WP Admin - WooCommerce - Settings - Advanced - REST API - Add key. |
| `WOOCOMMERCE_CONSUMER_SECRET` | Secret shown when you create the REST API key. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope - regenerate it.
- **`429 Too Many Requests`** - you hit the provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [WooCommerce API documentation](https://woocommerce.github.io/woocommerce-rest-api-docs)
