Skip to main content

WooCommerce

Read and work a WooCommerce store - products, stock, orders, customers, coupons and sales reports - over the wc/v3 REST API.

Connect a self-hosted WooCommerce store with a REST API key pair to work it end to end: search products by name, SKU, category or stock status; read orders with their line items, payment method and refunds; look up customers and their order history; read coupons and category structure; pull WooCommerce's own sales report for a period rather than adding up a page of orders; create and update products, set stock to an absolute count, move orders through their statuses, and add internal or customer-facing notes.

Connect

Credential fieldRequiredWhere it comes from
Consumer key (CONSUMER_KEY)YesThe ck_… key from WooCommerce → Settings → Advanced → REST API.
Consumer secret (CONSUMER_SECRET)YesThe cs_… secret shown beside it, once. Its permission level (Read / Write / Read-Write) is the ceiling for every tool here.
SettingRequiredWhat it is
Store URL (STORE_URL)YesThe shop's base address including any subdirectory, e.g. https://example.com/shop - every request stays under it. Must be https://.

Tools

ToolAccessWhat it does
Get store info (yekar.woocommerce.get-store-info)ReadConfirm the connection works and report the store's currency. Every price and total in this integration is a decimal string in this currency - there are no currency codes on product prices, only on orders. Run this first when a store's connection is in doubt.
List products (yekar.woocommerce.list-products)ReadA page of products with prices, stock and categories, filtered by search text, SKU, status, category, stock status or sale flag. total is the store's own count of everything matching, not the page size. Note a stockQuantity of null means the product does not manage stock - use stockStatus to answer 'can it be bought'. For a variable product the price fields summarize a range; the real prices live on its variations.
Get product (yekar.woocommerce.get-product)ReadOne product by id, with its full description (HTML stripped to text), prices, stock and categories. stockQuantity null means stock is not managed for this product, which is different from zero.
List orders (yekar.woocommerce.list-orders)ReadA page of orders with status, totals, payment method and customer. total on the response is the store's own count of matching orders. On each order, total is the amount AS PLACED - WooCommerce records refunds separately, so a refunded order still shows its original total with refundedTotal beside it. looksPaid reads the status (processing/completed); datePaid is the actual fact.
Get order (yekar.woocommerce.get-order)ReadOne order with its line items (up to 25; lineItemsOmitted counts the rest), billing and shipping locations, payment method and totals. A line's subtotal is before discounts and total after - they differ on any discounted line.
List customers (yekar.woocommerce.list-customers)ReadA page of customer ACCOUNTS with contact details and whether they have ever paid. Two things to know: WooCommerce returns only accounts with the customer role unless you pass role: all, and GUEST checkouts create no account at all - so this list is not the same as everyone who has ordered. Count buyers from orders, not from here.
Get customer (yekar.woocommerce.get-customer)ReadOne customer account by id: name, email, billing contact details and whether they have ever paid. To find someone by email instead, use List customers with the email filter.
List order notes (yekar.woocommerce.list-order-notes)ReadAn order's note history - status changes WooCommerce logs itself, staff notes, and notes that were emailed to the customer. customerNote: true means the buyer received it; false means staff-only.
List coupons (yekar.woocommerce.list-coupons)ReadA page of discount coupons with their type, amount, expiry and usage. discountType decides what amount means - percent is a percentage, fixed_cart is an amount off the whole order, fixed_product an amount off each qualifying item - so neither field means anything alone. A coupon with no dateExpires never expires.
List product categories (yekar.woocommerce.list-product-categories)ReadThe store's product categories with their ids, parents and product counts. The ids are what List products' category filter takes. productCount is WooCommerce's own per-category count.
Get sales report (yekar.woocommerce.get-sales-report)ReadWooCommerce's own sales totals for a period - gross sales, NET sales (excluding tax, shipping and refunds), order count, item count, refunds and discounts. Use this instead of adding up a page of orders: it is computed store-side across the whole period, excludes refunds properly, and separates revenue from tax and shipping. Dates are in the STORE's timezone.
Create product (yekar.woocommerce.create-product)WriteCreate a simple product. It is created as a DRAFT unless you pass status publish. Prices are decimal strings in the store's currency. Running this twice creates TWO products unless you set a SKU - WooCommerce enforces SKU uniqueness, so the second attempt then fails instead of duplicating.
Update product (yekar.woocommerce.update-product)WriteUpdate a product's name, prices, SKU, descriptions, status or categories. Only the fields you pass change. Pass salePrice "" to end a sale. CAREFUL with categoryIds: the list REPLACES the product's categories rather than adding to them. To change stock use Update product stock instead.
Update product stock (yekar.woocommerce.update-product-stock)WriteSet a product's stock to an ABSOLUTE quantity (not a delta), or turn stock management on/off, or set purchasability directly. WooCommerce offers no compare-and-set here: a sale that happens between reading the count and writing it will be overwritten, so re-read immediately before writing and prefer quiet periods for bulk corrections.
Update order status (yekar.woocommerce.update-order-status)WriteSet an order's status. This is not just a label - the store's own automations run: completed normally emails the customer and releases downloads, cancelled restores stock. Setting refunded records the status but moves NO money; the actual refund has to be issued in the payment gateway (Stripe, PayPal, Square) or the WooCommerce admin.
Add order note (yekar.woocommerce.create-order-note)WriteAdd a note to an order. By default it is a STAFF-ONLY note. Setting customerNote true makes WooCommerce EMAIL the note to the customer - that message cannot be recalled, so only do it when the intent is to contact the buyer. Every call adds another note; there is no deduplication.
Create customer (yekar.woocommerce.create-customer)WriteCreate a customer account. This creates a real WordPress user on the store: the email must be unique (a duplicate is refused, not merged) and, depending on the store's settings, WooCommerce may send the person a new-account email. Guest buyers do not need an account - only create one when the customer should be able to log in.

Notes

  • In WooCommerce go to Settings → Advanced → REST API → Add key, pick the WordPress user the tools should act as, choose permission Read (for reporting) or Read/Write (to make changes), and generate. Copy both the consumer key (ck_…) and consumer secret (cs_…) - WooCommerce shows them once.
  • Set the Store URL to the shop's base address including any subdirectory WordPress lives under, e.g. https://example.com or https://example.com/shop.
  • The store must be served over HTTPS: these credentials are sent as HTTP Basic auth, so over plain HTTP they would travel in the clear. Pretty permalinks must be enabled (Settings → Permalinks) for the REST API to resolve at all.
  • If calls fail with "Consumer key is missing", the credentials ARE being sent - some Apache/CGI setups strip the Authorization header before PHP sees it. Fix it on the server (SetEnvIf Authorization / CGIPassAuth). This integration will not fall back to putting the key and secret in the URL, because that writes them into every access log.
  • The key's permission level is the ceiling: a Read key cannot create or update anything, and that failure arrives as a permission error rather than as a silent no-op.
  • Prices and totals are decimal strings in the store's own currency (Get store info reports which); an order carries its own currency code.
  • An order's total does NOT change when it is refunded - WooCommerce records refunds separately, and the view reports them as refundedTotal. For revenue over a period use Get sales report, which nets refunds, tax and shipping out properly.
  • Setting an order to refunded records the status only. It moves no money - issue the actual refund in the payment gateway. Setting completed normally emails the customer, and adding a customer note emails them too.
  • Every action is attributed to the WordPress user the key belongs to, and the store's order notes show it that way. Bind automations using this integration as a service connection.