Table of Contents
WooCommerce is a WordPress eCommerce plugin that transforms your WordPress website into a fully featured eCommerce store.
API Overview
WooCommerce is an open-source eCommerce plugin for WordPress that empowers businesses to create and manage online stores. It offers a wide range of features, including product management, payment processing, shipping options, and inventory tracking. WooCommerce seamlessly integrates with WordPress, allowing users to leverage the platform's extensive ecosystem of plugins and themes. Its user-friendly interface and extensive documentation make it accessible to both beginners and experienced developers. WooCommerce is a powerful solution for businesses of all sizes, enabling them to establish and grow their online presence effectively.
WooCommerce API provides a comprehensive set of RESTful APIs that allow developers to interact with WooCommerce stores programmatically. The well-documented API enables the creation, retrieval, update, and deletion of resources such as products, orders, customers, and more. Developers can use the API to automate tasks, integrate with external systems, and extend the functionality of their WooCommerce stores. Additionally, WooCommerce supports webhooks, a mechanism for receiving real-time notifications of events occurring within the store. This allows developers to build custom integrations and respond to events such as new orders, product updates, or inventory changes. To prevent excessive usage, WooCommerce imposes rate limits on API requests, ensuring the stability and performance of the platform.
API Request Limits
Free Plan
100 requests per minute
Pro Plan
500 requests per minute
Business Plan
1,000 requests per minute
Enterprise Plan
2,000 requests per minute
APIs
Method: GET
Description: Retrieve all products..
Endpoint: /products
Parameters:
Method: POST
Description: Create a new product..
Endpoint: /products
Parameters: [name], [type], [status], [featured], [catalog_visibility], [description], [short_description], [sku], [price], [regular_price], [sale_price], [date_on_sale_from], [date_on_sale_to], [price_html], [on_sale], [purchasable], [total_sales], [tax_status], [tax_class], [manage_stock], [stock_quantity], [stock_status], [backorders], [backorders_allowed], [backordered], [sold_individually], [weight], [dimensions], [shipping_required], [shipping_taxable], [shipping_class], [shipping_local_pickup_available], [shipping_local_pickup_cost], [virtual], [downloadable], [downloads], [download_limit], [download_expiry], [external_url], [button_text], [tax_status], [tax_class], [related_ids], [upsell_ids], [cross_sell_ids], [parent_id], [purchase_note], [featured_image], [gallery_image_ids], [menu_order], [reviews_allowed], [average_rating], [rating_count], [new], [sold], [additional_information], [meta_data]
Method: PUT
Description: Update the product..
Endpoint: /products/%7Bid%7D
Parameters: [name], [type], [status], [featured], [catalog_visibility], [description], [short_description], [sku], [price], [regular_price], [sale_price], [date_on_sale_from], [date_on_sale_to], [price_html], [on_sale], [purchasable], [total_sales], [tax_status], [tax_class], [manage_stock], [stock_quantity], [stock_status], [backorders], [backorders_allowed], [backordered], [sold_individually], [weight], [dimensions], [shipping_required], [shipping_taxable], [shipping_class], [shipping_local_pickup_available], [shipping_local_pickup_cost], [virtual], [downloadable], [downloads], [download_limit], [download_expiry], [external_url], [button_text], [tax_status], [tax_class], [related_ids], [upsell_ids], [cross_sell_ids], [parent_id], [purchase_note], [featured_image], [gallery_image_ids], [menu_order], [reviews_allowed], [average_rating], [rating_count], [new], [sold], [additional_information], [meta_data]
Method: DELETE
Description: Delete the product..
Endpoint: /products/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve a product..
Endpoint: /products/%7Bid%7D
Parameters:
Method: PUT
Description: Update a product..
Endpoint: /products/%7Bid%7D
Parameters: [name], [type], [status], [featured], [catalog_visibility], [description], [short_description], [sku], [price], [regular_price], [sale_price], [date_on_sale_from], [date_on_sale_to], [price_html], [on_sale], [purchasable], [total_sales], [tax_status], [tax_class], [manage_stock], [stock_quantity], [stock_status], [backorders], [backorders_allowed], [backordered], [sold_individually], [weight], [dimensions], [shipping_required], [shipping_taxable], [shipping_class], [shipping_local_pickup_available], [shipping_local_pickup_cost], [virtual], [downloadable], [downloads], [download_limit], [download_expiry], [external_url], [button_text], [tax_status], [tax_class], [related_ids], [upsell_ids], [cross_sell_ids], [parent_id], [purchase_note], [featured_image], [gallery_image_ids], [menu_order], [reviews_allowed], [average_rating], [rating_count], [new], [sold], [additional_information], [meta_data]
Method: DELETE
Description: Delete a product..
Endpoint: /products/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve all orders..
Endpoint: /orders
Parameters:
Method: POST
Description: Create a new order..
Endpoint: /orders
Parameters: [payment_method], [payment_method_title], [set_paid], [status], [currency], [customer_id], [customer_ip_address], [customer_user_agent], [created_via], [discount_total], [discount_tax], [shipping_total], [shipping_tax], [cart_tax], [total], [total_tax], [prices_include_tax], [customer_note], [shipping_methods], [billing_address], [shipping_address], [line_items], [tax_lines], [meta_data]
Method: PUT
Description: Update an order..
Endpoint: /orders/%7Bid%7D
Parameters: [status], [currency], [discount_total], [discount_tax], [shipping_total], [shipping_tax], [cart_tax], [total], [total_tax], [prices_include_tax], [customer_note], [customer_id], [shipping_methods], [billing_address], [shipping_address], [line_items], [tax_lines], [meta_data]
Method: DELETE
Description: Delete an order..
Endpoint: /orders/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve an order..
Endpoint: /orders/%7Bid%7D
Parameters:
Method: PUT
Description: Update an order..
Endpoint: /orders/%7Bid%7D
Parameters: [status], [currency], [discount_total], [discount_tax], [shipping_total], [shipping_tax], [cart_tax], [total], [total_tax], [prices_include_tax], [customer_note], [customer_id], [shipping_methods], [billing_address], [shipping_address], [line_items], [tax_lines], [meta_data]
Method: DELETE
Description: Delete an order..
Endpoint: /orders/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve all customers..
Endpoint: /customers
Parameters:
Method: POST
Description: Create a new customer..
Endpoint: /customers
Parameters: [email], [first_name], [last_name], [username], [password], [billing_address], [shipping_address], [is_paying_customer], [meta_data]
Method: PUT
Description: Update a customer..
Endpoint: /customers/%7Bid%7D
Parameters: [email], [first_name], [last_name], [username], [password], [billing_address], [shipping_address], [is_paying_customer], [meta_data]
Method: DELETE
Description: Delete a customer..
Endpoint: /customers/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve a customer..
Endpoint: /customers/%7Bid%7D
Parameters:
Method: PUT
Description: Update a customer..
Endpoint: /customers/%7Bid%7D
Parameters: [email], [first_name], [last_name], [username], [password], [billing_address], [shipping_address], [is_paying_customer], [meta_data]
Method: DELETE
Description: Delete a customer..
Endpoint: /customers/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve all coupons..
Endpoint: /coupons
Parameters:
Method: POST
Description: Create a new coupon..
Endpoint: /coupons
Parameters: [code], [description], [discount_type], [amount], [individual_use], [usage_limit], [usage_count], [expiry_date], [apply_before_tax], [free_shipping], [product_ids], [excluded_product_ids], [product_categories], [excluded_product_categories], [minimum_amount], [maximum_amount], [email_restrictions], [used_by], [meta_data]
Method: PUT
Description: Update a coupon..
Endpoint: /coupons/%7Bid%7D
Parameters: [code], [description], [discount_type], [amount], [individual_use], [usage_limit], [usage_count], [expiry_date], [apply_before_tax], [free_shipping], [product_ids], [excluded_product_ids], [product_categories], [excluded_product_categories], [minimum_amount], [maximum_amount], [email_restrictions], [used_by], [meta_data]
Method: DELETE
Description: Delete a coupon..
Endpoint: /coupons/%7Bid%7D
Parameters:
Method: GET
Description: Retrieve a coupon..
Endpoint: /coupons/%7Bid%7D
Parameters:
Method: PUT
Description: Update a coupon..
Endpoint: /coupons/%7Bid%7D
Parameters: [code], [description], [discount_type], [amount], [individual_use], [usage_limit], [usage_count], [expiry_date], [apply_before_tax], [free_shipping], [product_ids], [excluded_product_ids], [product_categories], [excluded_product_categories], [minimum_amount], [maximum_amount], [email_restrictions], [used_by], [meta_data]
Method:
Description: .
Endpoint:
Parameters:
FAQ
How do I obtain an API key?
To obtain an API key, create a developer account on WooCommerce.com and navigate to the 'Keys' tab.
What are the rate limits for the WooCommerce API?
The rate limit for the WooCommerce API is 100 requests per minute per consumer key. If exceeded, requests will fail with a 429 error code.
Can I use the sandbox account to test the API?
Yes, you can use the sandbox account to test the WooCommerce API. The sandbox account provides a test environment with mock data, allowing you to experiment with the API without affecting a live store.
How do I handle OAuth authentication for the WooCommerce API?
To handle OAuth authentication for the WooCommerce API, you will need to obtain a consumer key and secret from your developer account. Use these credentials to generate an access token and secret using the OAuth 2.0 protocol.
What is the purpose of the REST API versioning system?
The REST API versioning system allows WooCommerce to introduce new features and changes to the API while maintaining backward compatibility. Each version represents a specific set of endpoints and functionality.