OverviewProductsPlatformsAPI ReferenceResources

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.

Terminal
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:

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.

Terminal
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:

AreaOn 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.
Productsvendor, 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.
CollectionsProduct categories. They have no SEO fields and no sort order (400).
DiscountsCoupons, 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.
InventoryOne 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.
MetafieldsProduct 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.
PaginationThe cursor wraps a page number and a page holds at most 100 rows.
PagesWordPress pages, available whenever the user can edit pages, with or without WooCommerce.

How it behaves

  • No optional permissions: grantPermissionsUrl is always null.
  • Store capabilities appear when the site runs WooCommerce and the connected user can manage it.
  • Order attribution records only the last session, so firstVisit and occurredAt are always null. It needs Order Attribution turned on, and covers orders placed after that.
  • customAttributes on an order's attribution holds 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.
Was this page helpful?

On this page