# Postal Code Format & Validation

> Postal Code Format & Validation is a paid API for AI agents from postal.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Normalises a postal/ZIP code's casing and whitespace and reports whether the normalised form is valid for a given country.

## Facts

- Endpoint: POST https://postal.openverbs.com/v1/format
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/postal-code-format-validation-1fe7f6c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DTP67NIdngNiHGZL2i8QY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability postal-code-format-validation-1fe7f6c9 -d '<json body>'
```

Example prompt: Can you normalise and validate the postal code 'sw1a 2aa' for the United Kingdom (country code GB) — fix the casing and spacing and tell me if it's valid?

## When to prefer this

Choose this endpoint when you need both normalisation (fixing casing/whitespace) and validity checking in a single call, rather than calling a standalone validation endpoint separately. Ideal for data cleansing pipelines, checkout forms, and address normalisation workflows where you want the cleaned output alongside the validity result. Prefer this over the sibling validation-only endpoint when you need the canonical formatted code as output.

## Known failure modes

- Invalid or unrecognised ISO 3166-1 alpha-2 country code returns an error
- Missing required 'code' or 'country' fields returns a 400-level validation error
- Country not supported in the pattern database returns an error or unsupported flag
- Malformed request body (wrong content type) returns a parse error
- Network timeout or service unavailability returns a 5xx error

## How this service works

Normalise a postal code's casing and whitespace (uppercase, collapse runs of spaces) and report whether the normalised form is valid for the country.

## Output

Returns the normalised postal code (uppercased, whitespace collapsed) along with a boolean or flag indicating whether the normalised form is valid for the specified country.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "country": {
       "type": "string",
       "minLength": 2,
       "description": "ISO 3166-1 alpha-2 country code."
      },
      "code": {
       "type": "string",
       "description": "Postal / ZIP code to normalise."
      }
     },
     "required": [
      "country",
      "code"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/postal-code-format-validation-1fe7f6c9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from postal.openverbs.com](https://www.zero.xyz/host/postal.openverbs.com/llms.txt)
