postal_code
LocationGenerate postal/ZIP codes in the correct format for any country. German 5-digit codes, US ZIP+4, UK alphanumeric postcodes — all properly formatted.
Example Outputs
1011590210SW1A 1AA100-0001M5V 3L9API Usage
Send a POST request to generate postal code data:
curl -X POST https://mockhero.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "example",
"count": 5,
"fields": [
{
"name": "postal_code",
"type": "postal_code"
}
]
}
]
}'Common Use Cases
- Address validation testing
- Shipping rate calculation
- Form field validation
- Geolocation testing
Quick Info
- Field Type
- postal_code
- Category
- Location
- Parameters
- None required
- Output Format
- JSON, CSV, SQL
Related Types
Generate Postal Code + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.