To connect to the WooCommerce REST API, the following information is required:
- Store URL
- Consumer Key
- Consumer Secret
Follow these steps to gather required information, and to configure the WooCommerce REST API.
Gather Store URL
The Store URL is the root domain of your WooCommerce store, such as https://www.example.com. Make note of this exact web address.
Configure Permalinks
In WordPress admin, go to Settings > Permalinks. Make sure these are set to anything other than "Plain," such as Day and name.
Generate API Keys
- Go to WooCommerce > Settings > Advanced > REST API, and click Add Key.
- For Description, enter
PackageBee. - For User, choose the user account whose access level will be used for API transactions. This user should have the Administrator or Shop Manager role, or at minimum these role permissions:
- General - Read
- Posts - Read
- Pages - Read
- Products
edit_productsedit_others_productsread_private_productspublish_productsread_private_productsedit_private_productsedit_published_products
- Orders
edit_shop_ordersedit_others_shop_orderspublish_shop_ordersread_private_shop_ordersedit_private_shop_ordersedit_published_shop_orders
- Coupons -
read_private_shop_coupons
- For Permissions, choose Read/Write.
- Click Generate API Key.
- Copy the Consumer Key and Consumer Secret.
Next: Enable API Access