Creating a shipment and buying the label can be combined into one single API call instead of two. The label generation can also be synchronous
Courier selection
The best courier (e.g. the cheapest) will be selected for this shipment automatically, unless the
selected_courier_id
field is provided. We recommend using the Rates API to display shipping rates in your eCommerce store, and then use the selected courier to generate the labels.
Alternatively, you can rely on the Shipping Rules defined in your Easyship dashboard, by settingapply_shipping_rules
true.
Total dimensions and weight calculation
If
total_actual_weight
is provided, it will prevail over the items' individual weights. It not provided, then the items' weights are mandatory and will be used to calculate the total package dimensions.
Likewise, if thebox
object is provided, then its dimensions will prevail over all individual items' dimensions and will be used to calculate the shipping rates. However, if the total box isn't provided, our algorithm will compute the best box based on the items' dimensions, which will then be mandatory.
Items definitions:
items array object | type | description |
---|---|---|
description | string | Name or description of item |
sku | string | Stock Keeping Unit of item. |
actual_weight | float | Actual weight of item in kg Optional if the total_actual_weight is provided |
height | float | Actual height of item in cm Optional if the Box dimensions are provided |
width | float | Actual width of item in cm Optional if the Box dimensions are provided |
length | float | Actual length of item in cm Optional if the Box dimensions are provided |
category | string | Item's category. Allowed values= mobiles, tablets, computers_laptops, cameras, accessory_no_battery, accessory_battery, health_beauty, health_beauty_non_liquid, fashion, watches, home_appliances, home_decor, toys, sport, luggage, audio_video, documents, jewelry, dry_food_supplements, books_collectionables, pet_accessory, gaming |
declared_currency | string | Items customs value currency: See supported currencies Must be uppercase |
declared_customs_value | float | Items customs value |
Box definitions:
box object | type | description |
---|---|---|
length | float | Length of the box in cm |
width | float | Width of the box in cm |
height | float | Height of the box in cm |