# S10 (UPU standard)

The UPU S10 standard defines a system for assigning 13-character identifiers to international postal items for the purpose of tracking and tracing them during shipping. The standard was introduced on 18 April 1996,$^{:4}$ and is currently in its 12th version.$^{:3}$
With increased liberalization and the possibility of multiple postal services operating in the same country, the use of country codes to designate the postal service is a problem. To solve this, each country has a designated postal service that controls all S10 identifiers from that country; any competing postal services will have to cooperate with the designated owner. The organization assigned by the UPU member country shall manage the issue and use of S10 identifiers, among all the operators under the authority of that UPU member country, in such a way as to ensure that no S10 identifier is reused within a period of 12 calendar months. A period of 24 calendar months, or longer, is recommended.

## Format

The identifiers consist of a two-letter service indicator code, an eight-digit serial number (in the range 00000000 to 99999999), a single check-digit, and a two-letter ISO country code identifying the issuing postal administration's country.
S10 format :
| 1 | 2 | 3 | 4 |
| AA | 00000000 | 9 | BB |
| Service indicator code (see below) Serial number Check-digit (see below) ISO 3166-1 alpha-2 country code ||||

### Service indicator codes

Service codes are generally assigned and administered within each issuing country, but certain types of service and code ranges are used for all countries as listed here.
| Code | Interpretation |
| AA–AU | Unassigned |
| AV–AZ | Domestic, bilateral, multilateral use only |
| BA–BZ | Domestic, bilateral, multilateral use only |
| CA–CZ | Parcel post The use of CV is recommended (though not required) for insured parcels The use of CZ requires bilateral agreement |
| DA–DZ | Domestic, bilateral, multilateral use only |
| EA–EZ | EMS The use of EX–EZ requires bilateral agreement |
| FA–FZ | Unassigned |
| GA | Domestic, bilateral, multilateral use only |
| GB–GC | Unassigned |
| GD | Domestic, bilateral, multilateral use only |
| GE–GZ | Unassigned |
| HA–HZ | E-commerce parcels The use of HX–HY requires multilateral agreement The use of HZ requires bilateral agreement |
| IA–IZ | Unassigned |
| JA–JZ | Reserved |
| KA–KZ | Reserved |
| LA–LZ | Letter post tracked The use of LZ requires bilateral agreement |
| MA–MZ | Letter post M bags |
| NA–NZ | Domestic, bilateral, multilateral use only |
| OA–OZ | Unassigned |
| PA–PZ | Domestic, bilateral, multilateral use only |
| QA–QM | International Business Reply Service |
| QN–QZ | Unassigned |
| RA–RZ | Letter post registered The use of RZ requires bilateral agreement. |
| SA–SZ | Reserved |
| TA–TZ | Reserved |
| UA–UZ | Letter post items (when L, M, Q, R and V codes don't apply) The use of UZ requires bilateral agreement |
| VA–VZ | Letter post insured The use of VZ requires bilateral agreement |
| WA–WZ | Reserved |
| XA–XZ | Unassigned |
| YA–YZ | Unassigned |
| ZA–ZZ | Domestic, bilateral, multilateral use only |

### Check-digit calculation

* Ignore the service indicator code and country code.
* Assign the weights 8, 6, 4, 2, 3, 5, 9, 7 to the 8 digits, from left to right.
* Calculate S, the sum of each digit multiplied by its weight.
** For example, for the number 47312482: S = 4×8 + 7×6 + 3×4 + 1×2 + 2×3 + 4×5 + 8×9 + 2×7 = 200.
* Calculate the check digit C = 11 − (S mod 11).
** If C = 10, change to C = 0.
** If C = 11, change to C = 5.
** For the example 47312482, C = 11 − (200 mod 11) = 11 − 2 = 9.

#### Python code for check-digit calculation

For Python 3.6 or later: