1. Home
  2. Knowledge Base
  3. WooCommerce Discount Manager
  4. Developer Documentation

How does WooCommerce Discount Manager work with the REST API?

WooCommerce Discount Manager uses the REST API to handle management of discounts, retrieval of products and users.

Routes can be found under the wdm/v1 namespace.

discounts

Submitting a GET request to this route will return a list of all discounts.

Submitting a DELETE request to this route allows you to delete the given discount. The request accepts one parameter, id - the ID of the discount to delete.

discounts/duplicate

Submitting a POST request to this route will duplicate the given discount.

The route accepts one parameter:

  • discount_id: The ID of the discount to duplicate.

discounts/toggle

Submitting a POST request to this route will toggle the status of the specified discount.

The route accepts the following parameters:

  • discount: The ID of the discount to toggle.
  • enabled: The status of the discount. true for enabled, false for disabled.

discounts/products

Submitting a GET request to this route will return a list of all products in the database.

discounts/users

Submitting a GET request to this route will return a list of users.

The route accepts the following parameters:

  • search: String used to search for specific users by username, display name, email, first and last name.
  • include: Comma separated string of users that must be included in the results.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.