atomicsolutions.dev
Menu

API Reference

createStoreClient(options)

Creates a WooCommerce Store API client (public-facing operations).

Options:

  • baseURL: string — REST API root

Returns: WooCommerceStoreClient

Store methods

  • store.products.list(params?)GET /wc/store/v1/products
  • store.products.get(id)GET /wc/store/v1/products/:id
  • store.cart.get()GET /wc/store/v1/cart
  • store.cart.addItem({ id, quantity })POST /wc/store/v1/cart/add-item
  • store.cart.updateItem({ key, quantity })POST /wc/store/v1/cart/update-item
  • store.cart.removeItem({ key })POST /wc/store/v1/cart/remove-item
  • store.checkout.get()GET /wc/store/v1/checkout
  • store.checkout.placeOrder(data)POST /wc/store/v1/checkout

createAdminClient(options)

Creates a WooCommerce Admin API client (authenticated, server-side only).

Options:

  • baseURL: string
  • consumerKey: string
  • consumerSecret: string

Returns: WooCommerceAdminClient

Admin methods

  • admin.orders.list(params?)GET /wc/v3/orders
  • admin.orders.get(id)GET /wc/v3/orders/:id
  • admin.customers.list(params?)GET /wc/v3/customers
  • admin.products.list(params?)GET /wc/v3/products