Provides for a country, a standard list of zip codes with details such as province, city, and zip code, enabling accurate address identification and validation.
Zip codes are only available for countries corresponding to supported legislations.
ZipCode
Quick Links
Accounts Accounting Entries Products Customers Sales quotes Sales invoices Suppliers Purchase invoicesIf you use this operation by sending X-TenantId in the request header without X-OrganizationId, you must add X-OrganizationId to continue using this operation.
You can take this opportunity to remove X-TenantId as well; it is no longer significant.
For more details, see Index of Important Terms / Tenant.
| HTTP | Operation | Type | Object |
|---|---|---|---|
| Query | zipcodes |
Description
Header
| Key | Value |
|---|---|
Authorization |
Bearer Current access Token How to find? |
X-TenantId |
Current tenant id Why deprecated ? |
X-OrganizationId |
Current organization Id How to find? |
x-api-key |
Primary or secondary subscription key of your app How to find? |
zipcodes
| Fields | Type | Description |
|---|---|---|
| id |
UUID | Id |
| creationDate |
DateTime | Creation Date |
| modificationDate |
DateTime | Modification Date |
| country |
String | Country |
| province |
String | Province |
| town |
String | City |
| zipCode |
String | Zip Code |
Filtering by country
Filtering must be performed using the country field with standardized values, which are consistent across all legislations.
Use the following mapping:
FR: "FRANCE",
DE: "ALEMANIA",
ES: "ESPAÑA",
PT: "PORTUGAL"
FR, ES, DE and PT represent the country codes for which zip codes can be retrieved.
For example:
- If the customer or supplier country is
FR, then filter withcountry = "FRANCE" - If the country is
ES, then filter withcountry = "ESPAÑA" - If the country is
DE, then filter withcountry = "ALEMANIA" - If the country is
PT, then filter withcountry = "PORTUGAL"
Example query:
query ($country: String!) {
zipCodes(
order: [{ country: ASC }, { zipCode: ASC }]
where: { country: { eq: $country } }
) {
edges {
node {
id
country
zipCode
province
town
}
}
}
}
Example variables:
{
"country": "FRANCE"
}
{
"country": "ESPAÑA"
}
{
"country": "ALEMANIA"
}
{
"country": "PORTUGAL"
}