Serial code

A serial code, usually referred to simply as a code (Japanese: シリアルコード serial code) or password (Japanese: あいことば password), is a string of numbers and uppercase letters that players can enter to download a gift, typically a Pokémon or item. They first appeared in Generation V for Pokémon Global Link promotions, but these passwords were entered through the website. Starting from Generation VI, codes are entered from the main menu in core series games, under the Mystery Gift function, after choosing "Receive Gift" and "Get with Code/Password". This requires connecting to the internet.

Types of codes
Serial codes can be split into two types: one-time use codes and common-use codes.

One-time codes
One-time use codes are mostly random strings of numbers and letters that can only be used to receive a gift once. If a gift from a one-time use code is downloaded and the internet connection is interrupted before it properly completes, it is possible that this will count as the code's single use and it will be unusable afterwards. One-time use codes can also be validated by entering the code in a game and declining to download the gift when the game asks whether the player wants to receive the gift that was found; this does not count as the code's use, but it does lock the code to that game for approximately one hour, temporarily preventing other games from using that code.

One-time use codes are generally distributed to individuals directly. This may manifest in a physical form, with stores commonly distributing special cards with unique serial codes to visitors; or it may be accomplished electronically, such as by sending unique codes to different submitted email addresses or through a newsletter (such as the Pokémon Trainer Club newsletter, on a few occasions).

Presumably as a measure to avoid confusion, one-time use codes do not use the number "0" or the letter "O"; the number "1" or the letter "I"; or the letters "B" or "V".

One-time use codes also have certain fixed prefixes for certain events. The first four characters are often the same for all codes for the same event; occasionally, however, this prefix may differ depending on where or how the code was received. Different countries, for example, often have different prefixes for the same event. The first character also usually corresponds to the region it can be used with: "A", "E", "J", or "K" for American region, PAL region, Japanese region, or Korean region games (respectively); or "F" for codes usable with more than one region. The second digit in the prefix generally matches the singles digit of the year when the code was released. The last two digits in code prefixes often exhibit a nearly consecutive upward trend across different events, with the letter "Z" used as a stand-in for the number "0" and "A" used as a stand-in for "1" (since those numbers are not used in one-time use codes).

Common-use codes
Common-use codes are usually constructed as intelligble phrases made from combinations of words related to the event, such as SERENA01 for.

These codes are released publicly and are intended to be used by any player. Thus, they do not have a limit to the number of times they may be used by different players or other such restrictions.

When a code that is less than the maximum length is entered, the game effectively considers the unused spaces at the end to be 0's. This means it is technically not necessary to include any 0's that may appear at the end of a common code (e.g., the code GENESECT20 could be entered as GENESECT2). Similarly, any number of 0's can be appended to the end of a common code and it will remain valid.