Directories API
Look up a postal code
Resolve a US ZIP code into a city and state.
GET
https://app.mindbill.org/partner/v2/postal-codesFill city and state after a user enters a ZIP code. lookupPostalCode() calls this endpoint.
Use this URL with a server API key or a browser session and its exact allowed Origin. Both credentials use the same request and response contract. See the component API inventory for exact paths and SDK methods.
Query parameters
FieldTypeDescription
postalCodeRequiredstringUS ZIP code. The input is trimmed and the first five characters are used, including for ZIP+4 input.
Examples
curl 'https://app.mindbill.org/partner/v2/postal-codes?postalCode=94105' \
--header "Authorization: Bearer $MINDBILL_API_KEY"curl 'https://app.mindbill.org/partner/v2/postal-codes?postalCode=94105' \
--header "Authorization: Bearer $MINDBILL_BROWSER_TOKEN" \
--header 'Origin: https://your-app.example'Response
200 OK
{
"postalCode": "94105",
"city": "San Francisco",
"state": "CA"
}FieldTypeDescription
postalCodestringNormalized five-digit ZIP code. No data wrapper.
citystringCity name.
statestringTwo-letter state code.