openapi: 3.0.3
info:
title: 'Address4 API'
description: 'This is the Address4 API documentation.
This documentation aims to provide all the information you need to work with our API.'
version: 2.0.0
servers:
-
url: 'https://api.address4.com'
paths:
/v3/suggest/address:
get:
summary: 'Address (full)'
description: "
Suggestion for full address
\nrestrict_level
.'
example: null
required: false
schema:
type: integer
description: 'ID of the territorial level.restrict_level
.'
example: null
-
in: query
name: restrict_level
description: 'Territorial level of restriction.restrict_id
.state
, region
, province
, city
, district1
.'
example: null
required: false
schema:
type: string
description: 'Territorial level of restriction.restrict_id
.state
, region
, province
, city
, district1
.'
example: null
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_APP_KEY}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
iso3: ITA
level: street
id: 38000073665
country: Italia
region: Veneto
province: Verona
province_code: VR
city: Verona
zipcode: '37136'
street: 'Via Roveggia'
number: '5'
exponent: c
label: 'Via Roveggia 5c, 37136 Verona (VR) - Italia'
-
iso3: ITA
level: street
id: 38000860896
country: Italia
region: Puglia
province: Taranto
province_code: TA
city: Manduria
district1: 'Torre Colimena'
zipcode: '74024'
street: 'Via 5C'
number: '5'
exponent: c
label: 'Via 5C 5c, 74024 Manduria (TA) - Italia'
-
iso3: ECU
level: street
id: 21800019148
country: Ecuador
province: Pichincha
city: Cayambe
street: 5C
number: '5'
exponent: c
label: '5C 5c, Cayambe - Ecuador'
-
iso3: ECU
level: street
id: 21800012971
country: Ecuador
province: Azuay
city: Cuenca
street: 5C
number: '5'
exponent: c
label: '5C 5c, Cuenca - Ecuador'
-
iso3: ECU
level: street
id: 21800019281
country: Ecuador
province: Pichincha
city: Quito
street: 5C
number: '5'
exponent: c
label: '5C 5c, Quito - Ecuador'
-
iso3: MEX
level: street
id: 48404240605
country: México
state: Yucatán
state_code: YUC
city: Kanasín
zipcode: '97370'
street: 'Calle 5C'
number: '5'
exponent: c
label: 'Calle 5C 5c, 97370 Kanasín - México'
-
iso3: MEX
level: street
id: 48404245442
country: México
state: Yucatán
state_code: YUC
city: Mérida
zipcode: '97130'
street: 'Calle 5C'
number: '5'
exponent: c
label: 'Calle 5C 5c, 97130 Mérida - México'
-
iso3: MEX
level: street
id: 48404245443
country: México
state: Yucatán
state_code: YUC
city: Mérida
zipcode: '97133'
street: 'Calle 5C'
number: '5'
exponent: c
label: 'Calle 5C 5c, 97133 Mérida - México'
-
iso3: MEX
level: street
id: 48404245444
country: México
state: Yucatán
state_code: YUC
city: Mérida
zipcode: '97204'
street: 'Calle 5C'
number: '5'
exponent: c
label: 'Calle 5C 5c, 97204 Mérida - México'
-
iso3: MEX
level: street
id: 48404245445
country: México
state: Yucatán
state_code: YUC
city: Mérida
zipcode: '97217'
street: 'Calle 5C'
number: '5'
exponent: c
label: 'Calle 5C 5c, 97217 Mérida - México'
401:
description: Unauthorized
content:
application/json:
schema:
type: object
example:
error:
code: 401
message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.'
properties:
error:
type: object
example:
code: 401
message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.'
4:
description: '4xx, Bad Request'
content:
application/json:
schema:
type: object
example:
error:
code: 400
message: 'Missing the ''query''.'
properties:
error:
type: object
example:
code: 400
message: 'Missing the ''query''.'
tags:
- 'Suggest V3'
/v3/suggest/country:
get:
summary: Country
description: "Suggestion for country
\nSuggestion for state
' parameters: - in: query name: query description: 'Query string.' example: California required: true schema: type: string description: 'Query string.' example: California - in: query name: iso3 description: 'Country code (ISO 3166-1 alpha-3).' example: USA required: true schema: type: string description: 'Country code (ISO 3166-1 alpha-3).' example: USA - in: header name: Authorization description: '' example: 'Bearer {YOUR_APP_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - iso3: USA level: state id: 84000000010 country: 'United States' state: California state_code: CA 401: description: Unauthorized content: application/json: schema: type: object example: error: code: 401 message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.' properties: error: type: object example: code: 401 message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.' tags: - 'Suggest V3' /v3/suggest/region: get: summary: Region description: 'Suggestion for region
' parameters: - in: query name: query description: 'Query string.' example: Veneto required: true schema: type: string description: 'Query string.' example: Veneto - in: query name: iso3 description: 'Country code (ISO 3166-1 alpha-3).' example: ITA required: true schema: type: string description: 'Country code (ISO 3166-1 alpha-3).' example: ITA - in: header name: Authorization description: '' example: 'Bearer {YOUR_APP_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - iso3: ITA level: region id: 38000000006 country: Italia region: Veneto 401: description: Unauthorized content: application/json: schema: type: object example: error: code: 401 message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.' properties: error: type: object example: code: 401 message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.' tags: - 'Suggest V3' /v3/suggest/province: get: summary: Province description: 'Suggestion for province
' parameters: - in: query name: query description: 'Query string.' example: Verbano required: true schema: type: string description: 'Query string.' example: Verbano - in: query name: iso3 description: 'Country code (ISO 3166-1 alpha-3).' example: ITA required: true schema: type: string description: 'Country code (ISO 3166-1 alpha-3).' example: ITA - in: query name: restrict_id description: 'ID of the territorial level.Suggestion for city
\nSuggestion for district level 1
' parameters: - in: query name: query description: 'Query string.' example: Milano required: true schema: type: string description: 'Query string.' example: Milano - in: query name: iso3 description: 'Country code (ISO 3166-1 alpha-3).' example: ITA required: true schema: type: string description: 'Country code (ISO 3166-1 alpha-3).' example: ITA - in: query name: restrict_id description: 'ID of the territorial level.Suggestion for street
\nSuggestion for zipcode
' parameters: - in: query name: query description: 'Query string.' example: '42023' required: true schema: type: string description: 'Query string.' example: '42023' - in: query name: iso3 description: 'Country code (ISO 3166-1 alpha-3).' example: ITA required: true schema: type: string description: 'Country code (ISO 3166-1 alpha-3).' example: ITA - in: query name: zip_level description: 'Extraction level. It can be set to:This section describes how to use the Validation API V3.
\ncountry_code
is not valued.'
example: null
required: false
schema:
type: string
description: 'Country. Mandatory if country_code
is not valued.'
example: null
-
in: query
name: adm_level1
description: 'Administrative area level 1 (state or region).'
example: null
required: false
schema:
type: string
description: 'Administrative area level 1 (state or region).'
example: null
-
in: query
name: adm_level2
description: 'Administrative area level 2 (province or department or county).'
example: null
required: false
schema:
type: string
description: 'Administrative area level 2 (province or department or county).'
example: null
-
in: query
name: city
description: City.
example: verona
required: false
schema:
type: string
description: City.
example: verona
-
in: query
name: sub_locality1
description: 'Locality or City district or Village.'
example: null
required: false
schema:
type: string
description: 'Locality or City district or Village.'
example: null
-
in: query
name: sub_locality2
description: 'Locality or City district or Village.'
example: null
required: false
schema:
type: string
description: 'Locality or City district or Village.'
example: null
-
in: query
name: addr1
description: 'Address. As an alternative to street_name
+ house_nr
+ house_nr_ext
.'
example: 'via antonio pacinotti 204'
required: false
schema:
type: string
description: 'Address. As an alternative to street_name
+ house_nr
+ house_nr_ext
.'
example: 'via antonio pacinotti 204'
-
in: query
name: addr2
description: 'Secondary address.'
example: null
required: false
schema:
type: string
description: 'Secondary address.'
example: null
-
in: query
name: street_name
description: 'Street name.'
example: null
required: false
schema:
type: string
description: 'Street name.'
example: null
-
in: query
name: house_nr
description: 'House number (including exponents). In addition to street_name
as an alternative to addr1
.'
example: null
required: false
schema:
type: string
description: 'House number (including exponents). In addition to street_name
as an alternative to addr1
.'
example: null
-
in: query
name: house_nr_ext
description: 'House number extension (additional infos). In addition to street_name
and house_nr
as an alternative to addr1
.'
example: null
required: false
schema:
type: string
description: 'House number extension (additional infos). In addition to street_name
and house_nr
as an alternative to addr1
.'
example: null
-
in: query
name: zipcode
description: 'Postal code.'
example: null
required: false
schema:
type: string
description: 'Postal code.'
example: null
-
in: query
name: lng_output
description: 'Output Language. By default the input language is preserved, but it can be set to: addr1
or street_name
+ house_nr
+ house_nr_ext
.'
example: null
required: false
schema:
type: string
description: 'Complete address on single line. As an alternative to addr1
or street_name
+ house_nr
+ house_nr_ext
.'
example: null
-
in: query
name: po_box
description: 'PO Box.'
example: null
required: false
schema:
type: string
description: 'PO Box.'
example: null
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_APP_KEY}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
result:
result_fl: '1'
output_singleLine: 'Via Antonio Pacinotti,204, Verona, VR, Veneto, 37135, Italia'
output_smart:
country: Italia
adm_level_main: Verona
city: Verona
addr: 'Via Antonio Pacinotti,204'
zipcode: '37135'
output_complete:
country: Italia
state: ''
region: Veneto
province: Verona
city: Verona
sub_locality_main: ''
sub_locality1: ''
sub_locality2: ''
sub_locality3: ''
postal_town: VERONA
zipcode: '37135'
addr1: 'Via Antonio Pacinotti,204'
addr2: ''
street_name: 'Via Antonio Pacinotti'
house_number: '204'
house_number_ext: ''
building: ''
subbuilding: ''
organization: ''
org_department: ''
near_by: ''
care_of: ''
po_box: ''
out_lng: '380'
egon_codes:
egon_city_code:
lValue: 38000004730
egon_sbl_code:
lValue: 0
egon_str_code:
lValue: 38000073526
egon_key_code:
lValue: 0
adm_codes:
nr9Ele:
lValue: 12
areaCode:
-
code_type: '50137'
code_value: VR
-
code_type: '30000'
code_value: L781
-
code_type: '30021'
code_value: '023091'
-
code_type: '30022'
code_value: '005'
-
code_type: '30030'
code_value: '11700'
-
code_type: '30050'
code_value: '0777000'
-
code_type: '30060'
code_value: '086'
-
code_type: '30061'
code_value: '660999'
-
code_type: '30070'
code_value: ITA
-
code_type: '30071'
code_value: IT
-
code_type: '30072'
code_value: '380'
-
code_type: '30114'
code_value: ITALIA
geocoding:
geo_level: A41-261
long_lat: '45.40785120 , 10.96922180'
-
WP9STC:
lValue: 0
401:
description: Unauthorized
content:
application/json:
schema:
type: object
example:
error:
code: 401
message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.'
properties:
error:
type: object
example:
code: 401
message: 'You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. ''Authorization: Bearer {token}''). See https://account.address4.com/docs for details.'
tags:
- Validation
tags:
-
name: 'Suggest V3'
description: ''
-
name: Validation
description: ''
components:
securitySchemes:
default:
type: http
scheme: bearer
description: ''
security:
-
default: []