Commerce
Manage the products and orders of a WooCommerce store on a self-hosted WordPress site through the Commerce API.
A self-hosted site running WooCommerce is also a Commerce store, managed through the Commerce API at /v1/commerce.
Manage the store
The Commerce API manages its:
- products, variants, images and stock
- categories (as collections) and coupons (as discounts)
- product custom fields and pages
- orders (read-only)
It can also sync the store into a Meta catalog for catalog ads.
Pass this account's id as accountId. Objects report platform: "woocommerce".
The connected user must be allowed to manage WooCommerce.
WordPress.com sites cannot serve WooCommerce through Zernio. Their pages remain available through the Commerce pages endpoints.
GET /v1/commerce/store returns the capabilities the site serves.
Sales channels, menus, redirects, metaobjects, markets and marketing activities are Shopify only; see WooCommerce differences.
curl "https://zernio.com/api/v1/commerce/products?accountId=66c0a1b2c3d4e5f6a7b8c9d0&status=active" \
-H "Authorization: Bearer $ZERNIO_API_KEY"Operations the store serves
Each operation below works on WooCommerce and on Shopify:
- Products: list, get, create, update, duplicate, change state, add or remove tags in bulk, update variant prices.
- Variants and options: add variants, delete variants, add options, delete options.
- Images: add, remove, reorder.
- Stock: list locations, get a product's stock, set or adjust stock.
- Categories (collections): list, get, create, update, delete, add or remove products.
- Coupons (discounts): list, get, create, update, activate or deactivate, delete.
- Custom fields (product metafields): list, set, delete.
- Pages: list, get, create, update, delete.
- Orders: list, get.
Read orders
List orders and Get an order read the store's orders with line items, coupons, tax, shipping, fees, payment status and refunds. See Sync orders for paging and webhooks.
curl "https://zernio.com/api/v1/commerce/orders?accountId=66c0a1b2c3d4e5f6a7b8c9d0&updatedAfter=2026-10-20T08:00:00Z" \
-H "Authorization: Bearer $ZERNIO_API_KEY"Orders need no extra permission: orders.read comes with any user who can manage WooCommerce. A page holds up to 100 orders.
Each order's attribution carries the last visit from WooCommerce Order Attribution (WooCommerce 8.5 or later), with landing page, referrer and UTM parameters. See Order attribution.
Zernio registers order webhooks on the site when it is connected. They reach your webhooks as commerce.order.created, commerce.order.updated and commerce.order.refunded.
A site connected before order webhooks existed gets them the next time it is reconnected or a catalog sync is created.
WooCommerce differences
WooCommerce is reached through the self-hosted site's REST API with the connected user's Application Password. What differs from Shopify:
| Area | On WooCommerce |
|---|---|
Not served (400 platform_not_supported) | Reordering collection products, adding codes to a discount (no discounts.codes), sales channels, navigation menus, URL redirects, metaobjects, markets and price lists, marketing activities. |
| Products | vendor, productType and seo are not supported (400). deactivate sets the product to draft and archive to private (inactive). A WooCommerce pending product reads as pending_review and a trashed one as deleted. |
| Collections | Product categories. They have no SEO fields and no sort order (400). |
| Discounts | Coupons, so code discounts only (no automatic discounts). A coupon cannot start in the future or require a minimum quantity (400). Deactivating one sets its expiry to now. |
| Inventory | One location, with the id default. An adjust reads the count and writes the sum, since WooCommerce has no atomic increment: a sale landing in between can be overwritten. |
| Metafields | Product custom fields (meta data) only: stores do not list collections.metafields, and collection metafields answer 400 platform_not_supported. A key without a dot is returned under the namespace woocommerce; namespace.key round-trips. |
| Pagination | The cursor wraps a page number and a page holds at most 100 rows. |
| Pages | WordPress pages, available whenever the user can edit pages, with or without WooCommerce. |
How it behaves
- No optional permissions:
grantPermissionsUrlis alwaysnull. - Store capabilities appear when the site runs WooCommerce and the connected user can manage it.
- Order attribution records only the last session, so
firstVisitandoccurredAtare alwaysnull. It needs Order Attribution turned on, and covers orders placed after that. customAttributeson an order'sattributionholds the public order meta.- Product changes: Zernio registers product webhooks on the site when it is connected and again when a catalog sync is created, so syncs pick changes up within minutes.
Related
- Commerce guide: the cross-store recipe.
- Shopify commerce: the Shopify-only operations.