RapidAPI logo

Sign Up

Log In

easypost

FREEMIUM
By easypostapi
Updated 3 months ago
Tools
2.3/10
Popularity Score
403ms
Latency
40%
Success Rate

easypost API Documentation

The easy post API let's you track shipments, verify shipping addresses and purchase shipping labels.

View API Details
POSTVerify Address
POSTTrack Package
POSTVerify Address

Verify a street address and returns it in a structured format

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
address[street1]STRING
REQUIREDFirst line of the address
address[city]STRING
REQUIREDFull city name
address[country]STRING
REQUIREDISO 3166 country code for the country the address is located in
verify_strict[]STRING
REQUIRED - CONSTANTPerforms delivery verification
Optional Parameters
address[street2]STRING
OPTIONALSecond line of the address
address[state]STRING
OPTIONALState or province
address[zip]STRING
OPTIONALZIP or postal code
address[company]STRING
OPTIONALName of attention, if organization. Both name and company can be included
address[name]STRING
OPTIONALName of attention, if person. Both name and company can be included
Request Snippet
unirest.post("https://easypostapi-easypost-v1.p.rapidapi.com/v2/addresses")
.header("X-RapidAPI-Host", "easypostapi-easypost-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("address[street2]=FLOOR 5")
.send("address[state]=CA")
.send("address[zip]=94104")
.send("address[company]=EasyPost")
.send("address[name]=Miki Lior")
.send("address[street1]=417 MONTGOMERY ST")
.send("address[city]=San Francisco")
.send("address[country]=US")
.send("verify_strict[]=delivery")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

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://easypostapi-easypost-v1.p.rapidapi.com/v2/addresses")
.header("X-RapidAPI-Host", "easypostapi-easypost-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("address[street2]=FLOOR 5")
.send("address[state]=CA")
.send("address[zip]=94104")
.send("address[company]=EasyPost")
.send("address[name]=Miki Lior")
.send("address[street1]=417 MONTGOMERY ST")
.send("address[city]=San Francisco")
.send("address[country]=US")
.send("verify_strict[]=delivery")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication