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]
- How to add fee_lines using woocommerce rest API v3?
- Update a server-side render Block when woocommerce cart block changed
- Is there a way to get protected meta fields through any of the available built-in WordPress APIs? (xmlrpc, wp-json)
- How to hook on a WooCommerce checkout field?
- Woocommerce – How to add 5 stars to all products to test design
- How to get woocomerce attributes thumbnail in PHP? [closed]
- Programmatically added variations not showing until clicking Update button
- How to automatically add and show all the product attributes when creating a new product
- Import products to WooCommerce by CSV page won’t open [closed]
- How can i change the design of product sizes [closed]
- WooCommerce subscription, give option to prorate or not to prorate to user while switching subscription
- Get product variation attribute titles – WooCommerce
- user password reset e-mail
- Extending the woocommerce product export functionality
- Javascript error when adding an item to the cart [closed]
- Woocommerce: Complex query in pre_get_posts [closed]
- Switch to user link
- Customize WooCommerce Add To Cart Form Name [closed]
- Remove WooCommerce block styles
- Can’t find a product by SKU
- Weird strange letters appeared in all website links [duplicate]
- password_reset doesnt work
- WooCommerce Cart Items
- Display vendor phone number on single product page
- 3 Different Prices for Woocommerce Product
- Online wc-blocks-style.css rendering instead of the hosted wc-blocks-style.css
- I have 3 types of prices in WP and I need to change price for each specific user role using hooks
- How do I display only the relevant attributes?
- How to add php variable inside wc_enqueue_js(‘jQuery’) function?
- Show menu order field in quick edit
- How to remove the Sub category product URL Woocommerce
- WC_Structured_Data Class Causing Needless Translation
- Placing Lock Icon on WooCommmerce “Place Order” Checkout Button (WordPress ‘ignoring’ Changes…)
- How to Sync Woocommerce and CRM via External API
- How can I filter products by meta in Woocommerce REST API?
- Add sale count next to star rating in woocommerce single product page
- How do i display zip code options during checkout [closed]
- Woocommerce – wc_cart_totals_shipping_method_label() breaking out option tag
- Woocommerce Add prices
- How to limit Woocommerce search to titles only?
- How to invoice Woocommerce customer the remainder balance amount for additional items to an already paid order
- WooCommerce – Show different terms and conditions for different user roles
- Woocommerce REST API for my account & checkout process
- WordPress user ID prefix
- deactivate product-page image slider on mobile
- Woocommerce woocommerce_breadcrumb_defaults filter [closed]
- Some Admin disappeared
- Sort by promo code used woocommerce admin panel [closed]
- Search box missing Woocommerce Product Bundle Extension
- DatePicker in Woocommerce (My Account) Registration [closed]
- problems with an object product wooCommerce [closed]
- Sort by price when price is set in multiple keys
- Add a custom code with custom link after add to cart for every product
- WooCommerce product permalink based on product’s current category
- Add a product for all users based on a condition (WooCommerce)
- he slug “sub category” is already in use by another term