dcat127 Posted January 22, 2014 Posted January 22, 2014 I created this for a project that I was working on. Hopefully it will be helpful to others. You need to sign-up for a free account at https://www.easypost.com/ in order to generate your own key. It also requires the base64 udf #include "base64.au3" #include "easypost.au3" #include <IE.au3> Global $rate Global $login = ":" ; Enter your own key here $from = _getaddress("Test Person", "1234 John Green RD", "", "North Preston", "NY", "14837", "US","1234567890") $to = _getaddress("Test Person", "1234 Johnson Road", "", "North Preston", "NY", "14837", "US","1234567890") $parcel = _getpackage("Parcel", 24) $shipment = _getshipment($to, $from, $parcel) $label = _getlabel($shipment, $rate) If StringLen($label) > 200 Then MsgBox(0, "", "Some Kind of Problem") Exit EndIf _IECreate($label) easypost.au3
dcat127 Posted March 2, 2015 Author Posted March 2, 2015 '?do=embed' frameborder='0' data-embedContent>>
Danp2 Posted March 2, 2015 Posted March 2, 2015 Have you compared EasyPost's API to those from USPS? I'm currently using the USPS Address Verification API, and just wondering how the one from EasyPost compares. Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted March 2, 2015 Posted March 2, 2015 FWIW, your sample code wouldn't run for me. I had to supply a valid phone number in the From address; otherwise, it returned the following from the GetLabel routine: {"error":"Missing or invalid data element: FromPhone. Error encountered (Log ID: 48388)"} Also, seems like you should be checking the return status code for errors. HTH, Dan Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now