These docs are for v1.0. Click to read the latest docs for v2024.09.

Discussions

Ask a Question
Back to All

Rates API - Return is for which box type?

Hi. I just started using my API access. So far, so good. I am testing the Rates API, returning results - great!!!

But I hope someone can help me interpret the values I get back from the call.

For the return values, I cannot determine the package type being quoted. For the following example, while "USPS - Priority Mail" is being returned, I can't tell if this is for "Package" as opposed to "Flat Rate Box" or something else. For this return, how can I tell which shipment type the rate applies to?

I've only fed the call with dimensions and weight, along with all the other required information (see the end of this post to see what I used). I have also tried to add the box slug, but if it is needed, I must not be using it correctly.

Am I missing something - where is the package type either specified or derived???

Thanks in advance for any assistance!

Here is an example return:

"rates": [
{
"courier_id": "7505df80-af51-46a0-b2ee-ac9eacfcd3e4",
"courier_name": "USPS - Priority Mail",
"min_delivery_time": 2,
"max_delivery_time": 3,
"value_for_money_rank": 1,
"delivery_time_rank": 2,
"currency": "USD",
"shipment_charge": 10.57,
"fuel_surcharge": 0,
"remote_area_surcharge": 0,
"remote_area_surcharges": {},
"other_surcharges": {},
"oversized_surcharge": 0,
"additional_services_surcharge": 0,
"residential_full_fee": 0,
"residential_discounted_fee": 0,
"shipment_charge_total": 10.57,
"warehouse_handling_fee": 0,
"insurance_fee": 0,
"sales_tax": 0,
"provincial_sales_tax": 0,
"ddp_handling_fee": 0,
"import_tax_charge": 0,
"import_tax_non_chargeable": 0,
"import_duty_charge": 0,
"total_charge": 10.57,
"is_above_threshold": false,
"incoterms": "DDU",
"estimated_import_tax": 0,
"estimated_import_duty": 0,
"minimum_pickup_fee": 0,
"available_handover_options": "dropoff,free_pickup",
"tracking_rating": 1,
"easyship_rating": 3.5,
"courier_remarks": null,
"payment_recipient": "Easyship",
"discount": {
"amount": 0,
"code": null,
"percentage": null,
"expires_at": null,
"origin_amount": 0
},
"rates_in_origin_currency": {
"currency": "USD",
"shipment_charge": 10.57,
"fuel_surcharge": 0,
"remote_area_surcharge": 0,
"additional_services_surcharge": 0,
"oversized_surcharge": 0,
"shipment_charge_total": 10.57,
"warehouse_handling_fee": 0,
"insurance_fee": 0,
"ddp_handling_fee": 0,
"import_tax_charge": 0,
"import_tax_non_chargeable": 0,
"import_duty_charge": 0,
"residential_discounted_fee": 0,
"residential_full_fee": 0,
"total_charge": 10.57,
"estimated_import_tax": 0,
"estimated_import_duty": 0,
"sales_tax": 0,
"provincial_sales_tax": 0,
"minimum_pickup_fee": 0
},
"description": "No additional taxes to be paid at delivery",
"full_description": "USPS - Priority Mail (2-3 working days) No additional taxes to be paid at delivery"
},

Here is the input to the call:

{
"origin_address": {
"line_1": "123 Main Street",
"contact_email": "[email protected]",
"state": "IL",
"city": "City",
"postal_code": "60084",
"country_alpha2": "US"
},
"destination_address": {
"line_1": "9903 Santa Monica BLVD",
"contact_email": "[email protected]",
"state": "CA",
"city": "Beverly Hills",
"postal_code": "90210",
"country_alpha2": "US"
},
"incoterms": "DDU",
"insurance": {
"is_insured": false
},
"courier_selection": {
"apply_shipping_rules": true
},
"shipping_settings": {
"units": {
"weight": "lb",
"dimension": "in"
}
},
"parcels": [{
"box": {
"length": 8,
"width": 8,
"height": 1
},
"items": [{
"quantity": 1,
"description": "item1",
"actual_weight": 1,
"declared_currency": "USD",
"declared_customs_value": 5,
"category": "fashion"
}
],
"total_actual_weight": 2
}
]
}