I know you posted about this a while ago but I eventually found a solution when getting stuck myself so this might help others if not you…
https://.myshopify.com/admin/api/2024-01/products.json?handle=toy-rocking-horse (for all the usual fields)
https://.myshopify.com/admin/api/2024-01/products.json?handle=toy-rocking-horse&fields=id (if you just wanted the id as you originally asked about)
https://.myshopify.com/admin/api/2024-01/products.json?handle=toy-rocking-horse&fields=id,title,handle (if a subset of the fields was useful by also passing in a comma separated list of values)
(if
All working as of today