How to apply a discount to a cart using the admin API?

I would like to apply a discount to a cart from the cart/update webhook.

How can I do this. I can’t find an api reference.

It’s not possible to apply a discount code to the cart. You can pass a discount code to checkout by including the “discount” query string parameter in the checkout url.

You can also link users to automatically apply a discount code to their session:
https://{shop}.myshopify.com/discount/{discount_code}

Thanks.

Not what I hoped for, but it is what it is.