Discussions

Ask a Question
Back to All

Unable to pull rates via API

I'm using my sandbox api token (though I tried once with our production token and had the same result). I'm requesting POST https://api.easyship.com/rate/v1/rates and I know my token is working because I am able to successfully get shipment lists and shipment details using the same code. When I try to post to get rates, however, I'm getting the same error no matter what variations on the post data I try:

"{"message":"Rates could not be calculated","errors":["No Items"]}"

I've tried many types of json bodies with the post, but the most recent one is as follows, which I took directly from a staff post on this forum:

{"items":[{"actual_weight":"10.0","height":"20.0","width":"20.0","length":"30.0","category":"mobiles","declared_currency":"SGD","declared_customs_value":"100.00"}],"destination_country_alpha2":"US","destination_postal_code":"10030","is_insured":false,"origin_postal_code":"WC2N","taxes_duty_paid_by":"Sender"}