Account
get_postal_codes
List postal codes ยท Read-only, idempotent
List the postal codes live_search accepts in postal_code: for each marketplace, every supported postal code with its city, region (full state, province, prefecture, territory, county or UK nation name; Singapore in Singapore) and whether it is the marketplace default.
- In SA, AE and EG the
postal_codeis a city name. - The default is first, then the rest by region and city.
delivery_scopeis "country" with nopostal_codesfor NL, BE and ZA, which deliver to the whole country and take nopostal_code, andpostal_codeelsewhere.- Call it before passing
live_searcha non-defaultpostal_code, and match the user's place (for example a shopper in Texas) by city and region; pass the chosenpostal_codeexactly as listed. - The list can change, so do not rely on values remembered from earlier conversations.
- Omit marketplace for every marketplace.
Cost and limits: Costs no credits; shared 60-per-minute limit.
Input
| Name | Type | Required | Description |
|---|---|---|---|
marketplace | string | Optional | Only this marketplace, any letter case: US, CA, MX, UK, DE, FR, IT, ES, AU, JP, BR, IN, SG, TR, NL, PL, SE, BE, SA, AE, EG, IE, ZA. Omit for every marketplace. Maximum length 2. |
Output
Read this object from the result's structuredContent. The result's content carries a text version for the model, which is not always the same JSON.
One entry per marketplace.
data is an array. Fields of each data[] item:
| Name | Type | Required | Description |
|---|---|---|---|
marketplace | string | Required | One of US, CA, MX, UK, DE, FR, IT, ES, AU, JP, BR, IN, SG, TR, NL, PL, SE, BE, SA, AE, EG, IE, ZA. |
delivery_scope | "postal_code" | "country" | Required | country when Amazon delivers to the whole country, so live search takes no postal_code and postal_codes is empty (NL, BE and ZA); otherwise postal_code. |
postal_codes | PostalCode[] | Required | The marketplace's postal codes: the default first, then by region and city. Empty when delivery_scope is country. |
data[].postal_codes[]
| Name | Type | Required | Description |
|---|---|---|---|
postal_code | string | Required | Postal code to pass to live search as postal_code, exactly as listed. In SA, AE and EG it is a city name. Minimum length 1. |
city | string | Required | City the postal code is in. Minimum length 1. |
region | string | Required | Full name of the state, province, prefecture, territory, county or UK nation the postal code is in. In Singapore, which has none, it is Singapore and city names the district. Minimum length 1. |
is_default | boolean | Required | Whether live search uses this postal code when postal_code is omitted. Exactly one postal code per marketplace is the default. |
Full input and output JSON Schema
Code