Skip to content

Instantly share code, notes, and snippets.

View joncalhoun's full-sized avatar
💻
Making Go Courses

Jon Calhoun joncalhoun

💻
Making Go Courses
View GitHub Profile
@joncalhoun
joncalhoun / verify-output.json
Created October 29, 2012 12:43
Verify Address - Message output
{
"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."
}
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 12:48
EasyPost cURL Example
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'
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 12:49
EasyPost cURL Example
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'
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 12:56
EasyPost cURL Example Output
{
"address":{
"street1":"388 TOWNSEND ST",
"street2":"APT 20",
"city":"SAN FRANCISCO",
"state":"CA",
"zip":"94107"
}
}
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 13:17
EasyPost cURL Example Output
{
"address":{},
"error":"Address Not Found."
}
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 13:21
EasyPost cURL Example
curl https://www.easypost.co/api/address/verify \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'address[street1]=5000 Townsend St' \
-d 'address[street2]=Apt 20' \
-d 'address[city]=San Francisco' \
-d 'address[state]=CA' \
-d 'address[zip]=94107'
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 14:30
EasyPost cURL Example
curl https://www.easypost.co/api/postage/rates \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[zip]=94107' \
-d 'from[zip]=94019' \
-d 'parcel[length]=10.0' \
-d 'parcel[width]=5.0' \
-d 'parcel[height]=8.0' \
-d 'parcel[weight]=100.0'
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 14:34
EasyPost cURL Example Output
{
"rates":[
{
"carrier":"USPS",
"service":"Priority",
"rate":"9.12"
},{
"carrier":"USPS",
"service":"Express",
"rate":"26.94"
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 15:49
EasyPost cURL Example
curl https://www.easypost.co/api/postage/rates \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[zip]=94107' \
-d 'parcel[length]=10.0' \
-d 'parcel[width]=5.0' \
-d 'parcel[height]=8.0' \
-d 'parcel[weight]=100.0'
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 15:49
EasyPost cURL Example Output
{
"error":"Invalid sender data. This must include a 5 digit zip code"
}