Address API - Reference
Overview
Ingrid provides HTTP endpoints returning data in JSON format. We provide you with two environments:
- Stage - is our staging and testing environment where you do all the testing and developing against
- https://api-stage.ingrid.com
- Base url for Address API: https://api-stage.ingrid.com/address/v1
- Swagger UI
- Swagger JSON
- Production - is the production environment that you switch to when itβs time to go live
- https://api.ingrid.com
- Base url for Address API: https://api.ingrid.com/address/v1
- Swagger UI
- Swagger JSON
Object Reference
Address
Represents an address suitable for delivery.
| country_code π |
string
required
Refers to a ISO-3166 alpha 2 country code |
| region_code π |
string
Refers to an ISO-3166-2 subdivision code without country_code prefix, e.g., `DC` for Washington DC. Except for countries like MΓ©xico, Hong Kong, etc. Example region for Honk Kong - `Kowloon` |
| subregion_code π |
string
Refers to an ISO-3166-2 subdivision code without country_code prefix, e.g., `DC` for Washington DC. Except for countries like MΓ©xico, Hong Kong, etc. Example region for Honk Kong - `Kowloon` |
| postal_code π |
string
Refers to a postal code or zipcode |
| city π |
string
Refers to a city, postal_town or locality |
| address_lines π |
string[]
List of strings, each a part of the address, e.g., street name, street number, building name, floor |
| street π |
string
Street name of the address |
| street_number π |
string
Street number of the address |
| apartment_number π |
string
Apartment number of the address |
| building_name π |
string
Building name of the address |
| floor_number π |
string
Floor number of the address |
| po_box_id π |
string
PO Box identifier of the address |
| name π |
string
Full name associated with the address, for example company name |
| care_of π |
string
Care of information associated with the address |
| coordinates π |
Geolocation of the given address |
AddressSuggestionAddressComponentId
Enum Values:
- UNKNOWN
- ADDRESS_LINES
- ADDRESS_LINES_2
- CITY
- POSTAL_CODE
- COUNTRY
- REGION
- NAME
- STREET
- STREET_NUMBER
- APARTMENT_NUMBER
- PHONE_NUMBER
- FIRST_NAME
- LAST_NAME
- BUILDING_NAME
Any
| @type π |
string
|
Contact
Contact represents generic contact information.
| id π |
string
required
The identifier of the contact |
| address π |
Address
required
The physical address of the contact |
| email π |
string
The email address of the contact |
| phone_number π |
The phone number of the contact, including region and optional extension |
| name π |
string
Full name associated with the contact |
| first_name π |
string
First name associated with the contact |
| last_name π |
string
Last name associated with the contact |
| national_id_number π |
string
National ID number associated with the contact |
| company_name π |
string
Company name associated with the contact |
| vat π |
string
VAT number associated with the contact |
| customs_number π |
string
Customs number associated with the contact |
ContactPhoneNumber
A phone number, including region and optional extension.
| country_code π |
string
required
The country code where the delivery will occur (ISO 3166-1 alpha-2) |
| number π |
string
required
The main phone number, formatted as per the region's conventions |
| extension π |
string
An optional phone number extension |
ConvertSuggestionResponse
Response message for converted session.
Coordinates
Represents a latitude/longitude pair. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.
| lat π |
number
required
The latitude in degrees. Must be within the range -90.0 to +90.0, inclusive |
| lng π |
number
required
The longitude in degrees. Must be within the range -180.0 to +180.0, inclusive |
ListContactsResponse
Response message for listing customer saved contacts.
| id π |
string
The resource id of the set of contacts to retrieve. Typically this is the customer ID |
| contacts π |
object[]
A list of addresses in the address book |
ListSuggestionsResponse
| suggestions π |
object[]
|
ProviderId
External data provider for the suggestions and addresses.
- UNSPECIFIED: If the provider is unspecified or unknown, the default one will be used.
Enum Values:
- UNSPECIFIED
- GOOGLE_MAPS
- LOQATE
Status
Suggestion
A Suggestion represents address suggestion returned by an address autocomplete service.
| id π |
string
The identifier of the suggestion. Used to translate the suggestion into a full address in convert api |
| container_id π |
string
required
Identifier of the group of suggestions (eg "London, Tower Bridge Rd"). Used to fetch more details about the suggestion in ListSuggestions |
| display_line_1 π |
string
required
Display line of the suggested address.<br/><br/>Example for simple address: display_line_1="1 Lanark Road" display_line_2="London W9 1DD"<br/><br/>Example for a container of addresses: display_line_1="Landmann Way" display_line_2="London SE14 - 38 Addresses" |
| display_line_2 π |
string
|
| provider π |
ProviderId
required
|
ValidateAddressRequest
Request message for validating an address.
| address π |
Address
required
Address to be validated |
| provider π |
ProviderId is tge ID of the data provider to be used for validation. If not specified, the default one will be used |
| locales π |
string[]
Locales list defined as lc-CC compliant with ISO 3166-1, in order of preference - the first supported one will be chosen. If not specified, the default locale will be used. For `Google` it is "en-US". `Loqate` does not use locales |
ValidateAddressResponse
Response message for validating an address.
| result π |
VerifyResultType indicates whether the address is valid or not |
| suggestion π |
AddressSuggestion provides a suggested address if the original address is invalid |
ValidateAddressResponseAddressSuggestion
ValidateAddressResponseVerifyResultType
Enum Values:
- UNKNOWN
- VALID
- INVALID