Shopify recently released Automatic Discounts which currently are only accessible through the shop admin, which you can learn more about here - https://help.shopify.com/en/manual/promoting-marketing/discount-codes/automatic-discounts
There's no timeline on when there will be a public API endpoint to access these automatic discounts, but I would keep an eye on the API changelog for any future announcements - https://developers.shopify.com/api-changelog
The current implementation of Automatic Discount codes in the Admin only has a 'Buy X, Get Y' option.
Further features, including customer eligibility, will be announced through the API changelog if and when they are implemented. Unfortunately, I don't have the exact details about these future releases or their associated timelines but encourage you to keep an eye on the changelog for any and all announcements.