API Connections / WooCommerce REST API: setup and what it can do

WooCommerce REST API: setup and what it can do Beginner

WooCommerce is a store add-on for WordPress websites, and its REST API lets programs read and update your store. Here's what it can do, what you need, and how to get started without being a programmer.

What you'll learn

  • What this API is for
  • The setup steps, in order
  • What it can do for a bot

Before you start

1. What it is, in plain words

WooCommerce is a store add-on for WordPress websites, and its REST API lets programs read and update your store. An API (application programming interface) is a doorway that lets one program ask another for information or to do something. New to APIs? Read What is an API? and API keys vs OAuth first.

2. Why you'd want it

A bot could pull orders for a report, update stock, or react when a new order arrives.

3. Set it up

  1. In WordPress, go to WooCommerce > Settings > Advanced > REST API.
  2. Create a key for a user and choose Read, Write or Read/Write permission.
  3. Copy the consumer key and secret right away; they are shown once.
  4. Call your store at /wp-json/wc/v3/ over HTTPS.
Screenshot: The developer portal page where you create an app and see your keys (keys blurred).

4. What it can do

5. Let your bot help

You don't have to write the code yourself. Tell your bot what you want and point it at the official docs:

Read the official WooCommerce REST API docs and show me, step by step, how to get my first test call working. Ask me for keys with a secure form.

When your bot needs a key or secret, let it ask you for it with a secure form, so the value is masked and isn't written into the chat. Never paste keys or passwords into an ordinary message.

Official docs: WooCommerce REST API docs · WooCommerce: REST API

Ideas to try

  • Weekly report.
    With a read-only WooCommerce key, list last week's orders and total sales.
  • Stock.
    Which products have stock under 5?
  • New-order alerts.
    Explain how to set up an order.created webhook.
  • Coupons.
    Draft a coupon setup for 15% off, but don't create it until I approve.

Tips

  • Always start in the test (sandbox) environment if one exists.
  • Give keys the smallest permissions that do the job.
  • Write down where each key lives so you can replace (rotate) it later.

Facts about the Grok Bot app come from Cursor's official Grok Bot documentation. Third-party details: WooCommerce REST API docs · WooCommerce: REST API. Menus and services change; if something looks different, check the official docs or ask your bot.