If you have a cart price rule with multiple generated coupons, you can fetch them all.
$orders = $this->orderRepository->getList($searchCriteria); magento 2 get coupon code programmatically
try $quote = $this->quoteRepository->get($quoteId); return $quote->getCouponCode(); catch (NoSuchEntityException $e) return null; If you have a cart price rule with
$coupon = $rule->getCoupon($couponCode); try $quote = $this->