How to check if discount codes can be combined?

Context

I’m developing a Shopify POS UI Extension that applies discount codes to the cart using the CartApi. My main challenge is determining whether a discount code can be combined with existing discounts before attempting to apply it.

What I’m trying to achieve

In my POS extension, I need to:

  1. Check if a discount code can be combined with existing discounts in the cart
  2. Apply the discount code only if combination is allowed
  3. Handle the appropriate UI feedback based on compatibility

My specific question

Is there an API to check discount code compatibility with existing cart discounts BEFORE attempting to apply it?