Calculate rates
Content-Type
Calculate rates
enable async mode or not (set to false if not provided)
If the shipment is document type. (set to false if not provided)
Ship Date in YYYY-MM-DD, if not provided, will be today of the shipper account timezone
Shipment object: the description of shipment information
The money object is used to represent the currency amount.
Address object: the description of address information
Address object: An optional address object that lets you customize the ship from details shown on the shipping label.
This is only for visual display and won't change actual shipping routes or carrier operations.
Supported slug: purolator,canada-post
Address object: the description of address information
Parcels of shipment
Address object: the description of address information
Instructions to aid in prompt delivery of the shipment.
Expected Delivery Date in YYYY-MM-DD
Unique identification of the order. The order_id is only used by certain third-party order platforms. Please contact support for details.
Calculate rates
Meta data object.
Code of Meta
Message of Meta
Details of Meta
Whether this request will be retryable or not
RateRecord object: the description of rates information
the timestamp of created_at, example: 2022-05-18T09:17:38+00:00
rate id
the timestamp of updated_at, example: 2022-05-18T09:17:38+00:00
rates array
{
"shipper_accounts": [
{
"id": "3ba41ff5-59a7-4ff0-8333-64a4375c7f21"
}
],
"shipment": {
"ship_from": {
"contact_name": "AfterShip Shipping",
"company_name": "AfterShip Shipping",
"street1": "230 W 200 S LBBY",
"city": "Salt Lake City",
"state": "UT",
"postal_code": "84101",
"country": "USA",
"phone": "123456789",
"email": "[email protected]"
},
"ship_to": {
"contact_name": "AfterShip Shipping",
"company_name": "AfterShip Shipping",
"street1": "230 W 200 S LBBY",
"city": "Salt Lake City",
"state": "UT",
"postal_code": "84101",
"country": "USA",
"phone": "123456789",
"email": "[email protected]"
},
"parcels": [
{
"box_type": "custom",
"dimension": {
"width": 10,
"height": 10,
"depth": 10,
"unit": "cm"
},
"items": [
{
"description": "Food Bar",
"quantity": 1,
"price": {
"currency": "USD",
"amount": 100
},
"item_id": "1234567",
"origin_country": "CHN",
"weight": {
"unit": "kg",
"value": 10
},
"sku": "imac2014",
"hs_code": "1006.30"
}
],
"description": "Food XS",
"weight": {
"unit": "kg",
"value": 10
}
}
],
"return_to": {
"contact_name": "AfterShip Shipping",
"street1": "This is the first streeet",
"street2": "This is the second streeet",
"city": "New York",
"state": "New York",
"postal_code": "10001",
"country": "USA",
"phone": "1-123-456-5496",
"email": "[email protected]",
"type": "residential"
},
"delivery_instructions": "handle with care"
}
}{ "meta": { "code": 200, "type": "OK", "message": "Everything worked as expected." }, "data": { "created_at": "2015-09-09T07:49:54.060Z", "id": "ad1f9340-608d-4a30-be0e-b0a62e07e4cc", "updated_at": "2015-09-09T07:49:57.360Z", "status": "calculated", "rates": [ { "charge_weight": { "value": 1.5, "unit": "kg" }, "total_charge": { "amount": 429.57, "currency": "HKD" }, "shipper_account": { "id": "00000000-0000-0000-0000-000000000000", "slug": "dhl", "description": "DHL Sandbox" }, "service_type": "dhl_express_worldwide", "service_name": "dhl_express_worldwide", "pickup_deadline": "2015-09-01T18:00:00+00:00", "booking_cut_off": "2015-09-01T17:00:00+00:00", "delivery_date": "2015-09-01T23:00:00+00:00", "transit_time": 1, "detailed_charges": [ { "type": "base", "charge": { "amount": 387, "currency": "HKD" } }, { "type": "fuel_surcharge", "charge": { "amount": 42.57, "currency": "HKD" } } ], "error_message": null, "info_message": null }, { "charge_weight": { "value": 1.5, "unit": "kg" }, "total_charge": { "amount": 528, "currency": "HKD" }, "shipper_account": { "id": "00000000-0000-0000-0000-000000000000", "slug": "dhl", "description": "DHL Sandbox" }, "service_type": "dhl_express_easy", "service_name": "dhl_express_easy", "pickup_deadline": "2015-09-01T18:00:00+00:00", "booking_cut_off": "2015-09-01T17:00:00+00:00", "delivery_date": "2015-09-01T23:00:00+00:00", "transit_time": 1, "detailed_charges": [ { "type": "base", "charge": { "amount": 528, "currency": "HKD" } } ], "error_message": null, "info_message": null } ] } }