Skip to main content

Fields

administrativeArea : String

Top-level administrative subdivision, e.g. US state, AU state/territory, NZ, region, IT region, JP prefecture.

AU: Australia

This must be one of NSW, VIC, QLD, TAS, ACT, SA, NT, WA. For addresses not within these locations, use the value that Australia Post uses, e.g. ACT for the Jervis Bay Territory or WA for Christmas Island.

asString : String

The entire formatted address represented as a single string, as it would be written on an envelope.

The formatting of this field may vary according to the country of the address (which may not match this Kraken installation's home country). It may also change if we update our address-formatting code or if our understanding of the correct formatting for a given country changes. Avoid parsing individual components of an address out of this field's value; use the other fields on this type instead.

Arguments
showCountry : Boolean default: True

Whether to include the country. The country will be spelled out in all-caps on the last line, as per Universal Postal Union standards.

showName : Boolean default: True

Whether to include the name attached to this address.

showPostalCode : Boolean default: True

Whether to include the postal code attached to this address.

country : String

ISO 3166-1 alpha-2 code of the country this address belongs to, e.g. AU, GB, NZ.

deliveryPointIdentifier : String

Identifier used by the local postal service for this address, e.g. AU DPID, GB postcode + Delivery Point Suffix, US Zip-9 + Delivery Point.

This is the value that gets encoded in the barcode printed on the envelope by large-volume bulk mail providers.

dependentLocality : String

UK dependent localities, or neighbourhoods or boroughs in some other locations.

locality : String

City or town portion of an address, e.g. US city, AU suburb/town, NZ suburb and city/town, IT comune, UK post town.

name : String

A personal name.

organization : String

The name of a business or organisation.

postalCode : String

Postal code (ZIP code in the US).

sortingCode : String

Sorting code, e.g. FR CEDEX code. This field is not used in many countries.

streetAddress : String

The 'street address' component.

This value can (and often will) contain newline characters when appropriate.

In some cases, data may appear in this field instead of the below fields; e.g. a UK post town name may appear here instead of in the dependent_locality field. This happens when data has been migrated from a legacy format, and that format had insufficient metadata to determine the appropriate field.

If structured_street_address is also set, the value of this field will be a string generated from that value.

structuredStreetAddress : GenericScalar

The 'street address' component, in a structured format.

This field stores the same value as street_address, but with more detail; for instance, instead of 123 Example Street it might be {'street_number': '123', 'street_name': 'Example', 'street_type': 'Street'}. In many cases this will be blank; we only use this field for Krakens where we need to supply this level of granularity to some third-party service, like a bulk mail provider.

The exact structure of this value depends on the country of the address, which is not necessarily the same as the country this Kraken is configured to serve. For addresses outside of the countries listed below, this field will be left blank.

AU: Australia

The following keys may be present; all are optional. All keys have string values, and their meaning is the same as their aseXML counterparts. (Note that, unlike aseXML, all keys are provided at the top level, rather than being nested.)

  • flat_or_unit_type
  • flat_or_unit_number
  • floor_or_level_type
  • floor_or_level_number
  • building_or_property_name
  • location_descriptor
  • lot_number
  • house_number_1
  • house_number_suffix_1
  • house_number_2
  • house_number_suffix_2
  • street_name
  • street_type
  • street_suffix
  • postal_delivery_type
  • postal_delivery_number_prefix
  • postal_delivery_number_value
  • postal_delivery_number_suffix

JP: Japan

The following keys may be present; all are optional. If keys are empty, they may be omitted from the response entirely.

  • chome
  • banchi
  • go
  • edaban
  • kana_building_name
  • kanji_building_name
  • building_number
  • room_number
  • address_code
  • physical_location_identifier
  • kana_company_name
  • kanji_company_name

NZ: New Zealand

The following keys may be present; all are optional. If keys are empty, they may be omitted from the response entirely.

  • flat_or_unit_type
  • flat_or_unit_number
  • floor_or_level_type
  • floor_or_level_number
  • property_name
  • building_name
  • house_number_1
  • house_number_suffix_1
  • house_number_2
  • house_number_suffix_2
  • street_prefix
  • street_name
  • street_type
  • street_suffix
  • rural_delivery_number
  • mailtown
  • postal_delivery_type
  • postal_delivery_location
  • postal_delivery_number_prefix
  • postal_delivery_number_value
  • postal_delivery_number_suffix
The example data in the variables and responses below are autogenerated values designed to resemble real inputs. They do not represent actual customer data, and in some cases may require additional validation.

Example

{ "administrativeArea": "business-first-risk-six-of", "asString": "later-evidence-law-hair-score", "country": "herself-threat-back-often-argue", "deliveryPointIdentifier": "16539911", "dependentLocality": "model-offer-yeah-six-reflect", "locality": "second-gun-walk-poor-I", "name": "let-woman-mother-cold-chance", "organization": "reach-none-trade-continue-in", "postalCode": "road-anyone-between-nation-entire", "sortingCode": "blood-energy-place-money-bad", "streetAddress": "authority-sure-poor-community-technology", "structuredStreetAddress": "abc123" | 1 | 1.0 | true | ["abc123"] | AccountType }