WooCommerce REST API: keys, batches and pagination

How an app gets keys to a WooCommerce store, what limits its calls, and how it changes up to 100 prices in one request. Every figure comes from WooCommerce’s own developer documentation.

By the Zikkio team Updated

In short

API
REST API wc/v3, on top of the WordPress REST API
Access
A consumer key and secret, created by the merchant
Key lifetime
No expiry stated: until revoked or their user is deleted
Rate limit
None published for the REST API
Batch writes
Up to 100 products or variations a request
Page size
10 by default, 100 at most

The REST API and its version

WooCommerce’s REST API runs on top of the WordPress REST API, with the version in the path. The current one is v3, under /wp-json/wc/v3, for WooCommerce 3.5 or later. Each store runs on the merchant’s own WordPress site, so every store your integration connects is a different server.

API keys from the merchant

An app works with a pair of REST API keys: a consumer key and a consumer secret. The /wc-auth/v1/authorize endpoint lets the merchant create them for your app, with the scope you ask for (read, write or read_write), and posts them as JSON to your callback URL. Over HTTPS the keys go in HTTP Basic auth; over plain HTTP the API requires OAuth 1.0a one-legged signing. The docs give the keys no expiry: they work until the merchant revokes them, or until the WordPress user they belong to is deleted.

Rate limits

WooCommerce publishes no rate limit for its REST API. Each store runs on the merchant’s own server, so the limit is whatever that server, its host, a CDN or a security plugin allows, and a 429 can come from any of them. The only limiter in WooCommerce’s docs is for the separate Store API that storefronts use: optional, off by default, and when it is on, a default of 25 requests every 10 seconds that the store can change.

Products and variations

A variable product keeps its variations as separate objects under /products/{id}/variations, each built from the product’s attributes. Each variation has its own price, so a price change on a variable product is a change to its variations. The docs set no maximum number of variations per product.

Writing prices in bulk

Two batch endpoints change many objects at once: /products/batch for products and /products/{id}/variations/batch for the variations of one product. A single request can create, update and delete together, up to 100 objects by default.

Writing prices in bulk
Scope Endpoint Per request
Products products/batch Up to 100 products, created, updated or deleted
Variations variations/batch Up to 100 variations of one product

Scroll sideways to see every column.

WooCommerce: the price of two variations of one product, changed in one request.
POST …/variations/batch
POST /wp-json/wc/v3/products/123/variations/batch
Authorization: Basic …
Content-Type: application/json

{
  "update": [
    { "id": 456, "regular_price": "45.00" },
    { "id": 457, "regular_price": "45.00" }
  ]
}

Pagination and webhooks

Lists are paged by number, with page and per_page, or offset instead of page. A page holds 10 items by default and at most 100, the cap WordPress sets, and the totals come back in the X-WP-Total and X-WP-TotalPages headers. For product changes WooCommerce sends webhooks with the topics product.created, product.updated and product.deleted.

WooCommerce through Zikkio

Connect your first store today.

Free plan with 5,000 API calls a month and unlimited stores. No card, and no sales call unless you ask for one.

POST /api/v1/connections
{
  "platform": "wix",
  "shop": "1a2b3c4d-…",
  "client_id": "your-wix-app-id",
  "client_secret": "…"
}
201 Created
{ "data": { "id": 12, "status": "active" } }