Install
openclaw skills install @byungkyu/woocommerceWooCommerce REST API integration with managed OAuth. Access products, orders, customers, coupons, shipping, taxes, reports, webhooks, payment gateways, store settings, and system status tools. All write operations require explicit user approval. Payment gateway and settings modifications change store behavior for all customers. System status tools can trigger repair/cleanup operations. Customer and order data contains personal information — avoid retrieving or displaying PII unless necessary for the task. Use this skill when users want to manage e-commerce operations, process orders, or integrate with WooCommerce stores. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the maton CLI with OAuth login; default to read and list calls, and confirm every write or new connection with the user.
openclaw skills install @byungkyu/woocommerceAccess the WooCommerce REST API with managed OAuth authentication. Manage products, orders, customers, coupons, shipping, taxes, and more for e-commerce operations.
All access runs through the Maton gateway and the maton CLI.
maton login --oauth # authenticate once (OAuth, recommended)
maton connection create woocommerce # connect the account (needs user approval)
maton api '/woocommerce/wp-json/wc/v3/products' # first call
npm install -g @maton/cli
brew install maton-ai/cli/maton
maton login --oauth
Opens the OAuth login page in the browser and waits for authorization. Once complete, it creates a profile in config.toml (eg. $HOME/.config/maton/config.toml) and stores the access and refresh tokens in the operating system's credential store (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux), auto-renewed on expiry. The CLI reads them when it needs them; nothing else should.
maton login --interactive
Requires manually copying an API key from Settings, which is error prone. Once complete, it also creates a profile in config.toml and stores the key in the same credential store. It is preferred over export MATON_API_KEY=..., which exposes a long-lived credential to every child process. When MATON_API_KEY is set, it overrides the active profile. If the CLI cannot be installed at all, see Appendix: Environments Without the CLI for the raw HTTP form and the rules for handling the key.
maton whoami --json
{
"authenticated": true,
"profile_name": "alice@example.com",
"auth_type": "oauth"
}
authenticated is false, stop and login again via maton login --oauth.auth_type is api_key, it is recommended to login via maton login --oauth and avoid keeping a long-lived credential.maton connection list woocommerce --status ACTIVE
{
"connections": [
{
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "woocommerce",
"method": "OAUTH2",
"metadata": {}
}
]
}
Refer to maton connection list --help for possible flags and values.
Requires explicit user approval. Confirm that the user intends to authorize WooCommerce access before running this. Never create a connection on your own initiative.
maton connection create woocommerce
Refer to maton connection create --help for possible flags and values.
maton connection get {connection_id}
{
"connection": {
"connection_id": "{connection_id}",
"status": "PENDING",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "woocommerce",
"metadata": {}
}
}
Open the returned URL in a browser to complete authorizing WooCommerce. If WooCommerce offers scope selection, choose only the scopes the current task needs.
maton connection delete {connection_id} --yes
If there are multiple WooCommerce connections, specify which one to use so requests go to the intended account:
maton api '/woocommerce/wp-json/wc/v3/products' --connection {connection_id}
WooCommerce has no typed maton woocommerce commands yet, so every call goes through maton api.
maton api '/woocommerce/wp-json/wc/v3/products'
Paths are /woocommerce/{native-api-path}. The gateway forwards everything after the app segment to {store-url}/wp-json/wc/v3 and injects the credential for the connection. Query strings, custom headers (except Host and Authorization), and all HTTP methods pass through. Send a JSON body with --input -:
maton api -X POST '/woocommerce/{native-api-path}' -H 'Content-Type: application/json' --input - <<'JSON'
{"key": "value"}
JSON
Refer to maton api --help for possible flags and values.
Maton proxies requests to your WooCommerce store and automatically handles authentication.
maton login --oauth, the token is held by the operating system's credential store and the CLI renews it on its own. Do not print it, write it to a file, pass it on a command line, or run maton token to look at one — only to hand it to a program that needs it.config.toml, or any other credential file — not for this skill, not for another application, and not to "check" that auth works (use maton whoami). Let the CLI use its own stored credential; the agent never needs the value. The same applies to unrelated secrets on the machine: .env files, SSH keys, cloud CLI credentials, and browser profiles are out of scope for an API gateway and must not be read or transmitted.api.maton.ai. Prefer endpoints that work with the gateway-injected connection credential.maton connection delete {connection_id}).maton connection create woocommerce. Never create connections on the agent's own initiative.--connection when the user has multiple connections for this app, and -p/--profile when they have multiple Maton accounts. Do not let an ambiguous default decide where a write lands.maton api '/woocommerce/wp-json/wc/v3/products'
Query parameters:
page - Current page (default: 1)per_page - Items per page (default: 10, max: 100)search - Search by product namestatus - Filter by status: draft, pending, private, publishtype - Filter by type: simple, grouped, external, variablesku - Filter by SKUcategory - Filter by category IDtag - Filter by tag IDfeatured - Filter featured productson_sale - Filter on-sale productsmin_price / max_price - Filter by price rangestock_status - Filter by stock status: instock, outofstock, onbackorderorderby - Sort by: date, id, include, title, slug, price, popularity, ratingorder - Sort order: asc, descExample:
maton api '/woocommerce/wp-json/wc/v3/products?per_page=20&status=publish'
Response:
[
{
"id": 123,
"name": "Premium T-Shirt",
"slug": "premium-t-shirt",
"type": "simple",
"status": "publish",
"sku": "TSH-001",
"price": "29.99",
"regular_price": "34.99",
"sale_price": "29.99",
"stock_quantity": 50,
"stock_status": "instock",
"categories": [{"id": 15, "name": "Apparel"}],
"images": [{"id": 456, "src": "https://..."}]
}
]
maton api '/woocommerce/wp-json/wc/v3/products/{id}'
Example:
maton api '/woocommerce/wp-json/wc/v3/products/123'
maton api -X POST '/woocommerce/wp-json/wc/v3/products' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "New Product",
"type": "simple",
"regular_price": "49.99",
"description": "Full product description",
"short_description": "Brief description",
"sku": "PROD-001",
"manage_stock": true,
"stock_quantity": 100,
"categories": [{"id": 15}],
"images": [{"src": "https://example.com/image.jpg"}]
}
JSON
Example:
maton api -X POST '/woocommerce/wp-json/wc/v3/products' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Premium Widget",
"type": "simple",
"regular_price": "19.99",
"sku": "WDG-001"
}
JSON
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/{id}'
Example:
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/123' -H 'Content-Type: application/json' --input - <<'JSON'
{
"regular_price": "24.99",
"sale_price": "19.99"
}
JSON
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/{id}'
Query parameters:
force - Set to true to permanently delete (default: false moves to trash)maton api -X POST '/woocommerce/wp-json/wc/v3/products/{id}/duplicate'
For variable products, manage individual variations:
maton api '/woocommerce/wp-json/wc/v3/products/{product_id}/variations'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/{product_id}/variations' -H 'Content-Type: application/json' --input - <<'JSON'
{
"regular_price": "29.99",
"sku": "TSH-001-RED-M",
"attributes": [
{"id": 1, "option": "Red"},
{"id": 2, "option": "Medium"}
]
}
JSON
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/{product_id}/variations/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/{product_id}/variations/{id}'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/{product_id}/variations/batch'
maton api '/woocommerce/wp-json/wc/v3/products/attributes'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/attributes' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Color",
"slug": "color",
"type": "select",
"order_by": "menu_order"
}
JSON
maton api '/woocommerce/wp-json/wc/v3/products/attributes/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/attributes/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/attributes/{id}'
maton api '/woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms'
maton api '/woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms/{id}'
maton api '/woocommerce/wp-json/wc/v3/products/categories'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/categories' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Electronics",
"parent": 0,
"description": "Electronic products"
}
JSON
maton api '/woocommerce/wp-json/wc/v3/products/categories/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/categories/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/categories/{id}'
maton api '/woocommerce/wp-json/wc/v3/products/tags'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/tags'
maton api '/woocommerce/wp-json/wc/v3/products/tags/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/tags/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/tags/{id}'
maton api '/woocommerce/wp-json/wc/v3/products/shipping_classes'
maton api -X POST '/woocommerce/wp-json/wc/v3/products/shipping_classes'
maton api '/woocommerce/wp-json/wc/v3/products/shipping_classes/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/shipping_classes/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/shipping_classes/{id}'
maton api '/woocommerce/wp-json/wc/v3/products/reviews'
Query parameters:
product - Filter by product IDstatus - Filter by status: approved, hold, spam, trashmaton api -X POST '/woocommerce/wp-json/wc/v3/products/reviews' -H 'Content-Type: application/json' --input - <<'JSON'
{
"product_id": 123,
"review": "Great product!",
"reviewer": "John Doe",
"reviewer_email": "john@example.com",
"rating": 5
}
JSON
maton api '/woocommerce/wp-json/wc/v3/products/reviews/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/products/reviews/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/products/reviews/{id}'
maton api '/woocommerce/wp-json/wc/v3/orders'
Query parameters:
page - Current page (default: 1)per_page - Items per page (default: 10)search - Search ordersafter / before - Filter by date (ISO8601)status - Order status (see below)customer - Filter by customer IDproduct - Filter by product IDorderby - Sort by: date, id, include, title, slugorder - Sort order: asc, descOrder Statuses:
pending - Payment pendingprocessing - Payment received, awaiting fulfillmenton-hold - Awaiting payment confirmationcompleted - Order fulfilledcancelled - Cancelled by admin or customerrefunded - Fully refundedfailed - Payment failedExample:
maton api '/woocommerce/wp-json/wc/v3/orders?status=processing&per_page=50'
Response:
[
{
"id": 456,
"status": "processing",
"currency": "USD",
"total": "129.99",
"customer_id": 12,
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com"
},
"line_items": [
{
"id": 789,
"product_id": 123,
"name": "Premium T-Shirt",
"quantity": 2,
"total": "59.98"
}
]
}
]
maton api '/woocommerce/wp-json/wc/v3/orders/{id}'
maton api -X POST '/woocommerce/wp-json/wc/v3/orders' -H 'Content-Type: application/json' --input - <<'JSON'
{
"payment_method": "stripe",
"payment_method_title": "Credit Card",
"set_paid": true,
"billing": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US",
"email": "john@example.com",
"phone": "555-1234"
},
"shipping": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US"
},
"line_items": [
{
"product_id": 123,
"quantity": 2
}
]
}
JSON
maton api -X PUT '/woocommerce/wp-json/wc/v3/orders/{id}'
Example - Update order status:
maton api -X PUT '/woocommerce/wp-json/wc/v3/orders/456' -H 'Content-Type: application/json' --input - <<'JSON'
{
"status": "completed"
}
JSON
maton api -X DELETE '/woocommerce/wp-json/wc/v3/orders/{id}'
maton api '/woocommerce/wp-json/wc/v3/orders/{order_id}/notes'
maton api -X POST '/woocommerce/wp-json/wc/v3/orders/{order_id}/notes' -H 'Content-Type: application/json' --input - <<'JSON'
{
"note": "Order shipped via FedEx, tracking #12345",
"customer_note": true
}
JSON
customer_note: Set to true to make the note visible to the customermaton api '/woocommerce/wp-json/wc/v3/orders/{order_id}/notes/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/orders/{order_id}/notes/{id}'
maton api '/woocommerce/wp-json/wc/v3/orders/{order_id}/refunds'
maton api -X POST '/woocommerce/wp-json/wc/v3/orders/{order_id}/refunds' -H 'Content-Type: application/json' --input - <<'JSON'
{
"amount": "25.00",
"reason": "Product damaged during shipping",
"api_refund": true
}
JSON
api_refund: Set to true to process refund through payment gatewaymaton api '/woocommerce/wp-json/wc/v3/orders/{order_id}/refunds/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/orders/{order_id}/refunds/{id}'
maton api '/woocommerce/wp-json/wc/v3/customers'
Query parameters:
page - Current page (default: 1)per_page - Items per page (default: 10)search - Search by name or emailemail - Filter by exact emailrole - Filter by role: all, administrator, customer, shop_managerorderby - Sort by: id, include, name, registered_dateorder - Sort order: asc, descExample:
maton api '/woocommerce/wp-json/wc/v3/customers?per_page=25'
Response:
[
{
"id": 12,
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"username": "johndoe",
"billing": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US",
"email": "john@example.com",
"phone": "555-1234"
},
"shipping": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US"
}
}
]
maton api '/woocommerce/wp-json/wc/v3/customers/{id}'
maton api -X POST '/woocommerce/wp-json/wc/v3/customers' -H 'Content-Type: application/json' --input - <<'JSON'
{
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Smith",
"username": "janesmith",
"password": "secure_password",
"billing": {
"first_name": "Jane",
"last_name": "Smith",
"address_1": "456 Oak Ave",
"city": "Springfield",
"state": "IL",
"postcode": "62701",
"country": "US",
"email": "jane@example.com",
"phone": "555-5678"
}
}
JSON
maton api -X PUT '/woocommerce/wp-json/wc/v3/customers/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/customers/{id}'
maton api '/woocommerce/wp-json/wc/v3/customers/{customer_id}/downloads'
Returns downloadable products the customer has access to.
maton api '/woocommerce/wp-json/wc/v3/coupons'
Query parameters:
page - Current page (default: 1)per_page - Items per page (default: 10)search - Search couponscode - Filter by coupon codematon api '/woocommerce/wp-json/wc/v3/coupons/{id}'
maton api -X POST '/woocommerce/wp-json/wc/v3/coupons' -H 'Content-Type: application/json' --input - <<'JSON'
{
"code": "SUMMER2024",
"discount_type": "percent",
"amount": "15",
"description": "Summer promotion - 15% off",
"date_expires": "2024-08-31T23:59:59",
"individual_use": true,
"usage_limit": 100,
"usage_limit_per_user": 1,
"minimum_amount": "50.00",
"maximum_amount": "500.00",
"free_shipping": false,
"exclude_sale_items": true
}
JSON
Discount Types:
percent - Percentage discountfixed_cart - Fixed amount off entire cartfixed_product - Fixed amount off per productCoupon Properties:
code - Coupon code (required)amount - Discount amountdiscount_type - Type of discountdescription - Coupon descriptiondate_expires - Expiration date (ISO8601)individual_use - Cannot be combined with other couponsproduct_ids - Array of product IDs the coupon applies toexcluded_product_ids - Array of product IDs excludedusage_limit - Total number of times coupon can be usedusage_limit_per_user - Usage limit per customerlimit_usage_to_x_items - Max items the discount applies tofree_shipping - Enables free shippingproduct_categories - Array of category IDsexcluded_product_categories - Array of excluded category IDsexclude_sale_items - Exclude sale items from discountminimum_amount - Minimum cart total requiredmaximum_amount - Maximum cart total allowedemail_restrictions - Array of allowed email addressesmaton api -X PUT '/woocommerce/wp-json/wc/v3/coupons/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/coupons/{id}'
maton api '/woocommerce/wp-json/wc/v3/taxes'
maton api -X POST '/woocommerce/wp-json/wc/v3/taxes'
maton api '/woocommerce/wp-json/wc/v3/taxes/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/taxes/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/taxes/{id}'
maton api -X POST '/woocommerce/wp-json/wc/v3/taxes/batch'
Create Tax Rate Example:
maton api -X POST '/woocommerce/wp-json/wc/v3/taxes' -H 'Content-Type: application/json' --input - <<'JSON'
{
"country": "US",
"state": "CA",
"rate": "7.25",
"name": "CA State Tax",
"shipping": true
}
JSON
maton api '/woocommerce/wp-json/wc/v3/taxes/classes'
maton api -X POST '/woocommerce/wp-json/wc/v3/taxes/classes'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/taxes/classes/{slug}'
maton api '/woocommerce/wp-json/wc/v3/shipping/zones'
maton api -X POST '/woocommerce/wp-json/wc/v3/shipping/zones'
maton api '/woocommerce/wp-json/wc/v3/shipping/zones/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/shipping/zones/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/shipping/zones/{id}'
Create Shipping Zone Example:
maton api -X POST '/woocommerce/wp-json/wc/v3/shipping/zones' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "US West Coast",
"order": 1
}
JSON
maton api '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/locations'
maton api -X PUT '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/locations'
Update Zone Locations Example:
maton api -X PUT '/woocommerce/wp-json/wc/v3/shipping/zones/1/locations' -H 'Content-Type: application/json' --input - <<'JSON'
[
{
"code": "US:CA",
"type": "state"
},
{
"code": "US:OR",
"type": "state"
},
{
"code": "US:WA",
"type": "state"
}
]
JSON
maton api '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods'
maton api -X POST '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods'
maton api '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods/{id}'
maton api '/woocommerce/wp-json/wc/v3/shipping_methods'
maton api '/woocommerce/wp-json/wc/v3/shipping_methods/{id}'
maton api '/woocommerce/wp-json/wc/v3/payment_gateways'
maton api '/woocommerce/wp-json/wc/v3/payment_gateways/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/payment_gateways/{id}'
Example - Enable a Payment Gateway:
maton api -X PUT '/woocommerce/wp-json/wc/v3/payment_gateways/stripe' -H 'Content-Type: application/json' --input - <<'JSON'
{
"enabled": true
}
JSON
maton api '/woocommerce/wp-json/wc/v3/settings'
maton api '/woocommerce/wp-json/wc/v3/settings/{group}'
Common groups: general, products, tax, shipping, checkout, account, email
maton api '/woocommerce/wp-json/wc/v3/settings/{group}/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/settings/{group}/{id}'
Example - Update Store Address:
maton api -X PUT '/woocommerce/wp-json/wc/v3/settings/general/woocommerce_store_address' -H 'Content-Type: application/json' --input - <<'JSON'
{
"value": "123 Commerce St"
}
JSON
maton api -X POST '/woocommerce/wp-json/wc/v3/settings/{group}/batch'
maton api '/woocommerce/wp-json/wc/v3/webhooks'
maton api -X POST '/woocommerce/wp-json/wc/v3/webhooks' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Order Created",
"topic": "order.created",
"delivery_url": "https://example.com/webhooks/woocommerce",
"status": "active"
}
JSON
Webhook Topics:
order.created, order.updated, order.deleted, order.restoredproduct.created, product.updated, product.deleted, product.restoredcustomer.created, customer.updated, customer.deletedcoupon.created, coupon.updated, coupon.deleted, coupon.restoredmaton api '/woocommerce/wp-json/wc/v3/webhooks/{id}'
maton api -X PUT '/woocommerce/wp-json/wc/v3/webhooks/{id}'
maton api -X DELETE '/woocommerce/wp-json/wc/v3/webhooks/{id}'
maton api '/woocommerce/wp-json/wc/v3/reports'
maton api '/woocommerce/wp-json/wc/v3/reports/sales'
Query parameters:
period - Report period: week, month, last_month, yeardate_min / date_max - Custom date rangematon api '/woocommerce/wp-json/wc/v3/reports/top_sellers'
maton api '/woocommerce/wp-json/wc/v3/reports/coupons/totals'
maton api '/woocommerce/wp-json/wc/v3/reports/customers/totals'
maton api '/woocommerce/wp-json/wc/v3/reports/orders/totals'
maton api '/woocommerce/wp-json/wc/v3/reports/products/totals'
maton api '/woocommerce/wp-json/wc/v3/reports/reviews/totals'
maton api '/woocommerce/wp-json/wc/v3/data'
maton api '/woocommerce/wp-json/wc/v3/data/continents'
maton api '/woocommerce/wp-json/wc/v3/data/continents/{code}'
maton api '/woocommerce/wp-json/wc/v3/data/countries'
maton api '/woocommerce/wp-json/wc/v3/data/countries/{code}'
maton api '/woocommerce/wp-json/wc/v3/data/currencies'
maton api '/woocommerce/wp-json/wc/v3/data/currencies/{code}'
maton api '/woocommerce/wp-json/wc/v3/data/currencies/current'
Administrative maintenance. System status tools can trigger repair, cleanup, or reset operations with potentially disruptive side effects on the live store. Only invoke POST (tool execution) when the user explicitly requests maintenance and confirms the specific tool.
maton api '/woocommerce/wp-json/wc/v3/system_status'
maton api '/woocommerce/wp-json/wc/v3/system_status/tools'
maton api -X POST '/woocommerce/wp-json/wc/v3/system_status/tools/{id}'
Most resources support batch operations for creating, updating, and deleting multiple items:
maton api -X POST '/woocommerce/wp-json/wc/v3/{resource}/batch' -H 'Content-Type: application/json' --input - <<'JSON'
{
"create": [
{"name": "New Product 1", "regular_price": "19.99"},
{"name": "New Product 2", "regular_price": "29.99"}
],
"update": [
{"id": 123, "regular_price": "24.99"}
],
"delete": [456, 789]
}
JSON
Response:
{
"create": [...],
"update": [...],
"delete": [...]
}
WooCommerce uses page-based pagination with response headers:
Query Parameters:
page - Page number (default: 1)per_page - Items per page (default: 10, max: 100)offset - Offset to start fromResponse Headers:
X-WP-Total - Total number of itemsX-WP-TotalPages - Total number of pagesLink - Contains next, prev, first, last pagination linksExample:
maton api -i '/woocommerce/wp-json/wc/v3/products?page=2&per_page=25'
YYYY-MM-DDTHH:MM:SScontext=edit parameter for additional writable fieldsWooCommerce has no typed accessor yet, so calls go through the api passthrough, which takes the app and the path after it. login() opens a browser once per machine and writes the session to the SDK's own store — maton login does not carry over, and the SDK never signs in implicitly.
Python
pip install maton-ai
from maton_ai import Maton, login
# login()
maton = Maton()
# maton = Maton(api_key="...")
result = maton.api.get("woocommerce", "/wp-json/wc/v3/products")
JavaScript
npm install @maton/sdk
import { Maton, login } from "@maton/sdk";
// await login()
const maton = new Maton();
// const maton = new Maton({ apiKey: "..." });
const result = await maton.api.get("woocommerce", "/wp-json/wc/v3/products");
| Status | Meaning |
|---|---|
| 400 | Missing WooCommerce connection |
| 401 | Invalid, missing, or expired Maton credential |
| 429 | Rate limited (10 requests/second per account) |
| 500 | Internal Server Error |
| 4xx/5xx | Passthrough error from the WooCommerce API |
Errors from WooCommerce are passed through with their original status codes and response bodies.
maton whoami --json
"authenticated": false — login again with maton login --oauth."auth_type": "api_key" — prefer maton login --oauth so no long-lived key sits on the machine.maton whoami is the check.Then confirm the app is connected:
maton connection list woocommerce --status ACTIVE
Paths passed to maton api must start with /woocommerce/:
maton api '/woocommerce/wp-json/wc/v3/products'maton api '/wp-json/wc/v3/products'A 500 may mean the WooCommerce authorization expired. With the user's approval, create a new connection (maton connection create woocommerce) and complete authorization; once it is ACTIVE, delete the stale connection so the gateway uses the new one.
maton api.--paginate walks every page and -q/--jq trims the response before it reaches you. On typed commands, --jq requires --json.maton api; Host and Authorization are set by the gateway.Everything above uses the CLI, which holds the credential itself and never exposes it to the caller. Use the raw HTTP form below only where the CLI cannot be installed — a locked-down container, a CI step, a sandbox with no package manager. If maton is available, maton api does the same job without handling a secret.
Calling https://api.maton.ai/ directly means holding a long-lived Maton API key in the process environment, where it is readable by every child process and easy to leak into logs, crash dumps, shell history, and pasted output. Handle it accordingly:
[ -n "$MATON_API_KEY" ] && echo "MATON_API_KEY is set" || echo "MATON_API_KEY is not set"
.env, or a script makes it permanent. Let the environment that starts the session supply it — a CI secret store, a container secret, a secrets manager.-H "Authorization: Bearer $MATON_API_KEY"), where it lands in ps output and shell history. Feed the header in on stdin instead, as below.api.maton.ai. It is not a credential for WooCommerce or any other third-party host.curl --config - reads the header from stdin, so the key is never a command-line argument and never reaches ps or shell history. Query values must be URL-encoded (is:unread becomes is%3Aunread).
curl --config - "https://api.maton.ai/woocommerce/wp-json/wc/v3/products" <<EOF
header = "Authorization: Bearer $MATON_API_KEY"
header = "User-Agent: maton-woocommerce-skill/1.1"
# Pin a specific connection when the account has more than one:
# header = "Maton-Connection: {connection_id}"
EOF
The same rules as the CLI apply to every request made this way: read-only calls first, and explicit user confirmation before any POST, PUT, PATCH, or DELETE.