that is, if you want to do scan with interface that .id number is *2 and the item exist.
Better get .id using API to get the permanent static item number.
or, just use this:
/interface/wireless/scan
=.id=wlan1
yes, you can use item name to identify it, just check before you use that, as i have tested a lot of name uses as .id value, but i cannot be 100% sure i have tested them all.