avs-client

This is Java bases client library for using snapcx address validation and correction webservice. You can subscribe to tracking webservice (REST based and JSON payload) at https://snapcx.io/pricing. Also read more about this webservice at https://snapcx.io/addressValidation. Before using this client, you can check your api key using API explorer, running at https://snapcx.io/addressValidationAPI

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

io.snapcx
ArtifactId

ArtifactId

avs-client
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

avs-client
This is Java bases client library for using snapcx address validation and correction webservice. You can subscribe to tracking webservice (REST based and JSON payload) at https://snapcx.io/pricing. Also read more about this webservice at https://snapcx.io/addressValidation. Before using this client, you can check your api key using API explorer, running at https://snapcx.io/addressValidationAPI
Project URL

Project URL

https://github.com/snapcx/avs-client
Project Organization

Project Organization

JFrameworks.com, LLC
Source Code Management

Source Code Management

https://github.com/snapcx/avs-client

Download avs-client

How to add to project

<!-- https://jarcasting.com/artifacts/io.snapcx/avs-client/ -->
<dependency>
    <groupId>io.snapcx</groupId>
    <artifactId>avs-client</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.snapcx/avs-client/
implementation 'io.snapcx:avs-client:1.0.0'
// https://jarcasting.com/artifacts/io.snapcx/avs-client/
implementation ("io.snapcx:avs-client:1.0.0")
'io.snapcx:avs-client:jar:1.0.0'
<dependency org="io.snapcx" name="avs-client" rev="1.0.0">
  <artifact name="avs-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.snapcx', module='avs-client', version='1.0.0')
)
libraryDependencies += "io.snapcx" % "avs-client" % "1.0.0"
[io.snapcx/avs-client "1.0.0"]

Dependencies

compile (10)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.9
org.glassfish.jersey.core : jersey-client jar 2.22.2
org.glassfish.jersey.media : jersey-media-multipart jar 2.22.2
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.22.2
com.fasterxml.jackson.core : jackson-core jar 2.7.5
com.fasterxml.jackson.core : jackson-annotations jar 2.7.5
com.fasterxml.jackson.core : jackson-databind jar 2.7.5
com.fasterxml.jackson.datatype : jackson-datatype-joda jar 2.7.5
joda-time : joda-time jar 2.9.4
com.brsanthu : migbase64 jar 2.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

snapCX.io Address Validation & Correction Java Client

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>io.snapcx</groupId>
    <artifactId>avs-client</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.snapcx:avs-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/avs-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

cURL Example

curl -X GET -H "user_key: d111120ba53b07fxxxx05bc8c754a33f" "https://api.snapcx.io/avs/v1/validateAddress?request_id=12345&street=1%20Rosedale%20Street&city=baltimore&state=md&zipcode=08534"

curl -X GET -H "user_key: 777d94a03dd15c0d5782686aae88888c" "https://api.snapcx.io/avs/v1/validateGlobalAddress?request_id=12345&street=2%20Holt%20Street&city=Surry%20Hills&state=NSW&zipcode=2012&country=AU"

Please follow the installation instruction and execute the following Java code:

import io.snapcx.avs.client.*;
import io.snapcx.avs.client.auth.*;
import io.snapcx.avs.client.model.*;
import io.snapcx.avs.client.api.AddressValidationApi;

import java.io.File;
import java.util.*;

public class AddressValidationApiExample {

    public static void main(String[] args) {
        
        AddressValidationApi apiInstance = new AddressValidationApi();
        String userKey = "userKey_example"; // String | Your private key, given after opening account with snapcx.io
        String requestId = "requestId_example"; // String | Any unique string identifier. Same string will be part of response header.
        String street = "street_example"; // String | Address line1. It's mandatory field.
        String secondary = "secondary_example"; // String | Address line2. Second line of address, as required.
        String city = "city_example"; // String | City name.
        String state = "state_example"; // String | 2 Char State abbrv. Example NJ, NY, CA etc.
        String zipcode = "zipcode_example"; // String | 5 Digit zipcode.
        try {
            InlineResponse200 result = apiInstance.validateAddress(userKey, requestId, street, secondary, city, state, zipcode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressValidationApi#validateAddress");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.snapcx.io

Class Method HTTP request Description
AddressValidationApi validateAddress GET /avs/v1/validateAddress [USA] Validate Address and provide corrected addresses.
AddressValidationApi validateGlobalAddress GET /avs/v1/validateGlobalAddress Global validate Address and provide corrected addresses for all over the world.

Documentation for Models

Documentation for Authorization

All endpoints require API KEY in request header. You can get your api key from developer portal of snapcx.io. Name of header key is user_key Example

user_key:d111120ba53b07fxxxx05bc8c754a33f

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issue.

Website

https://snapcx.io

Pricing & Subscription plans

https://snapcx.io/pricing

Contact us

https://snapcx.io/contactus

API Status

https://status.snapcx.io

Troubleshooting and API Explorer

(You can use your API Key to test API end point) https://snapcx.io/addressValidationAPI

io.snapcx

snapcx

Versions

Version
1.0.0