Closed MichaelQuint closed 8 years ago
Never mind, I found the API documentation and added support to add a ShipDate to the request, this then returns a CommitmentDate to be used as the expected delivery date.
Documentation https://www.usps.com/business/web-tools-apis/rate-calculator-api.htm
@MichaelQuint glad you got it figured out. this something I should consider adding to core? if so do you mind putting together a pull request? thanks,
kyle
Im not really sure how to do that, but here is my changes. very small.
merged this in. thanks @MichaelQuint !
Im getting some strange results with the USPS Expected Delivery Date, even tho the packages are more expensive the date stays the same. Also I havent found a way to remove certain service types by USPS, I currently do so like this:
shipment.Rates.Where(r => r.Name != "USPS Library Mail Parcel" && r.Name != "USPS Media Mail Parcel" && !r.Name.Contains("Hold For Pickup") ).OrderBy(s => s.TotalCharges).ToArray();