RapidAPI logo

Sign Up

Log In

easypost

FREE
By community
Updated 4 months ago
2/10
Popularity Score
219ms
Latency
-
Success Rate

easypost API Documentation

EasyPost allows you to integrate shipping APIs into any application in minutes.

View API Details
POSTCustoms Info Forms
POSTBatches
POSTBatch Create and Buy
POSTBatch Labels
POSTAdresses
POSTBuy Postage Label
POSTCustoms Items
GETGet Shipping Rates
POSTParcels
POSTShipments
GETVerify Addresses
POSTRefunds
POSTScan Form
POSTShipment Insurance
POSTCustoms Info Forms

CustomsInfo objects contain CustomsItem objects and all necessary information for the generation of customs forms required for international shipping.

Authorization:

Authentication and identification are handled in the same step in the EasyPost API by providing one of your API keys in every request. The EasyPost API uses Basic Auth, and only accepts requests sent over SSL (HTTPS). EasyPost API keys come in two modes: test, and production. While you're using a test API key you will never be charged for postage and none of the requests will appear in your live mode reporting.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AuthorizationBASIC
REQUIREDAuthentication and identification are handled in the same step in the EasyPost API by providing one of your API keys in every request. The EasyPost API uses Basic Auth, and only accepts requests sent over SSL (HTTPS). EasyPost API keys come in two modes: test, and production. While you're using a test API key you will never be charged for postage and none of the requests will appear in your live mode reporting.
Request Snippet
unirest.post("https://mashape-community-easypost.p.rapidapi.com/customs_infos")
.header("X-RapidAPI-Host", "mashape-community-easypost.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
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://mashape-community-easypost.p.rapidapi.com/customs_infos")
.header("X-RapidAPI-Host", "mashape-community-easypost.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