Access the WooCommerce REST API with managed OAuth authentication. Manage products, orders, customers, coupons, shipping, taxes, and more for e-commerce operations.
Reference
List All Products
GET /woocommerce/wp-json/wc/v3/productsQuery 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,desc
Example:
curl -s -X GET "https://api.maton.ai/woocommerce/wp-json/wc/v3/products?per_page=20&status=publish" -H "Authorization: Bearer $MATON_API_KEY"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://..."}]
}
]Get a Product
GET /woocommerce/wp-json/wc/v3/products/{id}Example:
curl -s -X GET "https://api.maton.ai/woocommerce/wp-json/wc/v3/products/123" -H "Authorization: Bearer $MATON_API_KEY"Create a Product
POST /woocommerce/wp-json/wc/v3/products
Content-Type: application/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"}]
}Example:
curl -s -X POST "https://api.maton.ai/woocommerce/wp-json/wc/v3/products" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"name": "Premium Widget", "type": "simple", "regular_price": "19.99", "sku": "WDG-001"}'Update a Product
PUT /woocommerce/wp-json/wc/v3/products/{id}Example:
curl -s -X PUT "https://api.maton.ai/woocommerce/wp-json/wc/v3/products/123" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"regular_price": "24.99", "sale_price": "19.99"}'Delete a Product
DELETE /woocommerce/wp-json/wc/v3/products/{id}Query parameters:
force- Set totrueto permanently delete (default:falsemoves to trash)
Duplicate a Product
POST /woocommerce/wp-json/wc/v3/products/{id}/duplicateList Variations
GET /woocommerce/wp-json/wc/v3/products/{product_id}/variationsCreate Variation
POST /woocommerce/wp-json/wc/v3/products/{product_id}/variations
Content-Type: application/json
{
"regular_price": "29.99",
"sku": "TSH-001-RED-M",
"attributes": [
{"id": 1, "option": "Red"},
{"id": 2, "option": "Medium"}
]
}Update Variation
PUT /woocommerce/wp-json/wc/v3/products/{product_id}/variations/{id}Delete Variation
DELETE /woocommerce/wp-json/wc/v3/products/{product_id}/variations/{id}Batch Update Variations
POST /woocommerce/wp-json/wc/v3/products/{product_id}/variations/batchList Attributes
GET /woocommerce/wp-json/wc/v3/products/attributesCreate Attribute
POST /woocommerce/wp-json/wc/v3/products/attributes
Content-Type: application/json
{
"name": "Color",
"slug": "color",
"type": "select",
"order_by": "menu_order"
}Get/Update/Delete Attribute
GET /woocommerce/wp-json/wc/v3/products/attributes/{id}
PUT /woocommerce/wp-json/wc/v3/products/attributes/{id}
DELETE /woocommerce/wp-json/wc/v3/products/attributes/{id}Attribute Terms
GET /woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms
POST /woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms
GET /woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms/{id}
PUT /woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms/{id}
DELETE /woocommerce/wp-json/wc/v3/products/attributes/{attribute_id}/terms/{id}List Categories
GET /woocommerce/wp-json/wc/v3/products/categoriesCreate Category
POST /woocommerce/wp-json/wc/v3/products/categories
Content-Type: application/json
{
"name": "Electronics",
"parent": 0,
"description": "Electronic products"
}Get/Update/Delete Category
GET /woocommerce/wp-json/wc/v3/products/categories/{id}
PUT /woocommerce/wp-json/wc/v3/products/categories/{id}
DELETE /woocommerce/wp-json/wc/v3/products/categories/{id}Product Tags
GET /woocommerce/wp-json/wc/v3/products/tags
POST /woocommerce/wp-json/wc/v3/products/tags
GET /woocommerce/wp-json/wc/v3/products/tags/{id}
PUT /woocommerce/wp-json/wc/v3/products/tags/{id}
DELETE /woocommerce/wp-json/wc/v3/products/tags/{id}Product Shipping Classes
GET /woocommerce/wp-json/wc/v3/products/shipping_classes
POST /woocommerce/wp-json/wc/v3/products/shipping_classes
GET /woocommerce/wp-json/wc/v3/products/shipping_classes/{id}
PUT /woocommerce/wp-json/wc/v3/products/shipping_classes/{id}
DELETE /woocommerce/wp-json/wc/v3/products/shipping_classes/{id}List Reviews
GET /woocommerce/wp-json/wc/v3/products/reviewsQuery parameters:
product- Filter by product IDstatus- Filter by status:approved,hold,spam,trash
Create Review
POST /woocommerce/wp-json/wc/v3/products/reviews
Content-Type: application/json
{
"product_id": 123,
"review": "Great product!",
"reviewer": "John Doe",
"reviewer_email": "john@example.com",
"rating": 5
}Get/Update/Delete Review
GET /woocommerce/wp-json/wc/v3/products/reviews/{id}
PUT /woocommerce/wp-json/wc/v3/products/reviews/{id}
DELETE /woocommerce/wp-json/wc/v3/products/reviews/{id}List All Orders
GET /woocommerce/wp-json/wc/v3/ordersQuery 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,desc
Order Statuses:
pending- Payment pendingprocessing- Payment received, awaiting fulfillmenton-hold- Awaiting payment confirmationcompleted- Order fulfilledcancelled- Cancelled by admin or customerrefunded- Fully refundedfailed- Payment failed
Example:
curl -s -X GET "https://api.maton.ai/woocommerce/wp-json/wc/v3/orders?status=processing&per_page=50" -H "Authorization: Bearer $MATON_API_KEY"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"
}
]
}
]Get an Order
GET /woocommerce/wp-json/wc/v3/orders/{id}Create an Order
POST /woocommerce/wp-json/wc/v3/orders
Content-Type: application/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
}
]
}Update an Order
PUT /woocommerce/wp-json/wc/v3/orders/{id}Example - Update order status:
curl -s -X PUT "https://api.maton.ai/woocommerce/wp-json/wc/v3/orders/456" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"status": "completed"}'Delete an Order
DELETE /woocommerce/wp-json/wc/v3/orders/{id}List Order Notes
GET /woocommerce/wp-json/wc/v3/orders/{order_id}/notesCreate Order Note
POST /woocommerce/wp-json/wc/v3/orders/{order_id}/notes
Content-Type: application/json
{
"note": "Order shipped via FedEx, tracking #12345",
"customer_note": true
}customer_note: Set totrueto make the note visible to the customer
Get/Delete Order Note
GET /woocommerce/wp-json/wc/v3/orders/{order_id}/notes/{id}
DELETE /woocommerce/wp-json/wc/v3/orders/{order_id}/notes/{id}List Refunds
GET /woocommerce/wp-json/wc/v3/orders/{order_id}/refundsCreate Refund
POST /woocommerce/wp-json/wc/v3/orders/{order_id}/refunds
Content-Type: application/json
{
"amount": "25.00",
"reason": "Product damaged during shipping",
"api_refund": true
}api_refund: Set totrueto process refund through payment gateway
Get/Delete Refund
GET /woocommerce/wp-json/wc/v3/orders/{order_id}/refunds/{id}
DELETE /woocommerce/wp-json/wc/v3/orders/{order_id}/refunds/{id}List All Customers
GET /woocommerce/wp-json/wc/v3/customersQuery 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,desc
Example:
curl -s -X GET "https://api.maton.ai/woocommerce/wp-json/wc/v3/customers?per_page=25" -H "Authorization: Bearer $MATON_API_KEY"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"
}
}
]Get a Customer
GET /woocommerce/wp-json/wc/v3/customers/{id}Create a Customer
POST /woocommerce/wp-json/wc/v3/customers
Content-Type: application/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"
}
}Update a Customer
PUT /woocommerce/wp-json/wc/v3/customers/{id}Delete a Customer
DELETE /woocommerce/wp-json/wc/v3/customers/{id}Customer Downloads
GET /woocommerce/wp-json/wc/v3/customers/{customer_id}/downloadsReturns downloadable products the customer has access to.
List All Coupons
GET /woocommerce/wp-json/wc/v3/couponsQuery parameters:
page- Current page (default: 1)per_page- Items per page (default: 10)search- Search couponscode- Filter by coupon code
Get a Coupon
GET /woocommerce/wp-json/wc/v3/coupons/{id}Create a Coupon
POST /woocommerce/wp-json/wc/v3/coupons
Content-Type: application/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
}Discount Types:
percent- Percentage discountfixed_cart- Fixed amount off entire cartfixed_product- Fixed amount off per product
Coupon 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 addresses
Update a Coupon
PUT /woocommerce/wp-json/wc/v3/coupons/{id}Delete a Coupon
DELETE /woocommerce/wp-json/wc/v3/coupons/{id}Tax Rates
GET /woocommerce/wp-json/wc/v3/taxes
POST /woocommerce/wp-json/wc/v3/taxes
GET /woocommerce/wp-json/wc/v3/taxes/{id}
PUT /woocommerce/wp-json/wc/v3/taxes/{id}
DELETE /woocommerce/wp-json/wc/v3/taxes/{id}
POST /woocommerce/wp-json/wc/v3/taxes/batchCreate Tax Rate Example:
curl -s -X POST "https://api.maton.ai/woocommerce/wp-json/wc/v3/taxes" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"country": "US", "state": "CA", "rate": "7.25", "name": "CA State Tax", "shipping": true}'Tax Classes
GET /woocommerce/wp-json/wc/v3/taxes/classes
POST /woocommerce/wp-json/wc/v3/taxes/classes
DELETE /woocommerce/wp-json/wc/v3/taxes/classes/{slug}Shipping Zones
GET /woocommerce/wp-json/wc/v3/shipping/zones
POST /woocommerce/wp-json/wc/v3/shipping/zones
GET /woocommerce/wp-json/wc/v3/shipping/zones/{id}
PUT /woocommerce/wp-json/wc/v3/shipping/zones/{id}
DELETE /woocommerce/wp-json/wc/v3/shipping/zones/{id}Create Shipping Zone Example:
curl -s -X POST "https://api.maton.ai/woocommerce/wp-json/wc/v3/shipping/zones" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"name": "US West Coast", "order": 1}'Shipping Zone Locations
GET /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/locations
PUT /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/locationsUpdate Zone Locations Example:
curl -s -X PUT "https://api.maton.ai/woocommerce/wp-json/wc/v3/shipping/zones/1/locations" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '[{"code": "US:CA", "type": "state"}, {"code": "US:OR", "type": "state"}, {"code": "US:WA", "type": "state"}]'Shipping Zone Methods
GET /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods
POST /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods
GET /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods/{id}
PUT /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods/{id}
DELETE /woocommerce/wp-json/wc/v3/shipping/zones/{zone_id}/methods/{id}Shipping Methods (Global)
GET /woocommerce/wp-json/wc/v3/shipping_methods
GET /woocommerce/wp-json/wc/v3/shipping_methods/{id}Payment Gateways
GET /woocommerce/wp-json/wc/v3/payment_gateways
GET /woocommerce/wp-json/wc/v3/payment_gateways/{id}
PUT /woocommerce/wp-json/wc/v3/payment_gateways/{id}Example - Enable a Payment Gateway:
curl -s -X PUT "https://api.maton.ai/woocommerce/wp-json/wc/v3/payment_gateways/stripe" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"enabled": true}'List Settings Groups
GET /woocommerce/wp-json/wc/v3/settingsList Settings in a Group
GET /woocommerce/wp-json/wc/v3/settings/{group}Common groups: general, products, tax, shipping, checkout, account, email
Get/Update a Setting
GET /woocommerce/wp-json/wc/v3/settings/{group}/{id}
PUT /woocommerce/wp-json/wc/v3/settings/{group}/{id}Example - Update Store Address:
curl -s -X PUT "https://api.maton.ai/woocommerce/wp-json/wc/v3/settings/general/woocommerce_store_address" -H "Content-Type: application/json" -H "Authorization: Bearer $MATON_API_KEY" -d '{"value": "123 Commerce St"}'Batch Update Settings
POST /woocommerce/wp-json/wc/v3/settings/{group}/batchList All Webhooks
GET /woocommerce/wp-json/wc/v3/webhooksCreate a Webhook
POST /woocommerce/wp-json/wc/v3/webhooks
Content-Type: application/json
{
"name": "Order Created",
"topic": "order.created",
"delivery_url": "https://example.com/webhooks/woocommerce",
"status": "active"
}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.restored
Get/Update/Delete Webhook
GET /woocommerce/wp-json/wc/v3/webhooks/{id}
PUT /woocommerce/wp-json/wc/v3/webhooks/{id}
DELETE /woocommerce/wp-json/wc/v3/webhooks/{id}List Available Reports
GET /woocommerce/wp-json/wc/v3/reportsSales Report
GET /woocommerce/wp-json/wc/v3/reports/salesQuery parameters:
period- Report period:week,month,last_month,yeardate_min/date_max- Custom date range
Top Sellers Report
GET /woocommerce/wp-json/wc/v3/reports/top_sellersCoupons Totals
GET /woocommerce/wp-json/wc/v3/reports/coupons/totalsCustomers Totals
GET /woocommerce/wp-json/wc/v3/reports/customers/totalsOrders Totals
GET /woocommerce/wp-json/wc/v3/reports/orders/totalsProducts Totals
GET /woocommerce/wp-json/wc/v3/reports/products/totalsReviews Totals
GET /woocommerce/wp-json/wc/v3/reports/reviews/totalsList All Data Endpoints
GET /woocommerce/wp-json/wc/v3/dataContinents
GET /woocommerce/wp-json/wc/v3/data/continents
GET /woocommerce/wp-json/wc/v3/data/continents/{code}Countries
GET /woocommerce/wp-json/wc/v3/data/countries
GET /woocommerce/wp-json/wc/v3/data/countries/{code}Currencies
GET /woocommerce/wp-json/wc/v3/data/currencies
GET /woocommerce/wp-json/wc/v3/data/currencies/{code}
GET /woocommerce/wp-json/wc/v3/data/currencies/currentSystem Status
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.
GET /woocommerce/wp-json/wc/v3/system_status
GET /woocommerce/wp-json/wc/v3/system_status/tools
POST /woocommerce/wp-json/wc/v3/system_status/tools/{id}