shopify discount automatic api for specfic products

How can we create automatic discounts for specific products using the API? In Shopify, I found an option for automatic discounts applied to all items, but I’m looking to apply it to specific products.

I found just for all item link: Shopify API Documentation on Automatic Discount Creation.

Hello @Anil918
Hope you are doing well
You are using correct API. Please checkout this screenshot.

You have to pass the data like this.

items: {  
         products: {
          productsToAdd: [product_ids]
         }
       }

its return bad request