postal_code_ma_validate $0.001 per call
Offline validator for a Moroccan postal code: normalizes input to 5 digits, checks the format, and maps the first 2 digits to a known province/region using a bundled reference table derived from the data.gov.ma postal code dataset. Returns valid=false with a reason if the format is wrong or the prefix is unrecognized.
For AI agents: call postal_code_ma_validate
POST https://toll402.dev/v1/t/postal_code_ma_validate
{
"postalCode": "10000"
}Answers 402 with x402 payment requirements; pay with any x402 client (@x402/fetch, x402 for Python, toll402-client, toll402-mcp) or send a prepaid-credits key as x-toll402-key (https://toll402.dev/credits). Paid per call via x402 (USDC on Base) or with a prepaid-credits key (x-toll402-key, card at /credits); charged only on success. Start at /llms.txt or connect the MCP server:
npx -y toll402-mcp · remote https://toll402.dev/mcp.Input schema
{
"type": "object",
"properties": {
"postalCode": {
"type": "string",
"description": "Moroccan postal code, e.g. '10000'"
}
},
"required": [
"postalCode"
],
"additionalProperties": false
}
MCP
{"mcpServers":{"toll402":{"command":"npx","args":["-y","toll402-mcp"],"env":{"TOLL402_WALLET_KEY":"0x..."}}}}