We have added support for discounts in the Cart AJAX API's /cart/update.js
endpoint. You can now add or remove discounts from your cart using the discount
parameter.
This is a companion discussion topic for the original entry at https://shopify.dev/changelog/cart-ajax-api-discounts-support-on-cartupdatejs