@Chansey The code is obtainable until 21st of September 2018 by purchasing Gold or Silver on the Nintendo eShop, according to Serebii

"To believe in an ideal, is to be willing to betray it"
VGC, Friend Safari, Masuda
VGC, Friend Safari, Masuda