If you need to create coupons, adjust loyalty points, or move store credit from another system, you do not have to do it by hand in the WordPress admin. Advanced Coupons extends the WooCommerce REST API so you can do all of it programmatically. This page lists what each part of the API lets you do.
Each API has a minimum plugin version. The API guide linked at the end of this page lists the requirement for every endpoint, so check there before you build against one. Here is what each part of the API lets you do.
Coupon endpoints
Virtual Coupons
- Query list virtual coupons
- Fetch virtual coupon states
- Create, update & delete virtual coupons
- Bulk create & delete virtual coupons
Customer management
- Search customers and retrieve WooCommerce customer data.
Advanced Coupons settings
- Fetch specific settings sections
- Retrieve the list of fields for each section
- Read, Update, and Delete setting options
Coupon category
You can set a coupon’s category through the standard WooCommerce coupons endpoint, rather than through an Advanced Coupons namespace. Advanced Coupons adds a coupon_category field to it.
- Create a coupon with a category:
POST /wp-json/wc/v3/coupons - Change an existing coupon’s category:
PUT /wp-json/wc/v3/coupons/<id>
The field takes either the category slug, such as seasonal, or its numeric term ID. Two things are worth knowing before you use it:
- It replaces, it does not add. Sending
coupon_categorysets the coupon to that one category and drops any category it already had. - An unknown category is ignored silently. If the slug or ID does not match an existing category, the coupon is still created or updated, just without the category, and the response reports no error. Create the category first.
This field is part of the free plugin, so it does not need a premium licence. For managing categories in the admin instead, see How to create and use coupon categories.
Loyalty Program endpoints
Dashboard
- Get overall customer points data and identify top customers.
Customers
- Retrieve specific customer data and adjust points.
Settings
- Fetch the settings section
- Fetch the settings section list of fields
- Read, update & delete option settings
Points
- Fetch user points & balance
- Fetch user-redeemed coupons
- Fetch user points history
- Redeem points for store credit
Rewards
- Browse the active product & coupon rewards a customer can claim with points
- Claim a reward using points, generating a single-use coupon
- Fetch a customer’s claimed reward history
Store Credit endpoints
Create store credit entries
- List store credit entries
- Delete, update and fetch entries
- Create store credit
Get customer data
- Manage specific customer statistics
- Query the list customers’ store credits
- Get dashboard statistics
For more detailed documentation and technical information, visit the official API guide: REST API – Advanced Coupons API.
Need help?
If you have a question or run into any issues, we’re here to help.
- Premium users: Open a support ticket
- Free users: Visit our community forum
