Skip to content

Latest commit

 

History

History
252 lines (188 loc) · 12.2 KB

File metadata and controls

252 lines (188 loc) · 12.2 KB

LIAPIGeoLifeServiceApi

All URIs are relative to https://api.pitneybowes.com/location-intelligence

Method HTTP request Description
getDemographicsByAddressV2 GET /geolife/v2/demographics/byaddress Demographics By Address.
getDemographicsByLocationV2 GET /geolife/v2/demographics/bylocation Demographics By Location.
getSegmentationByAddress GET /geolife/v1/segmentation/byaddress Segmentation By Address.
getSegmentationByLocation GET /geolife/v1/segmentation/bylocation Segmentation By Location.

getDemographicsByAddressV2

DemographicsV2 getDemographicsByAddressV2(address, country, profile, filter, valueFormat, variableLevel)

Demographics By Address.

Provides the demographic details around a specified address. GeoLife 'byaddress' service accepts address as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more.

Example

// Import classes:
//import pb.ApiClient;
//import pb.ApiException;
//import pb.Configuration;
//import pb.auth.*;
//import pb.locationintelligence.LIAPIGeoLifeServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API_KEY and SECRET for authorization: oAuth2Password
 ApiClient defaultClient = Configuration.getDefaultApiClient();
 defaultClient.setoAuthApiKey("<YOUR API KEY>");
 defaultClient.setoAuthSecret("<YOUR SECRET>");

LIAPIGeoLifeServiceApi apiInstance = new LIAPIGeoLifeServiceApi();
String address = "address_example"; // String | The address to be searched.
String country = "country_example"; // String | 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,AUS.
String profile = "profile_example"; // String | Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by address) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending
String filter = "filter_example"; // String | The 'filter' parameter retrieves the demographic data based upon specified input themes.
String valueFormat = "PercentAsAvailable"; // String | The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value.
String variableLevel = "Key"; // String | The 'variableLevel' retrieves demographic facts in response based on the input value
try {
    DemographicsV2 result = apiInstance.getDemographicsByAddressV2(address, country, profile, filter, valueFormat, variableLevel);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LIAPIGeoLifeServiceApi#getDemographicsByAddressV2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
address String The address to be searched.
country String 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,AUS. [optional] [enum: USA, CAN, GBR, FRA, IND, ITA, AUS, DEU.]
profile String Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by address) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending [optional] [enum: Top5Ascending, Top5Descending, Top3Ascending, Top3Descending]
filter String The 'filter' parameter retrieves the demographic data based upon specified input themes. [optional]
valueFormat String The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. [optional] [default to PercentAsAvailable] [enum: PercentAsAvailable, CountOnly, Both]
variableLevel String The 'variableLevel' retrieves demographic facts in response based on the input value [optional] [default to Key] [enum: Key, Detailed, Advanced, All]

Return type

DemographicsV2

Authorization

oAuth2Password

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

getDemographicsByLocationV2

DemographicsV2 getDemographicsByLocationV2(longitude, latitude, profile, filter, valueFormat, variableLevel)

Demographics By Location.

Provides the demographic details around a specified location. GeoLife 'bylocation' service accepts longitude and latitude as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more.

Example

// Import classes:
//import pb.ApiClient;
//import pb.ApiException;
//import pb.Configuration;
//import pb.auth.*;
//import pb.locationintelligence.LIAPIGeoLifeServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API_KEY and SECRET for authorization: oAuth2Password
 ApiClient defaultClient = Configuration.getDefaultApiClient();
 defaultClient.setoAuthApiKey("<YOUR API KEY>");
 defaultClient.setoAuthSecret("<YOUR SECRET>");

LIAPIGeoLifeServiceApi apiInstance = new LIAPIGeoLifeServiceApi();
String longitude = "longitude_example"; // String | Longitude of the location.
String latitude = "latitude_example"; // String | Latitude of the location.
String profile = "profile_example"; // String | Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending
String filter = "filter_example"; // String | The 'filter' parameter retrieves the demographic data based upon specified input themes.
String valueFormat = "PercentAsAvailable"; // String | The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value.
String variableLevel = "Key"; // String | The 'variableLevel' retrieves demographic facts in response based on the input value
try {
    DemographicsV2 result = apiInstance.getDemographicsByLocationV2(longitude, latitude, profile, filter, valueFormat, variableLevel);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LIAPIGeoLifeServiceApi#getDemographicsByLocationV2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
longitude String Longitude of the location.
latitude String Latitude of the location.
profile String Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending [optional] [enum: Top5Ascending, Top5Descending, Top3Ascending, Top3Descending]
filter String The 'filter' parameter retrieves the demographic data based upon specified input themes. [optional]
valueFormat String The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. [optional] [default to PercentAsAvailable] [enum: PercentAsAvailable, CountOnly, Both]
variableLevel String The 'variableLevel' retrieves demographic facts in response based on the input value [optional] [default to Key] [enum: Key, Detailed, Advanced, All]

Return type

DemographicsV2

Authorization

oAuth2Password

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

getSegmentationByAddress

Segmentation getSegmentationByAddress(address, country)

Segmentation By Address.

Provides the segmentation details around a specified address. GeoLife 'Segmentation by Address' service accepts address as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests.

Example

// Import classes:
//import pb.ApiClient;
//import pb.ApiException;
//import pb.Configuration;
//import pb.auth.*;
//import pb.locationintelligence.LIAPIGeoLifeServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API_KEY and SECRET for authorization: oAuth2Password
 ApiClient defaultClient = Configuration.getDefaultApiClient();
 defaultClient.setoAuthApiKey("<YOUR API KEY>");
 defaultClient.setoAuthSecret("<YOUR SECRET>");

LIAPIGeoLifeServiceApi apiInstance = new LIAPIGeoLifeServiceApi();
String address = "address_example"; // String | The address to be searched.
String country = "country_example"; // String | 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,FRA,ITA,AUS,DEU.
try {
    Segmentation result = apiInstance.getSegmentationByAddress(address, country);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LIAPIGeoLifeServiceApi#getSegmentationByAddress");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
address String The address to be searched.
country String 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,FRA,ITA,AUS,DEU. [optional] [enum: USA, CAN, GBR, FRA, ITA, AUS, DEU]

Return type

Segmentation

Authorization

oAuth2Password

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

getSegmentationByLocation

Segmentation getSegmentationByLocation(longitude, latitude)

Segmentation By Location.

Provides the segmentation details around a specified location. GeoLife 'segmentation bylocation' service accepts longitude and latitude as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests.

Example

// Import classes:
//import pb.ApiClient;
//import pb.ApiException;
//import pb.Configuration;
//import pb.auth.*;
//import pb.locationintelligence.LIAPIGeoLifeServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API_KEY and SECRET for authorization: oAuth2Password
 ApiClient defaultClient = Configuration.getDefaultApiClient();
 defaultClient.setoAuthApiKey("<YOUR API KEY>");
 defaultClient.setoAuthSecret("<YOUR SECRET>");

LIAPIGeoLifeServiceApi apiInstance = new LIAPIGeoLifeServiceApi();
String longitude = "longitude_example"; // String | Longitude of the location.
String latitude = "latitude_example"; // String | Latitude of the location.
try {
    Segmentation result = apiInstance.getSegmentationByLocation(longitude, latitude);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LIAPIGeoLifeServiceApi#getSegmentationByLocation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
longitude String Longitude of the location.
latitude String Latitude of the location.

Return type

Segmentation

Authorization

oAuth2Password

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json