# Upu s10 validate

`upu-s10-validate` · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate a 13-char UPU S10 postal identifier's weighted mod-11 check digit, split service indicator and country.

**Use when you need to: validate a upu s10 tracking number · check digit for an international postal item · is this tracking number valid s10.**

## Decide before calling

Read the [versioned contract](/v1/tools/upu-s10-validate/versions/1.0.0) and the supported scope below. Reuse `upu-s10-validate@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `upu-s10-validate@1.0.0` for validate a upu s10 tracking number. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- validate a upu s10 tracking number
- check digit for an international postal item
- is this tracking number valid s10
- split a postal tracking number into service indicator and country
- verify an ems or registered mail barcode checksum
- s10 postal identifier check digit calculator

## Not supported

- a live UPU or carrier tracking-status lookup
- decoding the service indicator to a human-readable mail class
- validating a domestic (non-S10) tracking number format

## Behavior

- item_id is taken exactly as given: no trimming, no case folding. Length != 13 returns reason wrong_length; length 13 but not matching ^[A-Z]{2}[0-9]{9}[A-Z]{2}$ returns reason invalid_character; both leave service_indicator/serial/check_digit/country null.
- service_indicator = item_id[0:2], serial = item_id[2:10], check_digit = item_id[10], country = item_id[11:13], populated once length and charset pass.
- country is looked up against the pinned officially-assigned ISO 3166-1 alpha-2 list (data_version iso3166-1-2026-09-28); an unlisted code returns reason unknown_country without computing the check digit.
- Weighted sum over the 8 serial digits: weight = [8, 6, 4, 2, 3, 5, 9, 7]. remainder = sum mod 11; expected check digit is 5 when remainder is 0, 0 when 11-remainder is 10, else 11-remainder.

## Input

- `item_id` (string, required): min length 1; max length 13

## Output

- `valid` (boolean, required)
- `reason` (one of null, "wrong_length", "invalid_character", "unknown_country", "check_digit_mismatch", required)
- `service_indicator` (string or null, required): pattern `^[A-Z]{2}$`
- `serial` (string or null, required): pattern `^[0-9]{8}$`
- `check_digit` (string or null, required): pattern `^[0-9]$`
- `country` (string or null, required): pattern `^[A-Z]{2}$`
- `data_version` (constant "iso3166-1-2026-09-28", required)

## Limits

- max item id bytes: 13

## Example

Request input:

```json
{
  "item_id": "LT284905264NL"
}
```

Response:

```json
{
  "result": {
    "valid": true,
    "reason": null,
    "service_indicator": "LT",
    "serial": "28490526",
    "check_digit": "4",
    "country": "NL",
    "data_version": "iso3166-1-2026-09-28"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "upu-s10-validate",
  "version": "1.0.0",
  "input": {
    "item_id": "LT284905264NL"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/upu-s10-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"item_id":"LT284905264NL"}'
```

The machine-readable contract is at [/v1/tools/upu-s10-validate/versions/1.0.0](/v1/tools/upu-s10-validate/versions/1.0.0).

### CLI

```sh
node cli.mjs run upu-s10-validate 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Isin validate](/tools/isin-validate): Validate a 12-character ISIN's ISO 6166 Luhn check digit and parse its country prefix, NSIN and NSIN scheme.
- [Iso6346 container validate](/tools/iso6346-container-validate): Validate an 11-character ISO 6346 container number's mod-11 check digit and split the owner code, category and serial.
- [Iccid validate](/tools/iccid-validate): Validate a 19/20-digit ICCID's Luhn check digit, require the 89 major industry id, split issuer/account digits.
- [Imei validate](/tools/imei-validate): Validate a 15-digit IMEI's Luhn check digit or accept a 16-digit IMEISV, and split the TAC from the serial.
- [Imo number validate](/tools/imo-number-validate): Validate a 7-digit IMO ship identification number's weighted mod-10 check digit, with or without the 'IMO ' prefix.
- [Mx clabe validate](/tools/mx-clabe-validate): Validate an 18-digit Mexican CLABE's weighted check digit and split it into bank, plaza and account fields.
