I purchased the switch version. It gives me a 6 digit code I have to enter to play the game. When I enter it in Redeem Code on Battle.net I always get an error. No error code just basically saying Try Again Later.
The purchase for each platform is separate. If you want to claim a switch code you need to do it on the Switch platform.
Bnet codes are for PC products.