Skip to main content

WooCommerce

Use WooCommerce to manage products, orders, customers, and coupons. With these operations, you can list, create, update, and delete entities in your WooCommerce store.

Prerequisites

To use WooCommerce, you need:

  • A WooCommerce store (self-hosted WordPress with WooCommerce installed).
  • REST API credentials (Consumer Key & Consumer Secret). You can generate these credentials from:
    • WooCommerce AdminSettingsAdvancedREST API
    • Follow this guide for setup instructions.

For detailed API reference, visit the official
WooCommerce REST API Documentation.

Supported Authentication Methods

  • API Key (Consumer Key & Consumer Secret)

More details on authentication:
WooCommerce Authentication Methods

Basic Operations

Order

  • List Orders: Retrieve a list of all orders in your WooCommerce store.
  • Get Order: Retrieve detailed information about a specific order by its ID.
  • Create Order: Create a new order with customer and product details.
  • Update Order: Modify the details of an existing order.
  • Delete Order: Delete an order by its ID.

Coupon

  • List Coupons: Retrieve a list of all discount coupons in your WooCommerce store.
  • Get Coupon: Retrieve details of a specific coupon by its ID.
  • Create Coupon: Create a new discount coupon.
  • Update Coupon: Modify an existing coupon.
  • Delete Coupon: Remove a coupon by its ID.

Customer

  • List Customers: Retrieve a list of all customers in your WooCommerce store.
  • Get Customer: Retrieve details of a specific customer by their ID.
  • Create Customer: Add a new customer to your store.
  • Update Customer: Modify an existing customer’s details.
  • Delete Customer: Remove a customer by their ID.

Product

  • List Products: Retrieve a list of all products in your WooCommerce store.
  • Get Product: Retrieve details of a specific product by its ID.
  • Create Product: Add a new product to your store.
  • Update Product: Modify an existing product’s details.
  • Delete Product: Remove a product by its ID.

Product Variations

  • Create a Product Variation: Create a new variation for an existing variable product, including attributes like size, color, price, and stock status.
  • List Product Variations: Retrieve a list of product variations for a specific variable product.
  • Get a Product Variant: Search for specific product variations.
  • Update a Product Variation: Update a specific product variation.
  • Delete a Product Variation: Delete a product variation by ID.

Product Tags

  • Create a Product Tag: Add a new product tag to your WooCommerce store. This is useful for organizing products under new categories or themes. You can specify details like the tag name and description during creation.
  • Retrieve a Product Tag: Fetch details for a specific product tag using its unique identifier. This operation helps to view the current configuration and usage of a specific tag.
  • List All Product Tags: Get a list of all product tags available in your WooCommerce store. This is useful for reviewing all tag categories that are currently in use.
  • Update a Product Tag: Modify an existing product tag's information, such as its name or description. This allows you to keep your product categorization up to date.
  • Delete a Product Tag: Remove a product tag from your store using its ID. This is helpful when tags are no longer needed or relevant to your product catalog.

Product Categories

  • Create a Product Category: Create a new product category.
  • Retrieve a Product Category: Retrieve a specific product category by ID.
  • List All Product Categories: Retrieve a list of all product categories.
  • Update a Product Category: Update an existing product category.
  • Delete a Product Category: Delete a product category by ID.

Product Attributes

  • Create a Product Attribute: Create a new product attribute with details like name, slug, type, order, and archive support.
  • Get a Product Attribute: Retrieve details of a specific product attribute by ID.
  • List Product Attributes: List all available product attributes.
  • Update a Product Attribute: Update a specific product attribute by ID.
  • Delete a Product Attribute: Delete a specific product attribute by ID.

Refunds

  • Create Refund: Create a new refund for a specific WooCommerce order.
  • List Refunds: List all refunds associated with a specific WooCommerce order.
  • Retrieve Refund: Retrieve the details of a specific refund from an order.
  • Delete Refund: Delete a specific refund from an order.

Reports

  • List All Reports: Retrieve a simple list of all available reports.
  • Retrieve Sales Report: Retrieve and view a sales report.
  • Retrieve Top Sellers Report: Retrieve a list of top sellers report.
  • Retrieve Total Coupons Report: Retrieve and view coupons totals report.
  • Retrieve Total Customers Report: Retrieve and view customers totals report.
  • Retrieve Total Orders Report: Retrieve and view orders totals report.
  • Retrieve Total Products Report: Retrieve and view products totals report.
  • Retrieve Total Reviews Report: Retrieve and view reviews totals report.

Shipping Classes

  • Create a Shipping Class: Create a new product shipping class.
  • Retrieve a Shipping Class: Retrieve a specific product shipping class by ID.
  • List All Shipping Classes: Retrieve a list of all product shipping classes.
  • Update a Shipping Class: Update an existing product shipping class.
  • Delete a Shipping Class: Delete a product shipping class by ID.

Order Action

  • Send Order Confirmation Email: Sends a confirmation email for the order to the customer.

Order Notes

  • Create Order Note: Create a new note for a WooCommerce order. Order notes can be used to add internal comments, customer-facing messages, or track important order updates.
  • List Order Notes: Retrieve a paginated list of all notes associated with a specific WooCommerce order. This includes both internal notes and customer-facing messages.
  • Retrieve Order Note: Retrieve detailed information about a specific order note using its unique ID. This includes the note content, author, date created, and whether it's customer-facing.
  • Delete Order Note: Permanently remove a specific order note from a WooCommerce order. This action cannot be undone, so use it carefully.

Payment Gateway

  • Retrieve a Payment Gateway: Fetch detailed information for a single payment gateway using its unique identifier, such as 'paypal' or 'stripe'. This operation is useful for viewing current configurations of a specific gateway.
  • List All Payment Gateways: Obtain a complete list of all payment gateways configured in your WooCommerce store. This helps in reviewing all available payment methods and their current statuses.
  • Update a Payment Gateway: Modify the configuration of an existing payment gateway.

Further Reading

For more information on the WooCommerce API, refer to the official
WooCommerce REST API Documentation.