openapi: 3.0.1 info: title: International Address Verification API version: '3.3' description: 'This API verifies international addresses' termsOfService: 'https://smartystreets.com/legal/terms-of-service' license: url: 'https://www.smarty.com/legal/terms-of-service' name: Smarty License contact: url: 'https://www.smarty.com/contact/support' email: support@smarty.com name: Smarty Support servers: - url: 'https://international-street.api.smarty.com' externalDocs: description: Extensive documentation for the International Address API url: 'https://www.smarty.com/docs/cloud/international-street-api' paths: /verify: get: summary: Submit Address to Verify tags: [] security: - auth-id: [] auth-token: [] - embedded-key: [] responses: '200': $ref: '#/components/responses/200' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '402': $ref: '#/components/responses/402' '422': $ref: '#/components/responses/422' '429': $ref: '#/components/responses/429' '504': $ref: '#/components/responses/504' operationId: get-verify description: | To send one (and only one) address to our API, simply encode the input field names from the table below along with the corresponding input values as query string parameters in the URL of your request. Here's an example that uses the address1, address2, locality, administrative_area, postal_code, and country fields: ``` curl -v 'https://international-street.api.smarty.com/verify? auth-id=YOUR+AUTH-ID+HERE& auth-token=YOUR+AUTH-TOKEN+HERE& address1=Rua+Padre+Antonio+D%27Angelo+121& address2=Casa+Verde& locality=Sao+Paulo& administrative_area=SP& postal_code=02516-040& country=Brazil' ``` Please note that all query string parameter values must be url-encoded (spaces become + or %20, for example) to ensure that the data is transferred correctly. A common mistake we see is a non-encoded pound sign (#) like in an apartment number (# 409). This character, when properly encoded in a URL, becomes %23. When not encoded this character functions as the fragment identifier, which is ignored by our API servers. parameters: - $ref: '#/components/parameters/Host' - $ref: '#/components/parameters/input_id' - $ref: '#/components/parameters/country' - $ref: '#/components/parameters/geocode' - $ref: '#/components/parameters/language' - $ref: '#/components/parameters/freeform' - $ref: '#/components/parameters/address1' - $ref: '#/components/parameters/address2' - $ref: '#/components/parameters/address3' - $ref: '#/components/parameters/address4' - $ref: '#/components/parameters/organization' - $ref: '#/components/parameters/locality' - $ref: '#/components/parameters/administrative_area' - $ref: '#/components/parameters/postal_code' - $ref: '#/components/parameters/license' - $ref: '#/components/parameters/features' components: schemas: Root: title: Root type: object properties: input_id: type: string description: A unique identifier generated by you for this address for use within your application. The output will be identical to the value you provided in the request input_id. maxLength: 16 organization: type: string description: 'The name of the recipient, firm, or company at this address. The output will be identical to the input.' maxLength: 256 address1-12: type: string maxLength: 256 description: |- If address_precision = DeliveryPoint or Premise, these fields will contain the correctly formatted address for mailing in the relevant country, split into individual address lines. (Note: These fields may contain values that are not referenced in the address components.) If address_precision ≠ DeliveryPoint or Premise, the address fields may contain standardized address information or even the original input data. components: $ref: '#/components/schemas/Components' description: ' Contains the various basic elements of the address.' metadata: $ref: '#/components/schemas/Metadata' description: Contains ancillary data about each address. analysis: $ref: '#/components/schemas/Analysis' description: Contains information about the validation and the precision of the output address. Components: title: Components type: object properties: country_iso_3: type: string description: 'The ISO 3166-1 alpha-3 country code. See https://www.smarty.com/docs/cloud/international-street-api#countries for details.' attention: type: string description: 'The name of the recipient, firm, or company at this address. This is the same value as the organization field.' administrative_area: type: string description: |- The most common administrative division within a country (e.g., province in Canada) administrative_area_iso2: type: string description: 'The administrative area ISO 3166-2 data (if available for the country). The value is the two letter country code, followed by a hyphen, followed by the one to three character code for the administrative area. (e.g., CA-ON)' super_administrative_area: type: string description: |- The largest administrative division within a country (e.g., region in France) sub_administrative_area: type: string description: |- The smallest administrative division within a country (e.g., county in Germany) locality: type: string description: |- Within a country, this is the most common population center. (e.g., city in Chile) dependent_locality: type: string description: |- If there is additional information about the locality, it will be here. (e.g., neighborhood in Turkey) dependent_locality_name: type: string description: |- If the dependent_locality has a name, you'll find it here. (E.g., the dependent_locality "Dong Cheng Qu" is named "Dong Cheng.") double_dependent_locality: type: string description: |- If there is additional information about the dependent_locality, you'll find it here. (e.g., village in the United Kingdom) postal_code: type: string description: |- The complete postal code for the delivery point (e.g., V6G1V9 in Canada) postal_code_short: type: string description: |- Primary postal code information (e.g., 90210 in the United States) postal_code_extra: type: string description: |- Secondary postal code information (e.g., 3425 in the United States) premise: type: string description: Alphanumeric code pertaining to an individual location premise_extra: type: string description: |- Extra information about the premise that is not necessarily authoritative but might still be useful (E.g., in a French address, 25 bis rue Emile Zola, 91190 Gif Sur Yvette, France, the premise number could be followed by the word "bis" which would be considered premise_extra data.) premise_number: type: string description: |- The alphanumeric component of the premise field (E.g., if premise contains "Plot 7/7A" premise_number would contain "7/7A.") premise_type: type: string description: |- The premise type component of the premise field (E.g., if premise contains "Plot 7/7A" premise_type would contain "Plot.") thoroughfare: type: string description: All thoroughfare components combined thoroughfare_predirection: type: string description: |- The directional prefix component of the thoroughfare (E.g., if thoroughfare contains "N Main St" thoroughfare_predirection would contain "N." thoroughfare_postdirection: type: string description: |- The directional suffix component of the thoroughfare (E.g., if thoroughfare contains "Main St N" thoroughfare_postdirection would contain "N.") thoroughfare_name: type: string description: |- The name component of the thoroughfare (E.g., if thoroughfare contains "Main St" thoroughfare_name would contain "Main.") thoroughfare_trailing_type: type: string description: |- The trailing thoroughfare type component of the thoroughfare (E.g., if thoroughfare contains "N Main St" thoroughfare_trailing_type would contain "St.") thoroughfare_type: type: string description: |- The leading thoroughfare type component of the thoroughfare (E.g., if thoroughfare contains "Rue De La Gare" thoroughfare_leading_type would contain "Rue.") dependent_thoroughfare: type: string description: All of the dependent thoroughfare components combined dependent_thoroughfare_predirection: type: string description: |- The directional prefix component of the dependent_thoroughfare (E.g., if dependent_thoroughfare contains "N Main St" dependent_thoroughfare_predirection would contain "N.") dependent_thoroughfare_postdirection: type: string description: |- The directional suffix component of the dependent_thoroughfare (E.g., if dependent_thoroughfare contains "Main St N" dependent_thoroughfare_postdirection would contain "N.") dependent_thoroughfare_name: type: string description: |- The name component of the dependent_thoroughfare (E.g., if dependent_thoroughfare contains "N Main St" dependent_thoroughfare_name would contain "Main.") dependent_thoroughfare_trailing_type: type: string description: |- The trailing dependent_thoroughfare type component of the dependent_thoroughfare (E.g., if dependent_thoroughfare contains "N Main St" dependent_thoroughfare_trailing_type would contain "St.") dependent_thoroughfare_type: type: string description: |- The leading thoroughfare type component of the dependent_thoroughfare field (E.g., if dependent_thoroughfare contains "Rue De La Gare" dependent_thoroughfare_type would contain "Rue.") building: type: string description: 'The descriptive name that identifies an individual location, if one exists' building_leading_type: type: string description: |- The leading building type component of the building (E.g., if building contains "Bloc C" building_leading_type would contain "Bloc.") building_name: type: string description: |- The name component of the building (E.g., if building contains "Westminster House" building_name would contain "Westminster.") building_trailing_type: type: string description: |- The trailing building type component of the building (E.g., if building contains "Westminster House" building_trailing_type would contain "House.") sub_building: type: string description: All sub_building components combined sub_building_type: type: string description: |- The leading sub-building type of the sub_building (E.g., if sub_building contains "Flat 1" sub_building_type would contain "Flat.") sub_building_number: type: string description: |- The alphanumeric component of the sub_building (E.g., if sub_building contains "Flat 1" sub_building_number would contain "1.") sub_building_name: type: string description: |- The descriptive name component of the sub_building (E.g., if sub_building contains "Basement Flat" sub_building_name would contain "Basement.") post_box: type: string description: All post_box Post Office Box components combined post_box_type: type: string description: |- The type component of the post_box (E.g., if post_box contains "PO Box 1234" post_box_type would contain "PO Box.") post_box_number: type: string description: |- The alphanumeric component of the postbox (E.g., if post_box contains "PO Box 1234" post_box_number would contain "1234.") additional_content: type: string description: '(Canada) Content used in postal delivery (E.g., Site 2 Comp 12)' delivery_installation: type: string description: '(Canada) Delivery installation - a composite of delivery_install_type and delivery_installation_qualifier_name (E.g., Rpo Ritson Centre)' delivery_installation_type: type: string description: '(Canada) Delivery installation type (E.g., RPO)' delivery_installation_qualifier_name: type: string description: '(Canada) Delivery name associated with delivery_installation_type (E.g., Ritson Centre)' route: type: string description: '(Canada) Route - a composite of route_type and route_number (E.g., RR 4)' route_type: type: string description: '(Canada) Route type (E.g., RR, GD, etc.)' route_number: type: string description: '(Canada) Route number associated with route_type (E.g., 4)' Metadata: title: Metadata type: object properties: latitude: type: number description: 'The horizontal component used for geographic positioning; ***based on the WGS84 coordinate system*** it is the angle between 0° (the equator) and ±90° (north or south) at the poles measured in decimal degrees. It is the first value in an ordered pair of latitude, longitude. A negative number denotes a location south of the equator; a positive number is north. Combining lat/long values enables you to pinpoint addresses on a map.' longitude: type: number description: 'The vertical component used for geographic positioning; ***based on the WGS84 coordinate system*** it is the angle between 0° (the Prime Meridian) and ±180° (westward or eastward) measured in decimal degrees. It is the second number in an ordered pair of (latitude, longitude). A negative number indicates a location west of Greenwich, England; a positive number east. Combining lat/long values enables you to pinpoint addresses on a map.' geocode_classificiation: type: string description: |- Provides additional information about the returned geocode. single-point - Returned a single matching geocode multiple-point-average - The output address matched several geocodes. To provide a single result, we calculated and returned the average coordinate of those points. interpolated - Returned a geocode that was interpolated from a range of addresses near the returned address. This data will only be returned when the feature is requested. geocode_precision: type: string description: |- Indicates the precision level of the latitude and longitude values. None — Geocode not known (possibly because address is invalid). AdministrativeArea — Geocode is accurate down to the administrative area (i.e., region or province). Locality — Geocode is accurate down to the locality (i.e., city). Thoroughfare — Geocode is accurate down to the thoroughfare (i.e., street). Premise — Geocode is accurate to the actual delivery point (i.e., house, mailbox, or apartment). * Must be enabled by sending the geocode-precision-enhanced feature flag. Only available in CAN and GBR. max_geocode_precision: type: string description: Indicates the best geocode_precision available for the input country. address_format: type: string description: |- A template that shows where we positioned the different address components on line 1, line 2, etc. (The format changes from one country to another.) Due to the ever-changing nature of the underlying data, this field may contain values that are not referenced in the address components. Example: building | premise thoroughfare | postal_code locality Each "pipe" character (|) represents a line break. Following this guide, the numbered address fields would be composed accordingly: Address 1: building Address 2: premise thoroughfare Address 3: postal_code locality For native languages that do not use spaces between words, the corresponding component fields will also not have spaces between them. This field may not be present in the following cases: 1. When we could not understand the input sufficiently to generate a value. 2. For US addresses it willl never be present. occupant_use: type: string description: |- (Canada, Australia, Belgium, Great Britain) Indicates if the property is Residential or Commercial. This data will be returned only when the feature is requested. Possible values: "residential","commercial","residential,commercial" Analysis: title: Analysis type: object properties: verification_status: type: string description: |- Indicates the verification status of the address. (See address_precision for more details) None — Not verified. The output fields will contain the input data. Partial — Verification only at the level indicated by address_precision. For some countries whose maximum precision level is less than DeliveryPoint or Premise, this may be the best verification status you may receive. Otherwise, better input might result in a better match. Ambiguous — Multiple matching addresses found. Each candidate address will have its own precision level. A common "ambiguous" scenario is that the output will contain two versions of the same address — one with an organization name and one without. Verified — The address was verified, at the indicated precision level. address_precision: type: string description: |- Indicates the precision level at which an address match is found. None — None of the address is verified. AdministrativeArea — Address match is verified to the administrative area (i.e., region or province). Locality — Address match is verified to the locality (i.e., city). Thoroughfare — Address match is verified down to the thoroughfare (i.e., street). Premise — Address match is verified to a range of addresses on the specified street (i.e., building, block level or street segment). DeliveryPoint — Address match is verified to the delivery point (i.e., building, sub-building, or mailbox) max_address_precision: type: string description: Indicates the best address_precision available for the input country. changes: $ref: '#/components/schemas/Changes' description: 'Contains a collection of address components paired with values which specify the difference between corresponding input/lookup and output/candidate data. See the explanation of possible Changes here: https://www.smarty.com/docs/cloud/international-street-api#changes' Changes: title: Changes type: object description: |- Each value in this object (and any subordinate objects) will have a type of varchar(64) and will either be blank or contain one of the following values: Verified-NoChange Field has been verified using relevant reference data; no changes were needed. Verified-AliasChange Field has been verified using relevant reference data; an alias change was made during parsing (see Identified-AliasChange). Verified-SmallChange Field has been verified using relevant reference data; a small spelling change was made. Verified-LargeChange Field has been verified using relevant reference data; a large spelling change was made. Added Field has been added using relevant reference data. Identified-NoChange Field has been identified using relevant lexicon data; no changes were needed. E.g., an input value of 'PO Box 1234' may be identifiable as a postbox, but if it is unable to be verified then this value will be returned. Identified-AliasChange Field has been identified using relevant lexicon data; an alias change was made. E.g., an input value of 'Avnue' may be identifiable as an alias to the thoroughfare_type 'Ave'. Identified-ContextChange Field has been identified using relevant context rules. E.g., an input address of '123 sdovnsdv San Bruno CA USA' may identify the word 'sdovnsdv' as a thoroughfare, but only because of the context in which it appears (after an identifiable premise_number, and before an identifiable locality). Unrecognized Field was unrecognized. properties: organization: type: string description: 'If present, the degree of change to the name of the recipient, firm, or company at this address.' components: $ref: '#/components/schemas/Components' securitySchemes: auth-id: type: apiKey name: auth-id in: query auth-token: type: apiKey name: auth-token in: query embedded-key: type: apiKey name: key in: query responses: '200': description: 'OK (success!): A JSON array containing zero or more address matches for the input provided with the request. If none of the submitted addresses validate, the array will be empty ([]).' content: application/json: schema: type: array items: $ref: '#/components/schemas/Root' '400': description: 'Bad Request (Malformed Payload): Inputs from the request could not be interpreted.' '401': description: 'Unauthorized: The credentials were provided incorrectly or did not match any existing, active credentials.' '402': description: 'Payment Required: There is no active subscription for the account associated with the credentials submitted with the request.' '422': description: 'Unprocessable Entity: A GET request lacked required fields.' '429': description: |- Too Many Requests: Too many requests with exactly the same input values were submitted within too short a period. This status code conveys that the input was not processed in order to prevent runaway charges caused by such conditions as a misbehaving (infinite) loop sending the same record over and over to the API. You're welcome. OR Too Many Requests: When using public "embedded key" authentication, we restrict the number of requests coming from a given source over too short of a time. If you use embedded key authentication, you can avoid this error by adding your IP address as an authorized host for the embedded key in question. '504': description: 'Gateway Timeout: Our own upstream data provider did not respond in a timely fashion and the request failed. A serious, yet rare occurrence indeed.' parameters: Host: name: Host in: header required: true schema: type: string description: 'The Host request header field specifies the internet host and port number of the resource being requested. Ex: Host: international-street.api.smarty.com' input_id: name: input_id in: query required: false schema: type: string description: 'A unique identifier generated by you for this address for use within your application; this field will be copied into the output. (e.g., 123456) Max Characters: 36' country: name: country in: query required: true schema: type: string description: 'This must be entered with every address. Country Name or ISO classification (ISO-3, ISO-2 or ISO-N). Address validation will fail if this is missing. (e.g., Brazil, BRA, BR, or 076)' geocode: name: geocode in: query required: false schema: type: string description: 'Set to true to enable geocoding (disabled by default). See the examples section for, well, an example.' language: name: language in: query required: false schema: type: string description: 'When not set, the output language will match the language of the input values. When set to native, the results will always be in the language of the output country whenever possible. When set to latin, the results will always be provided using a Latin character set basic ASCII, accents and other diacritics removed. The following character sets can be transliterated, into either native or Latin characters, for the specified countries: Russian (Kazakhstan, Azerbaijan) Japanese (Japan) Simplified Chinese (China) Thai (Thailand) Arabic (Algeria, Bahrain, Egypt, Iraq, Jordan, Kuwait, Lebanon, Morocco, Oman, Qatar, Saudi Arabia, United Arab Emirates, Yemen)' freeform: name: freeform in: query required: false schema: type: string description: 'The entire address in a single field (without the country). If freeform is specified, all other address input fields (except country) will be ignored. (e.g., Via Santa Maria di Costantinopoli, 72 46030-Tabellano MN) Max Characters: 512' address1: name: address1 in: query required: false schema: type: string description: 'The first address line (e.g., Calle Proc. San Sebastián, 15)' address2: name: address2 in: query required: false schema: type: string description: The second address line (if any) address3: name: address3 in: query required: false schema: type: string description: The third address line (if any) address4: name: address4 in: query required: false schema: type: string description: The fourth address line (if any) organization: name: organization in: query required: false schema: type: string description: 'The name of the recipient, firm, or company at this address (e.g., Robert Smith OR The Clean Oil Company)' locality: name: locality in: query required: false schema: type: string description: 'The city name (e.g., Paris)' administrative_area: name: administrative_area in: query required: false schema: type: string description: 'The state or province name or abbreviation (e.g., Alberta or AB)' postal_code: name: postal_code in: query required: false schema: type: string description: 'The postal code (e.g., 90210-2301)' license: name: license in: query required: false schema: type: string description: 'The license or licenses (comma separated) to use for this lookup. Valid values can be found in the account dashboard under the appropriate subscription. If multiple licenses are specified, they are considered in left to right order. We recommend that each request explicitly specify a license value. For more information see License Selection.' features: name: features in: query required: false schema: type: string description: 'A comma-separated list of features. These may require a special plan that allows the feature to be used. Examples:occupant-use: Return the occupant_use metadata field; geocode-classification: Return the geocode_classification metadata field if geocode=true; geocode-precision-enhanced: Enable the PostalCode return value in geocode_precision'