POST/Address_code

Request URL

curl -X POST "https://rest-api.argosidentity.com/v3/address_code"
-H "x-api-key: {yourAPIKey}" \
  • To collect address, compound code or global code or formatted address is needed.

  • Post/Address_code is to extract those data.

  • When any of 'global_ code', 'compound_code', longitude and latitude is transmitted, 'global_ code', 'compound_code' and 'formatted_addres' will be returned.

Input Data

* means required parameters.

Parameter
Type
Description

*address

string

You can search by entering one of the following:

  • Address

  • Global code

  • Compound code

  • Latitude and longitude (Separate by comma, ex. 38.897,77.036)

language

string

Output Data

Response
Description

formatted_address

Transformed address from detailed code

compound_code

Detailed code, city and country from the address (ex. VXX7+39 Washington, DC, USA)

global_code

Detailed code from the address (ex. 87C4VXX7+39)

Sample

Sample Request 1

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://rest-api.argosidentity.com/v3/address_code',
  'headers': {
    'x-api-key': 'yourAPIkey',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    'address': '20 W 34th St, New York, NY 10001'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Sample Request 2

curl --location --request POST 'https://rest-api.argosidentity.com/v3/address_code' \
--header 'x-api-key: yourAPIkey' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'language=en' \
--data-urlencode 'address=20 W 34th St, New York, NY 10118, USA'

Sample Response

{
    "formatted_address": "20 W 34th St, New York, NY 10118, USA",
    "compound_code": "P2X7+GP New York, NY",
    "global_code": "87G8P2X7+GP"
}

Last updated