In your coupon_lines
array, each item in the array needs 2 properties: code
(the coupon code itself) and amount
, which is either a flat fee (eg 50.00 off) or a discount (eg 10% off). Your structure ends up looking like:
"coupon_lines": [
{
"code": "MYCODE1",
"amount": "10.00"
},
{
"code": "MYCODE2",
"amount": "25.00"
}
]
If you’re already doing this – consider posting an example request here.
Related Posts:
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- Insert variations via woocommerce api [closed]
- Process checkout using WC REST API
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Extend Woocommerce rest api routes fails
- How to filter Post using Meta Data REST API
- How to stop a Gutenberg Block from firing multiple GET Requests?
- Output JSON object with woocommerce products
- Problem with cURL and rest API
- Woo API REST : product variation price is read-only?
- Category Tree In WooCommerce Product API
- How to upload Woocommerce product images via API? [closed]
- How to handle Woocommerce API credentials
- What will make Woocommerce REST API to issue 401 [closed]
- Woocommerce api: create product with images – bad request
- Woocommerce custom endpoints
- Woocommerce REST API – updating an order changes custom tax calculations
- Woocommerce Rest Api Categories problem [closed]
- API returns blank response after installing & uninstalling WP-rest-api plugin
- woocommerce axios react
- Get specific values in Woocommerce Rest API
- wc_get_products() not return the images details
- WooCommerce – Add product with image via REST API
- Tax are not showing on order while placing order with REST API
- JWT on Woocommerce cannot work with “Customer” role user
- Woocommerce REST API – add filter to set maximum query per page for product brands [closed]
- WooCommerce – Create multiple product tags via rest api endpoint
- Using the WordPress and WooCommerce REST APIs in the same Node app
- Retrieve Data from Custom Endpoint
- How to solve `Error getting remote image` in woocommerce rest api script?
- CallBack URL for payment gateway redirecting to homepage instead of executing callback function
- Getting in an exception for get product detail by id in woocommerce REST api
- Impossible to create a new WooCommerce customer using Rest API
- Woocommerce API security concerns
- How can I send information when a order is completed to my own POS?
- Woocommerce Rest API: woocommerce_product_invalid_image_id
- WC Booking query bookings with date ranges
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- Woocommerce REST API: creating variations
- WooCommerce REST API endpoints don’t exist
- Fetch products with filter by similar categories at same time
- Send data to external websites when there is an update or create a post
- Auto generating API keys using the Application Authentication Endpoint [closed]
- GET woocommerce order request is not showing meta data [closed]
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- Where can I find a single item template
- Get Woocommerce Subscription Product
- WooCommerce pages accessible to logged in members only
- paypal not showing on woocommerce payments
- Target WooCommerce Product Gallery Image (rather than Featured Image) for og:image
- How to update the WooCommerce cart Icon to show new products added with JavaScript
- Remove the link from the thumbnail and product title on woocommerce
- How to configure Woocommerce Payment Methods programmatically?
- woocommerce_package_rates not fired everytime
- how to change woocommerce shop archive description? [closed]
- Products Shortcode is Displaying Single Product Page Price for all Products [closed]
- Subscription on Checkout
- Woocommerce – display product in page but in list format with excerpt
- how to show store name when I add a product on cart in woocommerce(woocommerce multi store)?
- When Free shipping is available hide other shipping methods except Local pickup in WooCommerce [closed]
- Create archive page for woocommerce attribute
- Setting an attribute as variation in woo commerce via php [duplicate]
- WooCommerce – Conditionally enable shipping for virtual products
- Add to Cart button displaying twice on Shop Page Woocommerce
- How to exclude a taxonomy from shop & search page wooCommerce?
- How to remove unwanted text bug in wordpress site
- WooCommerce how to checkout a product without adding it to the cart
- How can i access woocommerce order variables inside shortcode?
- How to add a “buy now” button below “add to cart” button [closed]
- Cart page displays the price and amount as zero regardless of price entered [closed]
- Custom action not working in Woocommerce
- How to alter taxes amounts when updating an order
- WordPress REST API – get custom taxonomy category posts
- Woocommerce variable product’s total amount by javascript
- Save product short description in order (without updating in order details if it is updated in product)
- Remove unwanted fields from WP API response
- WooCommerce REST API not returning the default products category
- woocommerce add button underneath order details
- Where do I remove admin order fields (unset doesn’t work)
- How to Get WooCommerce Product Price
- I want to show always 4 category boxes everytime in woocommerce
- Change the customer’s name to a link on an order management page
- Applying pre-production modifications
- Allow HTML in product attributes for WooCommerce
- Use woocomerce shop filters on other pages
- Woocommerce – change image issue
- Woocommerce: relevancy based related products
- Categories and products in cart Woocommerce
- SyntaxError: unterminated string literal – if WordPress Debug in wp-config is set to true
- How Fragile Is DB if I Upload Completely Updated Files
- Broken 302 redirection for product subcategory (Woocommerce, Apache)
- How to allow registration only from a certain location?
- Add confirmation popup on place order button
- Send form data to functions.php
- Trying query woocommerce product order by menu order and stock status
- editing product page template – getting template for related products not working
- Woocommerce | I want to the button ‘Add to Cart’ on the (all) product-page changed by just ‘open product’ button
- Adding line breaks in WooCommerce order processing emails
- Woocommerce backend sorting product drag drop by menu_order to date