Look up city and state by postal code
curl --request GET \
--url https://api.qbank.cl/platform/v1/aml/catalogs/postal-code \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/aml/catalogs/postal-code"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/aml/catalogs/postal-code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/aml/catalogs/postal-code",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/aml/catalogs/postal-code"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/aml/catalogs/postal-code")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/aml/catalogs/postal-code")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"country": "US",
"postal_code": "33130",
"city": "Miami",
"state": "FL"
}{
"error": "invalid_payload",
"message": "code must be a 5-digit US ZIP"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}{
"error": "postal_code_not_found",
"message": "no place found for the given postal code"
}Look up city and state by postal code
Resolves a postal code to its city and state from an embedded public dataset — today only US ZIP codes are covered. Use it to autofill the city/state fields while the user types the ZIP in address forms: a 404 means “unknown ZIP” (or a country without a dataset) and the fields should simply stay manual. Static data served with Cache-Control: public, max-age=86400; safe to cache for a day.
GET
/
v1
/
aml
/
catalogs
/
postal-code
Look up city and state by postal code
curl --request GET \
--url https://api.qbank.cl/platform/v1/aml/catalogs/postal-code \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/aml/catalogs/postal-code"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/aml/catalogs/postal-code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/aml/catalogs/postal-code",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/aml/catalogs/postal-code"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/aml/catalogs/postal-code")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/aml/catalogs/postal-code")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"country": "US",
"postal_code": "33130",
"city": "Miami",
"state": "FL"
}{
"error": "invalid_payload",
"message": "code must be a 5-digit US ZIP"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}{
"error": "postal_code_not_found",
"message": "no place found for the given postal code"
}Authorizations
Session JWT (from register/login) or API key (pk_...).
X-API-Key: <token> is accepted as an alternative header.
Query Parameters
ISO 3166-1 alpha-2 country code. Only US has a dataset today.
Pattern:
^[A-Z]{2}$Postal code to resolve (5-digit US ZIP).
Pattern:
^[0-9]{5}$