The WooCommerce connector lets your AI agent work with WooCommerce. Scalekit handles authentication for every call, so your agent never handles credentials. It comes with 23 tools.
- Tools
- 23
- What they doRead · write · destructive
- 13 · 10 · 013 read10 write0 destructive
- Users sign in with
- Username and password
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the WooCommerce connection
In AgentKit > Connections, create a WooCommerce connection. The name you give it is the
connection_nameyour code passes. See Configure connections.
Tools
Pass the exact name toexecute_toolwoocommerce_coupons_listList coupons in the WooCommerce store, optionally filtered by code, search text or creation date.Read-onlyList Coupons
List coupons in the WooCommerce store, optionally filtered by code, search text or creation date. Returns each coupon's id, code, discount type and amount, expiry date, usage count and limits, and product and email restrictions. Use woocommerce_coupons_list to find a coupon or check whether a code exists. Use woocommerce_coupon_create to add a coupon.
Inputs
afterstring- Only return coupons created after this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
beforestring- Only return coupons created before this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
codestring- Only return the coupon with this exact code. Example: 10off.
excludestring- Comma-separated list of coupon IDs to leave out of the results. Example: 12,15,27.
includestring- Comma-separated list of coupon IDs to limit the results to. Example: 12,15,27.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to desc.one of
ascdesc orderbystring- Field to sort coupons by: date, modified, id, include, title or slug. WooCommerce defaults to date.one of
datemodifiedidincludetitleslug pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
per_pageinteger- Maximum number of coupons to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
searchstring- Free-text search across coupons. Example: summer.
woocommerce_customer_getGet one WooCommerce customer by their ID.Read-onlyGet Customer
Get one WooCommerce customer by their ID. Returns the customer's email, name, username, role, billing and shipping addresses, avatar URL and meta data. Use woocommerce_customer_get when you know the customer ID. Use woocommerce_customers_list to find a customer by email or name, and woocommerce_orders_list with customer to see their orders.
Inputs
customer_idintegerrequired- Numeric ID of the customer. This is the WordPress user ID; get it from woocommerce_customers_list. Example: 25.
woocommerce_customers_listList registered customers in the WooCommerce store, filtered by search text, email or role.Read-onlyList Customers
List registered customers in the WooCommerce store, filtered by search text, email or role. Returns each customer's id, email, name, username, billing and shipping addresses, and whether they are a paying customer. Use woocommerce_customers_list to find a customer or their ID. Use woocommerce_customer_get when you already have the ID. Guest checkouts are not customers; find them with woocommerce_orders_list.
Inputs
emailstring- Only return the customer with this exact email address. Example: john.doe@example.com.
excludestring- Comma-separated list of customer IDs to leave out of the results. Example: 12,15,27.
includestring- Comma-separated list of customer IDs to limit the results to. Example: 12,15,27.
offsetinteger- Number of matching customers to skip before returning results. Example: 20.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to asc.one of
ascdesc orderbystring- Field to sort customers by: id, include, name or registered_date. WooCommerce defaults to name.one of
idincludenameregistered_date pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
per_pageinteger- Maximum number of customers to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
rolestring- Only return users with this WordPress role: all, administrator, editor, author, contributor, subscriber, customer or shop_manager. WooCommerce defaults to customer.one of
alladministratoreditorauthorcontributorsubscribercustomershop_manager searchstring- Free-text search across customer names, email addresses and usernames. Example: john.
woocommerce_order_getGet one order from the WooCommerce store by its ID.Read-onlyGet Order
Get one order from the WooCommerce store by its ID. Returns the full order: status, customer, billing and shipping addresses, line items, shipping, fee, coupon and tax lines, refunds, payment details and totals. Use woocommerce_order_get when you know the order ID. Use woocommerce_orders_list to find an order by customer, status or search text.
Inputs
order_idintegerrequired- Numeric ID of the order. Get it from woocommerce_orders_list or the order's edit screen in WP Admin (WooCommerce > Orders). Example: 727.
woocommerce_order_notes_listList the notes on a WooCommerce order, optionally only customer-facing or only internal notes.Read-onlyList Order Notes
List the notes on a WooCommerce order, optionally only customer-facing or only internal notes. Returns each note's id, author, note text, date and whether it was sent to the customer. Use woocommerce_order_notes_list to read an order's history. Use woocommerce_order_note_create to add a note.
Inputs
order_idintegerrequired- Numeric ID of the order. Get it from woocommerce_orders_list or the order's edit screen in WP Admin (WooCommerce > Orders). Example: 727.
typestring- Which notes to return: any, customer (notes sent to the customer) or internal (private notes). WooCommerce defaults to any.one of
anycustomerinternal
woocommerce_order_refunds_listList the refunds issued on one WooCommerce order.Read-onlyList Order Refunds
List the refunds issued on one WooCommerce order. Returns each refund's id, amount, reason, date, who issued it, whether the payment gateway refunded the money, and refunded line items. Use woocommerce_order_refunds_list to see what was already refunded. Use woocommerce_order_refund_create to issue a new refund.
Inputs
order_idintegerrequired- Numeric ID of the order. Get it from woocommerce_orders_list or the order's edit screen in WP Admin (WooCommerce > Orders). Example: 723.
afterstring- Only return refunds created after this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
beforestring- Only return refunds created before this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to desc.one of
ascdesc pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
per_pageinteger- Maximum number of refunds to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
woocommerce_orders_listList orders in the WooCommerce store, filtered by status, customer, product, date range or a search term.Read-onlyList Orders
List orders in the WooCommerce store, filtered by status, customer, product, date range or a search term. Returns a page of orders with id, number, status, totals, currency, billing and shipping addresses, line items and dates. Use woocommerce_orders_list to find or browse orders. Use woocommerce_order_get when you already have the order ID.
Inputs
afterstring- Only return orders created after this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
beforestring- Only return orders created before this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
customerinteger- Only return orders placed by this customer ID. This is the WordPress user ID; get it from woocommerce_customers_list. Example: 25.
excludestring- Comma-separated list of order IDs to leave out of the results. Example: 12,15,27.
includestring- Comma-separated list of order IDs to limit the results to. Example: 12,15,27.
modified_afterstring- Only return orders modified after this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
modified_beforestring- Only return orders modified before this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
offsetinteger- Number of matching orders to skip before returning results. Example: 20.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to desc.one of
ascdesc orderbystring- Field to sort orders by: date, modified, id, include, title or slug. WooCommerce defaults to date.one of
datemodifiedidincludetitleslug pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
per_pageinteger- Maximum number of orders to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
productinteger- Only return orders that contain this product ID. Get it from woocommerce_products_list or the product's edit screen in WP Admin. Example: 93.
searchstring- Free-text search across orders, such as a customer name, email address or order number. Example: john.doe@example.com.
statusstring- Only return orders with these statuses, as a comma-separated list. Values: any, pending, processing, on-hold, completed, cancelled, refunded, failed, trash. WooCommerce defaults to any. Example: processing,on-hold.
woocommerce_product_categories_listList product categories in the WooCommerce store, optionally filtered by name, parent, product or slug.Read-onlyList Product Categories
List product categories in the WooCommerce store, optionally filtered by name, parent, product or slug. Returns each category's id, name, slug, parent, description, image and product count. Use woocommerce_product_categories_list to find category IDs for products, coupons or the category filter of woocommerce_products_list. Use woocommerce_product_category_create to add a category.
Inputs
excludestring- Comma-separated list of category IDs to leave out of the results. Example: 12,15,27.
hide_emptyboolean- Set to true to leave out categories that have no products. WooCommerce defaults to false.
includestring- Comma-separated list of category IDs to limit the results to. Example: 12,15,27.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to asc.one of
ascdesc orderbystring- Field to sort categories by: id, include, name, slug, term_group, description or count. WooCommerce defaults to name.one of
idincludenameslugterm_groupdescriptioncount pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
parentinteger- Only return direct children of this category ID; use 0 for top-level categories. Example: 0.
per_pageinteger- Maximum number of categories to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
productinteger- Only return categories assigned to this product ID. Get it from woocommerce_products_list or the product's edit screen in WP Admin. Example: 794.
searchstring- Free-text search on category names. Example: clothing.
slugstring- Only return the category with this slug. Example: hoodies.
woocommerce_product_getGet one product from the WooCommerce catalog by its ID.Read-onlyGet Product
Get one product from the WooCommerce catalog by its ID. Returns the full product: name, type, status, descriptions, SKU, prices, stock, dimensions, categories, tags, images, attributes and variation IDs. Use woocommerce_product_get when you know the product ID. Use woocommerce_products_list to find a product by name or SKU.
Inputs
product_idintegerrequired- Numeric ID of the product. Get it from woocommerce_products_list or the product's edit screen in WP Admin. Example: 794.
woocommerce_product_variations_listList the variations of a variable WooCommerce product, such as each size and color combination.Read-onlyList Product Variations
List the variations of a variable WooCommerce product, such as each size and color combination. Returns each variation's id, SKU, attributes, prices, stock status and quantity, and image. Use woocommerce_product_variations_list to see a variable product's variations, for example to get a variation_id for woocommerce_order_create. Use woocommerce_product_get for the parent product.
Inputs
product_idintegerrequired- Numeric ID of the variable product. Get it from woocommerce_products_list or the product's edit screen in WP Admin. It must be a variable product. Example: 22.
excludestring- Comma-separated list of variation IDs to leave out of the results. Example: 12,15,27.
includestring- Comma-separated list of variation IDs to limit the results to. Example: 12,15,27.
max_pricestring- Only return variations priced at or below this amount. Example: 100.
min_pricestring- Only return variations priced at or above this amount. Example: 10.
on_saleboolean- Set to true to return only variations that are on sale.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to desc.one of
ascdesc orderbystring- Field to sort variations by: date, modified, id, include, title or slug. WooCommerce defaults to date.one of
datemodifiedidincludetitleslug pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
per_pageinteger- Maximum number of variations to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
searchstring- Free-text search within the variations. Example: blue.
skustring- Only return the variation with this SKU. Example: WOO-HOODIE-BLU-L.
statusstring- Only return variations with this status: any, draft, pending, private or publish. WooCommerce defaults to any.one of
anydraftpendingprivatepublish stock_statusstring- Only return variations with this stock status: instock, outofstock or onbackorder.one of
instockoutofstockonbackorder
woocommerce_products_listList products in the WooCommerce catalog, filtered by search text, SKU, category, tag, type, status, stock status, price or date.Read-onlyList Products
List products in the WooCommerce catalog, filtered by search text, SKU, category, tag, type, status, stock status, price or date. Returns a page of products with id, name, type, status, SKU, prices, stock, categories, images and variation IDs. Use woocommerce_products_list to find or browse products. Use woocommerce_product_get when you have the product ID, and woocommerce_product_variations_list for a variable product's variations.
Inputs
afterstring- Only return products published after this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
beforestring- Only return products published before this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
categorystring- Only return products in this category ID. Get category IDs from woocommerce_product_categories_list. Example: 9.
excludestring- Comma-separated list of product IDs to leave out of the results. Example: 12,15,27.
featuredboolean- Set to true to return only featured products.
includestring- Comma-separated list of product IDs to limit the results to. Example: 12,15,27.
max_pricestring- Only return products priced at or below this amount. Example: 100.
min_pricestring- Only return products priced at or above this amount. Example: 10.
modified_afterstring- Only return products modified after this date. ISO 8601 date-time in the store's timezone. Example: 2025-01-01T00:00:00.
on_saleboolean- Set to true to return only products that are on sale.
orderstring- Sort direction: asc for ascending or desc for descending. WooCommerce defaults to desc.one of
ascdesc orderbystring- Field to sort products by: date, modified, id, include, title, slug, price, popularity, rating or menu_order. WooCommerce defaults to date.one of
datemodifiedidincludetitleslugpricepopularityratingmenu_order pageinteger- Page of results to return, starting at 1. Use with per_page to walk through large result sets. Example: 2.
per_pageinteger- Maximum number of products to return per page, from 1 to 100. WooCommerce defaults to 10. Example: 50.
searchstring- Free-text search on product name and content. Example: hoodie.
skustring- Only return the product with this SKU. Example: WOO-HOODIE-BLU.
statusstring- Only return products with this status: any, draft, pending, private or publish. WooCommerce defaults to any.one of
anydraftpendingprivatepublish stock_statusstring- Only return products with this stock status: instock, outofstock or onbackorder.one of
instockoutofstockonbackorder tagstring- Only return products with this product tag ID. Example: 34.
typestring- Only return products of this type: simple, grouped, external or variable.one of
simplegroupedexternalvariable
woocommerce_sales_report_getGet the WooCommerce sales report for a preset period or a custom date range.Read-onlyGet Sales Report
Get the WooCommerce sales report for a preset period or a custom date range. Returns total and net sales, average sales, order and item counts, tax, shipping, refunds and discounts, plus totals grouped by day or month. Use woocommerce_sales_report_get for revenue figures. Use woocommerce_top_sellers_report_get for the best-selling products.
Inputs
date_maxstring- End date of a custom range, in YYYY-MM-DD format. Use with date_min. Example: 2025-01-31.
date_minstring- Start date of a custom range, in YYYY-MM-DD format. Use with date_max. Example: 2025-01-01.
periodstring- Preset report period: week, month, last_month or year. A preset period overrides date_min and date_max. Leave it empty to use date_min and date_max, or today when no dates are set.one of
weekmonthlast_monthyear
woocommerce_top_sellers_report_getGet the best-selling products in the WooCommerce store for a preset period or a custom date range.Read-onlyGet Top Sellers Report
Get the best-selling products in the WooCommerce store for a preset period or a custom date range. Returns a list of products with name, product_id and quantity sold, highest first. The product name is in name, not title. Use woocommerce_top_sellers_report_get to see what sells best. Use woocommerce_sales_report_get for revenue totals.
Inputs
date_maxstring- End date of a custom range, in YYYY-MM-DD format. Use with date_min. Example: 2025-01-31.
date_minstring- Start date of a custom range, in YYYY-MM-DD format. Use with date_max. Example: 2025-01-01.
periodstring- Preset report period: week, month, last_month or year. A preset period overrides date_min and date_max. Leave it empty to use date_min and date_max, or today when no dates are set.one of
weekmonthlast_monthyear
woocommerce_coupon_createCreate a discount coupon in the WooCommerce store with its code, discount type and amount, expiry and usage restrictions.WriteCreate Coupon
Create a discount coupon in the WooCommerce store with its code, discount type and amount, expiry and usage restrictions. Returns the new coupon with its id and saved settings. Use woocommerce_coupon_create to add a coupon. Use woocommerce_coupons_list first to check that the code is not taken.
Inputs
codestringrequired- Coupon code that customers enter at checkout; must be unique in the store. Example: 10off.
amountstring- Discount amount as a number in a string, also for a percentage. Example: 10 for 10% off with discount_type percent.
date_expiresstring- Date the coupon expires, in the store's timezone (ISO 8601). Example: 2025-12-31T23:59:59.
descriptionstring- Internal description of the coupon. Example: Black Friday 2025 newsletter offer.
discount_typestring- Type of discount: percent (percentage off the cart), fixed_cart (fixed amount off the cart) or fixed_product (fixed amount off each matching product). WooCommerce defaults to fixed_cart.one of
percentfixed_cartfixed_product email_restrictionsarray- Billing email addresses allowed to use the coupon; leave out to allow everyone. Example: ["john.doe@example.com"].
exclude_sale_itemsboolean- Set to true so the coupon does not apply to items that are already on sale. WooCommerce defaults to false.
excluded_product_categoriesarray- Product category IDs the coupon never applies to. Example: [9, 14].
excluded_product_idsarray- Product IDs the coupon never applies to. Example: [93, 22].
free_shippingboolean- Set to true to grant free shipping, when the store has a free shipping method that requires a coupon. WooCommerce defaults to false.
individual_useboolean- Set to true so the coupon cannot be combined with other coupons. WooCommerce defaults to false.
limit_usage_to_x_itemsinteger- Maximum number of cart items the discount applies to. Example: 3.
maximum_amountstring- Maximum cart subtotal allowed to use the coupon. Example: 500.00.
meta_dataarray- Custom meta data to store on the coupon, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
minimum_amountstring- Minimum cart subtotal needed to use the coupon. Example: 100.00.
product_categoriesarray- Product category IDs the coupon applies to (from woocommerce_product_categories_list). Example: [9, 14].
product_idsarray- Product IDs the coupon applies to; leave out to apply to all products. Example: [93, 22].
usage_limitinteger- Total number of times the coupon can be used across all customers. Example: 100.
usage_limit_per_userinteger- Number of times each customer can use the coupon. Example: 1.
woocommerce_customer_createCreate a customer account in the WooCommerce store with email, name, login and billing and shipping addresses.WriteCreate Customer
Create a customer account in the WooCommerce store with email, name, login and billing and shipping addresses. Returns the new customer with their id and saved details. Use woocommerce_customer_create for a new customer. Use woocommerce_customers_list with email first to avoid a duplicate, and woocommerce_customer_update to change an existing customer.
Inputs
emailstringrequired- Customer's email address, which must not already be registered. Example: john.doe@example.com.
billingobject- Billing address as an object. Supported keys: first_name, last_name, company, address_1, address_2, city, state (ISO code or name), postcode, country (ISO 3166-1 alpha-2 code), email and phone. Only the keys you send are set. Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US", "email": "john.doe@example.com", "phone": "(555) 555-5555"}.
first_namestring- Customer's first name. Example: John.
last_namestring- Customer's last name. Example: Doe.
meta_dataarray- Custom meta data to store on the customer, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
passwordstring- Password for the customer's store account. If left out, WooCommerce may generate one, depending on the store's account settings. Example: S3cure-Pass!
shippingobject- Shipping address as an object with the same keys as the billing address except email and phone: first_name, last_name, company, address_1, address_2, city, state, postcode and country (ISO 3166-1 alpha-2 code). Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US"}.
usernamestring- Login name for the customer's account. If left out, WooCommerce may generate one from the email, depending on the store's account settings. Example: john.doe.
woocommerce_customer_updateUpdate an existing WooCommerce customer's email, name, password, addresses or meta data.WriteUpdate Customer
Update an existing WooCommerce customer's email, name, password, addresses or meta data. Returns the updated customer. Use woocommerce_customer_update to change a customer. Use woocommerce_customer_create to add a new one.
- Idempotent
Inputs
customer_idintegerrequired- Numeric ID of the customer. This is the WordPress user ID; get it from woocommerce_customers_list. Example: 25.
billingobject- Billing address as an object. Supported keys: first_name, last_name, company, address_1, address_2, city, state (ISO code or name), postcode, country (ISO 3166-1 alpha-2 code), email and phone. Only the keys you send are set. Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US", "email": "john.doe@example.com", "phone": "(555) 555-5555"}.
emailstring- Customer's email address. Example: john.doe@example.com.
first_namestring- Customer's first name. Example: John.
last_namestring- Customer's last name. Example: Doe.
meta_dataarray- Custom meta data to store on the customer, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
passwordstring- Password for the customer's store account. Example: S3cure-Pass!
shippingobject- Shipping address as an object with the same keys as the billing address except email and phone: first_name, last_name, company, address_1, address_2, city, state, postcode and country (ISO 3166-1 alpha-2 code). Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US"}.
woocommerce_order_createCreate an order in the WooCommerce store with line items, customer, addresses, shipping, fees and coupons.WriteCreate Order
Create an order in the WooCommerce store with line items, customer, addresses, shipping, fees and coupons. Returns the new order with its id, number, status and calculated totals. Use woocommerce_order_create for a new order. Use woocommerce_order_update to change an existing order. Get product IDs from woocommerce_products_list and customer IDs from woocommerce_customers_list.
Inputs
billingobject- Billing address as an object. Supported keys: first_name, last_name, company, address_1, address_2, city, state (ISO code or name), postcode, country (ISO 3166-1 alpha-2 code), email and phone. Only the keys you send are set. Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US", "email": "john.doe@example.com", "phone": "(555) 555-5555"}.
coupon_linesarray- Coupons to apply to the order, as a list of objects with the coupon code. Example: [{"code": "10off"}].
customer_idinteger- ID of the customer who owns the order; 0 for a guest order. This is the WordPress user ID; get it from woocommerce_customers_list. Example: 25.
customer_notestring- Note from the customer, as if left at checkout. Example: Please leave the parcel at the back door.
fee_linesarray- Extra fees on the order. Each line has a name, a total as a string, and optionally tax_status (taxable or none) and tax_class. Example: [{"name": "Gift wrap", "total": "5.00", "tax_status": "none"}].
line_itemsarray- Products to put on the order. Each item needs a product_id and a quantity; add variation_id for a variable product, and optionally subtotal and total (strings) to override the price. Example: [{"product_id": 93, "quantity": 2}, {"product_id": 22, "variation_id": 23, "quantity": 1}].
meta_dataarray- Custom meta data to store on the order, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
payment_methodstring- ID of the payment gateway, such as bacs, cheque, cod, stripe or paypal. Example: bacs.
payment_method_titlestring- Payment method name shown to the customer. Example: Direct Bank Transfer.
set_paidboolean- Set to true to mark the order as paid. This sets the status to processing and reduces stock. WooCommerce defaults to false.
shippingobject- Shipping address as an object with the same keys as the billing address except email and phone: first_name, last_name, company, address_1, address_2, city, state, postcode and country (ISO 3166-1 alpha-2 code). Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US"}.
shipping_linesarray- Shipping charges on the order. Each line has a method_id (for example flat_rate or free_shipping), a method_title shown to the customer, and a total as a string. Example: [{"method_id": "flat_rate", "method_title": "Flat Rate", "total": "10.00"}].
statusstring- Order status. One of pending, processing, on-hold, completed, cancelled, refunded or failed. WooCommerce defaults to pending.one of
pendingprocessingon-holdcompletedcancelledrefundedfailed transaction_idstring- Transaction ID from the payment gateway. Example: ch_3NqYbF2eZvKYlo2C0.
woocommerce_order_note_createAdd a note to a WooCommerce order, either private for store staff or sent to the customer by email.WriteAdd Order Note
Add a note to a WooCommerce order, either private for store staff or sent to the customer by email. Returns the new note with its id, author, text and date. Use woocommerce_order_note_create to record or communicate something about an order. Use woocommerce_order_notes_list to read existing notes.
Inputs
notestringrequired- Text of the note. Example: Customer called to confirm the delivery address.
order_idintegerrequired- Numeric ID of the order. Get it from woocommerce_orders_list or the order's edit screen in WP Admin (WooCommerce > Orders). Example: 727.
added_by_userboolean- Set to true to attribute the note to the API key's user instead of the system. WooCommerce defaults to false.
customer_noteboolean- Set to true to show the note to the customer and email it to them; false keeps it as a private admin note. WooCommerce defaults to false.
woocommerce_order_refund_createRefund a WooCommerce order in full or in part, by amount or by line item, and optionally send the money back through the payment gateway.WriteCreate Order Refund
Refund a WooCommerce order in full or in part, by amount or by line item, and optionally send the money back through the payment gateway. Returns the new refund with its id, amount, reason, refunded line items and whether the gateway refunded the payment. Use woocommerce_order_refund_create to issue a refund. Use woocommerce_order_refunds_list to check earlier refunds first. Get line item IDs from woocommerce_order_get.
Inputs
order_idintegerrequired- Numeric ID of the order. Get it from woocommerce_orders_list or the order's edit screen in WP Admin (WooCommerce > Orders). Example: 723.
amountstring- Total amount to refund, as a decimal string. If set, it takes precedence over the line item totals. Example: 30.00.
api_refundboolean- When true, WooCommerce asks the order's payment gateway to send the money back to the customer; when false, the refund is only recorded in WooCommerce. WooCommerce defaults to true, and fails the request if the gateway does not support automatic refunds.
api_restockboolean- When true, the refunded line item quantities are returned to stock. WooCommerce defaults to true.
compute_totalsboolean- When true, WooCommerce works out each line's refund amount from the order's prices and taxes, so line items need only id and quantity. Requires WooCommerce 11.1 or later. WooCommerce defaults to false.
line_itemsarray- Order line items to refund. Each object has the order line item id (from woocommerce_order_get, not the product ID), and either refund_total (amount as a number) with optional refund_tax (a list of {id, refund_total} per tax rate), or a quantity when compute_totals is true. Example: [{"id": 111, "quantity": 1, "refund_total": 10}].
meta_dataarray- Custom meta data to store on the refund, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
reasonstring- Reason for the refund, saved on the refund. Example: Item arrived damaged.
refunded_byinteger- WordPress user ID to record as the person who issued the refund. Example: 1.
woocommerce_order_updateUpdate an existing WooCommerce order, such as its status, addresses, line items, payment details or meta data.WriteUpdate Order
Update an existing WooCommerce order, such as its status, addresses, line items, payment details or meta data. Returns the updated order. Use woocommerce_order_update to change an order. Use woocommerce_order_note_create to add a note, and woocommerce_order_refund_create to refund it.
- Idempotent
Inputs
order_idintegerrequired- Numeric ID of the order. Get it from woocommerce_orders_list or the order's edit screen in WP Admin (WooCommerce > Orders). Example: 727.
billingobject- Billing address as an object. Supported keys: first_name, last_name, company, address_1, address_2, city, state (ISO code or name), postcode, country (ISO 3166-1 alpha-2 code), email and phone. Only the keys you send are set. Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US", "email": "john.doe@example.com", "phone": "(555) 555-5555"}.
coupon_linesarray- Coupons to apply to the order, as a list of objects with the coupon code. Example: [{"code": "10off"}].
customer_idinteger- ID of the customer who owns the order; 0 for a guest order. This is the WordPress user ID; get it from woocommerce_customers_list. Example: 25.
customer_notestring- Note from the customer, as if left at checkout. Example: Please leave the parcel at the back door.
fee_linesarray- Extra fees on the order. Each line has a name, a total as a string, and optionally tax_status (taxable or none) and tax_class. Example: [{"name": "Gift wrap", "total": "5.00", "tax_status": "none"}].
line_itemsarray- Line items to add or change. To change an existing item send its id (from woocommerce_order_get) with the new quantity; to add a product send product_id and quantity without an id; to remove an item send its id with quantity 0. Example: [{"id": 315, "quantity": 3}, {"product_id": 22, "quantity": 1}].
meta_dataarray- Custom meta data to store on the order, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
payment_methodstring- ID of the payment gateway, such as bacs, cheque, cod, stripe or paypal. Example: bacs.
payment_method_titlestring- Payment method name shown to the customer. Example: Direct Bank Transfer.
set_paidboolean- Set to true to mark the order as paid. This sets the status to processing and reduces stock. WooCommerce defaults to false.
shippingobject- Shipping address as an object with the same keys as the billing address except email and phone: first_name, last_name, company, address_1, address_2, city, state, postcode and country (ISO 3166-1 alpha-2 code). Example: {"first_name": "John", "last_name": "Doe", "address_1": "969 Market", "city": "San Francisco", "state": "CA", "postcode": "94103", "country": "US"}.
shipping_linesarray- Shipping charges on the order. Each line has a method_id (for example flat_rate or free_shipping), a method_title shown to the customer, and a total as a string. Example: [{"method_id": "flat_rate", "method_title": "Flat Rate", "total": "10.00"}].
statusstring- Order status. One of pending, processing, on-hold, completed, cancelled, refunded or failed. Changing the status can send customer emails (for example completed).one of
pendingprocessingon-holdcompletedcancelledrefundedfailed transaction_idstring- Transaction ID from the payment gateway. Example: ch_3NqYbF2eZvKYlo2C0.
woocommerce_product_category_createCreate a product category in the WooCommerce store, optionally as a subcategory with a description and image.WriteCreate Product Category
Create a product category in the WooCommerce store, optionally as a subcategory with a description and image. Returns the new category with its id, slug and parent. Use woocommerce_product_category_create to add a category. Use woocommerce_product_categories_list to check whether it already exists.
Inputs
namestringrequired- Category name. Example: Hoodies.
descriptionstring- Category description; HTML is allowed. Example: Warm hoodies for every season.
displaystring- What the category archive page shows: default, products, subcategories or both. WooCommerce defaults to default.one of
defaultproductssubcategoriesboth imageobject- Category image as an object with src (a public image URL) or id (a Media Library attachment ID), and optionally alt. Example: {"src": "https://example.com/images/hoodies.jpg"}.
menu_orderinteger- Position used to sort categories manually; lower numbers come first. Example: 1.
parentinteger- ID of the parent category, to make this a subcategory. Get it from woocommerce_product_categories_list. Example: 9.
slugstring- URL slug for the category; generated from the name if left out. Example: hoodies.
woocommerce_product_createCreate a product in the WooCommerce catalog with its name, type, prices, descriptions, SKU, stock, categories, images and attributes.WriteCreate Product
Create a product in the WooCommerce catalog with its name, type, prices, descriptions, SKU, stock, categories, images and attributes. Returns the new product with its id, permalink and all saved fields. Use woocommerce_product_create for a new product. Use woocommerce_product_update to change an existing one. Get category IDs from woocommerce_product_categories_list.
Inputs
namestringrequired- Product name. Example: Premium Quality Hoodie.
attributesarray- Product attributes. Each object has an id (for a global attribute) or a name (for a custom one), the options (list of term names), and visible and variation flags. Set variation to true for attributes used to build variations of a variable product. Example: [{"name": "Color", "options": ["Blue", "Red"], "visible": true, "variation": true}].
catalog_visibilitystring- Where the product appears: visible (shop and search), catalog (shop only), search (search only) or hidden.one of
visiblecatalogsearchhidden categoriesarray- Categories to assign, as a list of objects with the category id. This replaces the product's current categories. Get IDs from woocommerce_product_categories_list. Example: [{"id": 9}, {"id": 14}].
descriptionstring- Full product description; HTML is allowed. Example: <p>Soft cotton hoodie with a front pocket.</p>
dimensionsobject- Dimensions in the store's unit, as an object with length, width and height strings. Example: {"length": "30", "width": "20", "height": "5"}.
downloadableboolean- Set to true for a downloadable product.
featuredboolean- Set to true to mark the product as featured.
imagesarray- Product images. Each object has src (a public image URL that WooCommerce downloads into the Media Library) or id (an existing Media Library attachment ID), and optionally alt and name. The first image is the main image. Example: [{"src": "https://example.com/images/hoodie.jpg", "alt": "Blue hoodie"}].
manage_stockboolean- Set to true to track stock quantity for this product.
meta_dataarray- Custom meta data to store on the product, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
regular_pricestring- Regular price as a decimal string. Example: 21.99.
sale_pricestring- Sale price as a decimal string; send an empty string to end a sale. Example: 18.99.
short_descriptionstring- Short product summary shown near the price; HTML is allowed. Example: Soft cotton hoodie.
skustring- Stock keeping unit; must be unique in the store. Example: WOO-HOODIE-BLU.
statusstring- Publication status: draft, pending, private or publish. WooCommerce defaults to publish.one of
draftpendingprivatepublish stock_quantityinteger- Stock quantity; only used when manage_stock is true. Example: 25.
stock_statusstring- Stock status: instock, outofstock or onbackorder. Ignored when manage_stock is true, because WooCommerce sets it from the quantity.one of
instockoutofstockonbackorder tagsarray- Product tags to assign, as a list of objects with the tag id. This replaces the product's current tags. Example: [{"id": 34}].
tax_classstring- Tax class slug, such as reduced-rate or zero-rate. Leave empty for the standard rate. Example: reduced-rate.
tax_statusstring- Tax status: taxable, shipping (only shipping is taxed) or none.one of
taxableshippingnone typestring- Product type: simple, grouped, external or variable. WooCommerce defaults to simple.one of
simplegroupedexternalvariable virtualboolean- Set to true for a virtual product that is not shipped.
weightstring- Weight in the store's weight unit, as a string. Example: 0.5.
woocommerce_product_updateUpdate an existing WooCommerce product, such as its prices, sale dates, stock, status, descriptions, categories or images.WriteUpdate Product
Update an existing WooCommerce product, such as its prices, sale dates, stock, status, descriptions, categories or images. Returns the updated product. Use woocommerce_product_update to change a product. Use woocommerce_product_create to add a new one.
- Idempotent
Inputs
product_idintegerrequired- Numeric ID of the product. Get it from woocommerce_products_list or the product's edit screen in WP Admin. Example: 794.
attributesarray- Product attributes. Each object has an id (for a global attribute) or a name (for a custom one), the options (list of term names), and visible and variation flags. Set variation to true for attributes used to build variations of a variable product. Example: [{"name": "Color", "options": ["Blue", "Red"], "visible": true, "variation": true}].
catalog_visibilitystring- Where the product appears: visible (shop and search), catalog (shop only), search (search only) or hidden.one of
visiblecatalogsearchhidden categoriesarray- Categories to assign, as a list of objects with the category id. This replaces the product's current categories. Get IDs from woocommerce_product_categories_list. Example: [{"id": 9}, {"id": 14}].
date_on_sale_fromstring- Start of the sale price, in the store's timezone (ISO 8601). Example: 2025-11-28T00:00:00.
date_on_sale_tostring- End of the sale price, in the store's timezone (ISO 8601). Example: 2025-12-01T23:59:59.
descriptionstring- Full product description; HTML is allowed. Example: <p>Soft cotton hoodie with a front pocket.</p>
dimensionsobject- Dimensions in the store's unit, as an object with length, width and height strings. Example: {"length": "30", "width": "20", "height": "5"}.
downloadableboolean- Set to true for a downloadable product.
featuredboolean- Set to true to mark the product as featured.
imagesarray- Product images. Each object has src (a public image URL that WooCommerce downloads into the Media Library) or id (an existing Media Library attachment ID), and optionally alt and name. The first image is the main image. Example: [{"src": "https://example.com/images/hoodie.jpg", "alt": "Blue hoodie"}].
manage_stockboolean- Set to true to track stock quantity for this product.
meta_dataarray- Custom meta data to store on the product, as a list of key/value objects. Sending a key that already exists updates its value. Example: [{"key": "gift_message", "value": "Happy birthday!"}].
namestring- Product name. Example: Premium Quality Hoodie.
regular_pricestring- Regular price as a decimal string. Example: 21.99.
sale_pricestring- Sale price as a decimal string; send an empty string to end a sale. Example: 18.99.
short_descriptionstring- Short product summary shown near the price; HTML is allowed. Example: Soft cotton hoodie.
skustring- Stock keeping unit; must be unique in the store. Example: WOO-HOODIE-BLU.
statusstring- Publication status: draft, pending, private or publish.one of
draftpendingprivatepublish stock_quantityinteger- Stock quantity; only used when manage_stock is true. Example: 25.
stock_statusstring- Stock status: instock, outofstock or onbackorder. Ignored when manage_stock is true, because WooCommerce sets it from the quantity.one of
instockoutofstockonbackorder tagsarray- Product tags to assign, as a list of objects with the tag id. This replaces the product's current tags. Example: [{"id": 34}].
tax_classstring- Tax class slug, such as reduced-rate or zero-rate. Leave empty for the standard rate. Example: reduced-rate.
tax_statusstring- Tax status: taxable, shipping (only shipping is taxed) or none.one of
taxableshippingnone typestring- Product type: simple, grouped, external or variable.one of
simplegroupedexternalvariable virtualboolean- Set to true for a virtual product that is not shipped.
weightstring- Weight in the store's weight unit, as a string. Example: 0.5.
No tools match.