openapi: 3.0.3
info:
title: 'Egon API'
description: 'This is the Egon 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.egon.com'
paths:
/v3/suggest/address:
get:
summary: 'Address (full)'
description: "
Suggestion for full address
\n" parameters: - in: query name: query description: 'Query string.' example: 'Via Roveggia 5c' required: true schema: type: string description: 'Query string.' example: 'Via Roveggia 5c' - in: query name: restrict_id description: 'ID of the territorial level.restrict_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.egon.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.egon.com/docs for details.'
400:
description: '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 V4'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
query:
type: string
description: ''
example: quidem
restrict_id:
type: string
description: 'This field is required when restrict_level
is present.'
example: et
restrict_level:
type: string
description: 'This field is required when restrict_id
is present.'
example: minima
required:
- query
/v3/suggest/country:
get:
summary: Country
description: "Suggestion for country
\n" parameters: - in: query name: query description: 'Query string.' example: Italia required: true schema: type: string description: 'Query string.' example: Italia - 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: country id: 38000000001 country: Italia 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.egon.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.egon.com/docs for details.' tags: - 'Suggest V4' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: '' example: animi required: - query /v3/suggest/state: get: summary: State description: 'Suggestion 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.egon.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.egon.com/docs for details.' tags: - 'Suggest V4' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: '' example: provident iso3: type: string description: '' example: enim required: - query - iso3 /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.egon.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.egon.com/docs for details.' tags: - 'Suggest V4' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: '' example: ipsum iso3: type: string description: '' example: in required: - query - iso3 /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
\n" parameters: - in: query name: query description: 'Query string.' example: Vercelli required: true schema: type: string description: 'Query string.' example: Vercelli - 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 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
\n" parameters: - in: query name: query description: 'Query string.' example: 'Via Roma' required: true schema: type: string description: 'Query string.' example: 'Via Roma' - 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 city level.Suggestion 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 API will be deprecated starting 1 June 2024. Check the new Validation V4!
' parameters: - in: query name: country_code description: 'Country code (ISO 3166-1 alpha-3 or ISO 3166-1 alpha-2).' example: ITA required: true schema: type: string description: 'Country code (ISO 3166-1 alpha-3 or ISO 3166-1 alpha-2).' example: ITA - in: query name: country description: 'Country. Mandatory ifcountry_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: locality
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: 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.egon.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.egon.com/docs for details.'
tags:
- 'Validation V3 - OLD'
/v4/validation/address:
post:
summary: 'Validation API V4 Address'
description: ''
parameters:
-
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: object
example:
data:
address:
standard:
iso3: ITA
country: Italia
region: Veneto
province: Verona
province_code: VR
city: Verona
zipcode: '37135'
street_type: Via
street_name: 'Antonio Pacinotti'
street: 'Via Antonio Pacinotti'
address: 'Via Antonio Pacinotti,4/B'
full_address: 'Via Antonio Pacinotti,4/B, Verona, VR, Veneto, 37135, Italia'
hn: 4/B
postal_town1: VERONA
adm_code:
-
adm_cod_iso3: ITA
adm_cod_type: '50137'
adm_cod_value: VR
-
adm_cod_iso3: ITA
adm_cod_type: '30000'
adm_cod_value: L781
-
adm_cod_iso3: ITA
adm_cod_type: '30021'
adm_cod_value: '023091'
-
adm_cod_iso3: ITA
adm_cod_type: '30022'
adm_cod_value: '005'
-
adm_cod_iso3: ITA
adm_cod_type: '30030'
adm_cod_value: '11700'
-
adm_cod_iso3: ITA
adm_cod_type: '30050'
adm_cod_value: '0777000'
-
adm_cod_iso3: ITA
adm_cod_type: '30060'
adm_cod_value: '086'
-
adm_cod_iso3: ITA
adm_cod_type: '30061'
adm_cod_value: '660999'
-
adm_cod_iso3: ITA
adm_cod_type: '30070'
adm_cod_value: ITA
-
adm_cod_iso3: ITA
adm_cod_type: '30071'
adm_cod_value: IT
-
adm_cod_iso3: ITA
adm_cod_type: '30072'
adm_cod_value: '380'
-
adm_cod_iso3: ITA
adm_cod_type: '30114'
adm_cod_value: ITALIA
egon_code:
city: 38000004730
street: 38000073526
hn: 380100008326045
smart:
country: Italia
administrative_level: Verona
city: Verona
address: 'Via Antonio Pacinotti,4/B'
zipcode: '37135'
quality:
address:
locality:
flag: '0'
code: 0
street:
flag: '0'
code: 0
hn:
flag: '0'
code: 0
system:
ret_code: 0
des_ret_code: Ok
properties:
data:
type: object
example:
address:
standard:
iso3: ITA
country: Italia
region: Veneto
province: Verona
province_code: VR
city: Verona
zipcode: '37135'
street_type: Via
street_name: 'Antonio Pacinotti'
street: 'Via Antonio Pacinotti'
address: 'Via Antonio Pacinotti,4/B'
full_address: 'Via Antonio Pacinotti,4/B, Verona, VR, Veneto, 37135, Italia'
hn: 4/B
postal_town1: VERONA
adm_code:
-
adm_cod_iso3: ITA
adm_cod_type: '50137'
adm_cod_value: VR
-
adm_cod_iso3: ITA
adm_cod_type: '30000'
adm_cod_value: L781
-
adm_cod_iso3: ITA
adm_cod_type: '30021'
adm_cod_value: '023091'
-
adm_cod_iso3: ITA
adm_cod_type: '30022'
adm_cod_value: '005'
-
adm_cod_iso3: ITA
adm_cod_type: '30030'
adm_cod_value: '11700'
-
adm_cod_iso3: ITA
adm_cod_type: '30050'
adm_cod_value: '0777000'
-
adm_cod_iso3: ITA
adm_cod_type: '30060'
adm_cod_value: '086'
-
adm_cod_iso3: ITA
adm_cod_type: '30061'
adm_cod_value: '660999'
-
adm_cod_iso3: ITA
adm_cod_type: '30070'
adm_cod_value: ITA
-
adm_cod_iso3: ITA
adm_cod_type: '30071'
adm_cod_value: IT
-
adm_cod_iso3: ITA
adm_cod_type: '30072'
adm_cod_value: '380'
-
adm_cod_iso3: ITA
adm_cod_type: '30114'
adm_cod_value: ITALIA
egon_code:
city: 38000004730
street: 38000073526
hn: 380100008326045
smart:
country: Italia
administrative_level: Verona
city: Verona
address: 'Via Antonio Pacinotti,4/B'
zipcode: '37135'
quality:
type: object
example:
address:
locality:
flag: '0'
code: 0
street:
flag: '0'
code: 0
hn:
flag: '0'
code: 0
system:
type: object
example:
ret_code: 0
des_ret_code: Ok
tags:
- 'Validation V4'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
par:
type: object
description: ''
example: []
properties:
iso3:
type: string
description: 'Country code (ISO 3166-1 alpha-3).'
example: ITA
fmtout:
type: string
description: 'Output format: Email normalization. Maximum of 5 emails in input.
' parameters: - 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: object example: data: emails: - email: mario.rossi@gmail.com quality: emails: - email1: flag: '1' code: 991 system: ret_code: 0 des_ret_code: Ok properties: data: type: object example: emails: - email: mario.rossi@gmail.com quality: type: object example: emails: - email1: flag: '1' code: 991 system: type: object example: ret_code: 0 des_ret_code: Ok tags: - 'Validation V4' requestBody: required: true content: application/json: schema: type: object properties: par: type: object description: '' example: [] properties: iso3: type: string description: 'Country code (ISO 3166-1 alpha-3).' example: ITA data: type: object description: '' example: [] properties: emails: type: array description: '' example: - email: mario.rossi@gmail.com items: type: object properties: email: type: required description: 'string Email to be normalized.' example: null required: - par - data tags: - name: 'Suggest V4' description: '' - name: 'Validation V3 - OLD' description: '' - name: 'Validation V4' description: '' components: securitySchemes: default: type: http scheme: bearer description: '' security: - default: []