SnapCXAddressValidation

FREE
By stefan.skliarov
Updated 5 months ago
Logistics
0.4/10
Popularity Score
246ms
Latency
100%
Success Rate

SnapCXAddressValidation API Documentation

Verify shipping addresses in real-time around the world.

View API Details
POSTvalidateGlobalAddress
POSTvalidateUSAddress
POSTvalidateGlobalAddress

This API end point is for validating global addresses.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
apiKeyCREDENTIALS
REQUIREDApi key obtained from SnapCX
streetSTRING
REQUIREDMandatory Address line 1. It’s needed for any address validation
requestIdSTRING
REQUIREDMandatory Client provided unique request id. Same request_id is returned as part of response header.
countrySTRING
REQUIREDCountry name or ISO 3-char or ISO 2-char country code. Examples USA, CAN, AU etc.
Optional Parameters
secondaryStreetSTRING
OPTIONALOptional Address line2, if it’s there. Examples are apt# or suite# etc.
stateSTRING
OPTIONAL Dependending upon country.
zipcodeSTRING
OPTIONALOptional 5 digit US zipcode
citySTRING
OPTIONALOptional City & State OR zipcode should be present at least. If city & state are present then zipcode is ignored.
Code Snippet
unirest.post("https://SnapCXAddressValidationstefan-skliarovV1.p.rapidapi.com/validateGlobalAddress")
.header("X-RapidAPI-Host", "SnapCXAddressValidationstefan-skliarovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://SnapCXAddressValidationstefan-skliarovV1.p.rapidapi.com/validateGlobalAddress
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://SnapCXAddressValidationstefan-skliarovV1.p.rapidapi.com/validateGlobalAddress")
.header("X-RapidAPI-Host", "SnapCXAddressValidationstefan-skliarovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication