Getting started with the WooCommerce REST API: a developer’s guide

WooCommerce ships with a powerful REST API that exposes virtually every aspect of your store — products, orders, customers, coupons, shipping zones, and more. Whether you’re building a headless storefront, syncing with an ERP, or automating order management, the WooCommerce API is your entry point.

Authentication

WooCommerce uses OAuth 1.0a for API authentication. Generate your Consumer Key and Consumer Secret from WooCommerce → Settings → Advanced → REST API.

For server-to-server requests over HTTPS, you can use Basic Authentication with the consumer key and secret:

import requests
from requests.auth import HTTPBasicAuth

auth = HTTPBasicAuth('ck_your_consumer_key', 'cs_your_consumer_secret')
r = requests.get('https://yourstore.com/wp-json/wc/v3/products', auth=auth)

Key endpoints

  • GET /wp-json/wc/v3/products — list products
  • POST /wp-json/wc/v3/products — create a product
  • GET /wp-json/wc/v3/orders — list orders
  • POST /wp-json/wc/v3/orders — create an order
  • GET /wp-json/wc/v3/customers — list customers
  • POST /wp-json/wc/v3/coupons — create a coupon

Filtering and pagination

Use query parameters to filter results: ?status=publish&per_page=100&page=2. Always paginate large datasets rather than fetching everything in one request.

Bulk operations

The WooCommerce API supports batch operations via the /batch endpoint — you can create, update, or delete multiple records in a single API call, significantly improving performance for large imports.

Connecting WooCommerce to other systems

For production-grade integrations between WooCommerce and ERP, PIM, or CRM systems, a managed iPaaS like Alumio provides pre-built connectors, error handling, and monitoring out of the box. Explore WooCommerce integration solutions →