Skip to content

WooCommerce REST API: Five Endpoints That Carry a Store

WooCommerce REST API: Five Endpoints That Carry a Store

The WooCommerce REST API is where the store stops being a website and becomes a system. Orders, stock, customers and reports leave the admin and move into an ERP, a warehouse or a mobile app. Below are the five endpoints that do most of that work, and the traps that come with each.

Five endpoints that do the work

  • Products. GET /products returns the catalog with prices, stock and attributes. This is the endpoint an external catalog or a marketplace reads first.
  • Orders. POST /orders creates an order, GET /orders returns the history. For finance, the order is the source of truth, not the gateway.
  • Customers. GET /customers and the address fields feed CRM sync and support screens.
  • Stock. The stock_quantity field belongs to one system. Two writers, two numbers, and the same item sold twice.
  • Reports. GET /reports/sales and the totals endpoint feed dashboards without copying the database.

Authentication and keys

The API uses consumer key and secret over HTTPS, or application passwords for admin users. Rules that save a week of debugging:

  • Keys live on the server, never in the browser or a mobile build.
  • One key per integration, so a leak can be revoked without breaking the store.
  • Read-only keys for reporting, write keys only where the integration must write.

WooCommerce REST API in Production: What Breaks

  • Pagination. A thousand products do not arrive in one response. Without the page loop, the sync copies the first hundred and calls it done.
  • Rate and load. A full catalog sync hammers the database. It runs in batches, off-peak, with a checkpoint per batch.
  • Duplicate orders. A retry after a timeout creates a second order unless the integration sends an idempotency key or checks the order status first.
  • Currency and tax. The API returns values as the store calculates them. An ERP that rounds differently produces one-cent mismatches that finance finds in a month.
  • Webhooks. They arrive late, twice or never. A queue and a reconciliation job cover the gap.

Webhooks Beat Polling

Polling the API every minute is easy to write and expensive to run. Webhooks push order and stock events, and a worker processes them with retries. The usual setup: webhook to a queue, worker updates the ERP, a nightly reconciliation compares totals.

When to Use the API and When Not To

Use the API when data must live in another system: ERP, warehouse, CRM, mobile app. Do not use it for page templates or content: that is the WordPress REST API, and mixing the two is how caching bugs start.

The official WooCommerce REST API documentation lists every field and status code. We keep a tested collection next to it, because the docs describe the contract and the client code describes reality.

Timeline and Budget

An integration runs two to six weeks depending on the number of entities and the ERP. Work sits at $35 to $55 per hour, or a fixed quote after the inventory. Ranges are on the pricing page.

If the store itself needs changes before the API can carry the load, that is WooCommerce development. After launch, maintenance packages keep the keys rotated and the reconciliation running.

Questions We Hear

Do I need a developer for the API? For reading products, a plugin may be enough. For orders, stock and money, yes: the failure modes are subtle and expensive.

Is the API safe over HTTP? No. HTTPS only, with keys stored server-side and rotated on a schedule.

Can the API export orders to an ERP in real time? Yes, through webhooks plus a queue. Real time is usually a few seconds, and the nightly reconciliation catches what the queue missed.

What about WooCommerce Blocks and the Store API? The Store API serves the cart and checkout front end. It is not a replacement for the admin REST API, and the two have different caching rules.

Send the entities you need to sync and the system on the other side. We reply with the endpoints, the batch plan and the range.