How can I block discount codes for specific items?

Ah, ok, I understand what you mean, thank you for the sugestion. It doesnt apply to my problem tho because I am treating the discount code as a wildcard not something I could easily control. Controling the discount code behaviour trough the admin or api is the solution, however it isnt practical when you have many existing sales rules and 3rd party apps generate new ones regularly.