This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"address":{}, | |
"error":"Address Not Found." | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"address":{ | |
"street1":"388 TOWNSEND ST", | |
"street2":"APT 20", | |
"city":"SAN FRANCISCO", | |
"state":"CA", | |
"zip":"94107" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://www.easypost.co/api/address/verify \ | |
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \ | |
-d 'address[street1]=388 Townsend St' \ | |
-d 'address[city]=San Francisco' \ | |
-d 'address[state]=CA' \ | |
-d 'address[zip]=94107' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://www.easypost.co/api/address/verify \ | |
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \ | |
-d 'address[street1]=388 Townsend St' \ | |
-d 'address[street2]=Apt 20' \ | |
-d 'address[city]=San Francisco' \ | |
-d 'address[state]=CA' \ | |
-d 'address[zip]=94107' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"address":{ | |
"street1":"388 TOWNSEND ST", | |
"city":"SAN FRANCISCO", | |
"state":"CA", | |
"zip":"94107" | |
}, | |
"message":"Default address: The address you entered was found but more information is needed (such as an apartment, suite, or box number) to match to a specific address." | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import easypost | |
easypost.api_key = 'rWI791GTPCIwGMaQEGFQmJyEeZ925kln' | |
# Setting up data... | |
to_address = { | |
"street1": '388 Townsend St', | |
"street2": 'Apt 20', | |
"city": 'San Francisco', | |
"state": 'CA', | |
"zip": '94107' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EasyPost.setApiKey("ek_0HbTD15HeT6RFTwCKoUQ7rrB2NzMZ"); | |
// Create the package | |
EasyPost.Package package = new EasyPost.Package() | |
.setWeigth(1.1) | |
.setHeight(12) | |
.setWidth(14) | |
.setLength(7); | |
// Create the to and from addresses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EasyPost.setApiKey("ek_0HbTD15HeT6RFTwCKoUQ7rrB2NzMZ"); | |
// Create the package | |
EasyPost.Package package = new EasyPost.Package() | |
.setWeigth(1.1) | |
.setHeight(12) | |
.setWidth(14) | |
.setLength(7); | |
// Create the to and from addresses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EasyPost.setApiKey("ek_0HbTD15HeT6RFTwCKoUQ7rrB2NzMZ"); | |
// Create the address to test | |
EasyPost.Address address = new EasyPost.Address() | |
.setName("Dirk Diggler") | |
.setStreet1("300 Granelli Ave") | |
.setCity("Half Moon Bay") | |
.setState("CA") | |
.setZip("94019"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import easypost | |
easypost.api_key = "ek_0HbTD15HeT6RFTwCKoUQ7rrB2NzMZ" | |
easypost.Address.verify({ | |
"street1": "101 California St", | |
"street2": "Suite 1290", | |
"city": "San Francisco", | |
"state": "CA", | |
"zip": "94111" | |
}) |