Authentication: All endpoints require an API key via X-API-Key header or Authorization: Bearer <token>.
Endpoints
GET
/v1/provinces

Get province codes for a single postal code.

countryrequired — Country code (DE, FR, ES, GB, NL, SE, DK)
postalrequired — Postal/ZIP code
Example Request (curl)
curl -sS \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://zip.justfab.tech/v1/provinces?country=FR&postal=75008'
Example Response
{
  "country": "FR",
  "postal": "75008",
  "postal_normalized": "75008",
  "provinceCodes": ["75"]
}
POST
/v1/provinces/bulk

Get province codes for multiple postal codes (max 250).

Example Request (curl)
curl -sS -X POST 'https://zip.justfab.tech/v1/provinces/bulk' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '[
  { "country": "DE", "postal": "10115" },
  { "country": "ES", "postal": "28013" },
  { "country": "GB", "postal": "SW1A 1AA" }
]'
Example Response
[
  {
    "country": "DE",
    "postal": "10115",
    "postal_normalized": "10115",
    "provinceCodes": ["BE"]
  },
  {
    "country": "ES",
    "postal": "28013",
    "postal_normalized": "28013",
    "provinceCodes": ["28"]
  },
  {
    "country": "GB",
    "postal": "SW1A 1AA",
    "postal_normalized": "SW1A1AA",
    "provinceCodes": ["SW"]
  }
]