S10 (UPU standard)

Last updated

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.

Contents

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. [1]

S10 format
1234
AA000000009BB
  1. Service indicator code (see below)
  2. Serial number
  3. Check-digit (see below)
  4. 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.

CodeInterpretation [1]
AV–AZDomestic, bilateral, multilateral use only, identifying RFID-tracked e-commerce items
BA–BZDomestic, bilateral, multilateral use only
CA–CZ Parcel post; the use of CZ requires bilateral agreement.

It is not required to use CV for insured parcels but if the service indicator CV is used,

then it is recommended that it be used only on insured parcels.

DA–DZDomestic, bilateral, multilateral use only
EA–EZ EMS; the use of EX–EZ requires bilateral agreement
GADomestic, bilateral, multilateral use only
GDDomestic, bilateral, multilateral use only
HA–HZE-commerce parcels; the use of HX–HY requires multilateral agreement; the use of HZ requires bilateral agreement
LA–LZLetter post tracked; the use of LZ requires bilateral agreement
MA–MZLetter post M bags
NA–NZDomestic, bilateral, multilateral use only
PA–PZDomestic, bilateral, multilateral use only
QA–QMLetter post IBRS (International Business Reply Service)
RA–RZ Letter post registered; The use of RZ requires bilateral agreement.
UA–UZLetter post items containing goods other than other than LA–LZ (Tracked), MA–MZ (M bags), QA–QM (IBRS), RA–RZ (registered),

and VA–VZ (insured); the use of UZ requires bilateral agreement

VA–VZLetter post insured; the use of VZ requires bilateral agreement
ZA–ZZDomestic, bilateral, multilateral use only

Check-digit calculation

  1. Ignore the service indicator code and country code.
  2. Assign the weights 8, 6, 4, 2, 3, 5, 9, 7 to the 8 digits, from left to right.
  3. 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.
  4. 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:

defget_check_digit(num:int)->int:"""Get S10 check digit."""weights=[8,6,4,2,3,5,9,7]sum=0fori,digitinenumerate(f"{num:08}"):sum+=weights[i]*int(digit)sum=11-(sum%11)ifsum==10:sum=0elifsum==11:sum=5returnsum

JavaScript code for check-digit calculation

functiongetCheckDigit(num){constweights=[8,6,4,2,3,5,9,7];constnumArr=Array.from(String(num),Number);letsum=0;numArr.forEach((n,i)=>sum=sum+(n*weights[i]));sum=11-(sum%11);if(sum==10)sum=0;elseif(sum==11)sum=5;returnsum;}

Haskell code for check-digit calculation

checkDigit::[Int]->IntcheckDigitns|c==11=5|c==10=0|otherwise=cwhereweights=[8,6,4,2,3,5,9,7]s=sum$zipWith(*)weightsnsc=11-(s`mod`11)

See also

Related Research Articles

<span class="mw-page-title-main">ISBN</span> Unique numeric book identifier since 1970

The International Standard Book Number (ISBN) is a numeric commercial book identifier that is intended to be unique. Publishers purchase or receive ISBNs from an affiliate of the International ISBN Agency.

<span class="mw-page-title-main">International Bank Account Number</span> Alphanumeric code that uniquely identifies a bank account in any participating country

The International Bank Account Number (IBAN) is an internationally agreed upon system of identifying bank accounts across national borders to facilitate the communication and processing of cross border transactions with a reduced risk of transcription errors. An IBAN uniquely identifies the account of a customer at a financial institution. It was originally adopted by the European Committee for Banking Standards (ECBS) and since 1997 as the international standard ISO 13616 under the International Organization for Standardization (ISO). The current version is ISO 13616:2020, which indicates the Society for Worldwide Interbank Financial Telecommunication (SWIFT) as the formal registrar. Initially developed to facilitate payments within the European Union, it has been implemented by most European countries and numerous countries in other parts of the world, mainly in the Middle East and the Caribbean. As of July 2023, 86 countries were using the IBAN numbering system.

<span class="mw-page-title-main">Vehicle identification number</span> System for identifying vehicles

A vehicle identification number (VIN) (also called a chassis number or frame number) is a unique code, including a serial number, used by the automotive industry to identify individual motor vehicles, towed vehicles, motorcycles, scooters and mopeds, as defined by the International Organization for Standardization in ISO 3779 (content and structure) and ISO 4030 (location and attachment).

<span class="mw-page-title-main">ISSN</span> Serial number used to identify a periodical publication

An International Standard Serial Number (ISSN) is an eight-digit serial number used to uniquely identify a serial publication (periodical), such as a magazine. The ISSN is especially helpful in distinguishing between serials with the same title. ISSNs are used in ordering, cataloging, interlibrary loans, and other practices in connection with serial literature.

An International Securities Identification Number (ISIN) is a code that uniquely identifies a security globally for the purposes of facilitating clearing, reporting and settlement of trades. Its structure is defined in ISO 6166. The ISIN code is a 12-character alphanumeric code that serves for uniform identification of a security through normalization of the assigned National Number, where one exists, at trading and settlement.

<span class="mw-page-title-main">Code 39</span> Variable length, discrete barcode symbology

Code 39 is a variable length, discrete barcode symbology defined in ISO/IEC 16388:2007.

POSTNET is a barcode symbology used by the United States Postal Service to assist in directing mail. The ZIP Code or ZIP+4 code is encoded in half- and full-height bars. Most often, the delivery point is added, usually being the last two digits of the address or PO box number.

A check digit is a form of redundancy check used for error detection on identification numbers, such as bank account numbers, which are used in an application where they will at least sometimes be input manually. It is analogous to a binary parity bit used to check for errors in computer-generated data. It consists of one or more digits computed by an algorithm from the other digits in the sequence input.

The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, named after its creator, IBM scientist Hans Peter Luhn, is a simple check digit formula used to validate a variety of identification numbers.

In the United States, an ABA routing transit number is a nine-digit code printed on the bottom of checks to identify the financial institution on which it was drawn. The American Bankers Association (ABA) developed the system in 1910 to facilitate the sorting, bundling, and delivering of paper checks to the drawer's bank for debit to the drawer's account.

SEDOL stands for Stock Exchange Daily Official List, a list of security identifiers used in the United Kingdom and Ireland for clearing purposes. The numbers are assigned by the London Stock Exchange, on request by the security issuer. SEDOLs serve as the National Securities Identifying Number for all securities issued in the United Kingdom and are therefore part of the security's ISIN as well. The SEDOL Masterfile (SMF) provides reference data on millions of global multi-asset securities each uniquely identified at the market level using a universal SEDOL code.

A CUSIP is a nine-character numeric or alphanumeric code that uniquely identifies a North American financial security for the purposes of facilitating clearing and settlement of trades. All CUSIP identifiers are fungible, which means that a unique CUSIP identifier for each individual security stays the same, regardless of the exchange where the shares were purchased or venue on which the shares were traded. CUSIP was adopted as an American national standard by the Accredited Standards Committee X9 and is designated ANSI X9.6. CUSIP was re-approved as an ANSI standard in December 2020. The acronym derives from Committee on Uniform Security Identification Procedures.

<span class="mw-page-title-main">International Standard Music Number</span> Identifier for printed music developed by ISO

The International Standard Music Number or ISMN is a thirteen-character alphanumeric identifier for printed music developed by ISO.

In some programming languages, const is a type qualifier, which indicates that the data is read-only. While this can be used to declare constants, const in the C family of languages differs from similar constructs in other languages in that it is part of the type, and thus has complicated behavior when combined with pointers, references, composite data types, and type-checking. In other languages, the data is not in a single memory location, but copied at compile time for each use. Languages which use it include C, C++, D, JavaScript, Julia, and Rust.

<span class="mw-page-title-main">International Article Number</span> Standard barcode system used in global trade

The International Article Number is a standard describing a barcode symbology and numbering system used in global trade to identify a specific retail product type, in a specific packaging configuration, from a specific manufacturer. The standard has been subsumed in the Global Trade Item Number standard from the GS1 organization; the same numbers can be referred to as GTINs and can be encoded in other barcode symbologies defined by GS1. EAN barcodes are used worldwide for lookup at retail point of sale, but can also be used as numbers for other purposes such as wholesale ordering or accounting. These barcodes only represent the digits 0–9, unlike some other barcode symbologies which can represent additional characters.

PESEL is the national identification number used in Poland since 1979. The number is 11 digits long, identifies exactly one person, and cannot be changed once assigned, except in specific situations.

The Luhn mod N algorithm is an extension to the Luhn algorithm that allows it to work with sequences of values in any even-numbered base. This can be useful when a check digit is required to validate an identification string composed of letters, a combination of letters and digits or any arbitrary set of N characters where N is divisible by 2.

A negative base may be used to construct a non-standard positional numeral system. Like other place-value systems, each position holds multiples of the appropriate power of the system's base; but that base is negative—that is to say, the base b is equal to −r for some natural number r.

Tracking numbers are numbers assigned to packages when they are shipped. Tracking numbers are useful for knowing the location of time sensitive deliveries. It is a unique ID number or code assigned to a package or parcel. The tracking number is typically printed on the shipping label as a bar code that can be scanned by anyone with a bar code reader or smartphone.

<span class="mw-page-title-main">Resident Identity Card</span> Identity document of China

The Resident Identity Card is an official identity document for personal identification in the People's Republic of China. According to the second chapter, tenth clause of the Resident Identity Card Law, residents are required to apply for resident identity cards from the local Public Security Bureau, sub-bureaus or local executive police stations.

References

  1. 1 2 "S10 Identification of postal items – 13-character identifier" (PDF). UPU. 2017-10-17. Retrieved 2024-03-05.