Shipping methods
The shipping method object and the allowed CRUD operations on the related resource endpoint
Shipping methods are used to provide customers with different delivery options.
Shipping methods are defined by currency and can be restricted to an active market (in the latter case the currency is inherited by the market's price list).
Set the
shipping_category
relationship if you want the shipping method to be available only if the items to be shipped belong to a specified shipping category.Set the
shipping_zone
relationship if you want the shipping method to be available only if the shipping address belongs to a specified shipping zone.Set the
stock_location
relationship if you want the shipping method to be available only if the items are shipped from a specific stock location.Specify a value for the
min_weight
and/ormax_weight
attributes (to do that also aunit_of_weight
must be defined) if you want the shipping method to be available only if the total weight of the items to be shipped falls within those values.
The total weight of the shipment is automatically calculated from the single weights of the items included (i.e. the weight
attribute of the SKUs to be shipped).
Shipping method cost
Free over amount
Each shipping method can have a price and can be free over a specific order's total amount. Set the use_subtotal
attribute to true
(default is false
) if you want to compare the free over amount with the order's subtotal and exclude other discount calculations (if any).
Shipping weight tiers
Set the proper value for the scheme
attribute (default is flat
) to define how you want to manage the shipping method cost:
flat
— the shipping method has a fixed price (equal to the value of theprice_amount_cents
attribute).weight_tiered
— the shipping method price is tiered based on the total weight of the items included in the shipment (a maximum of 5 tiers for each shipping method is currently supported). See shipping weight tiers to learn more.external
— the shipping method price is fetched from an external service which handles the custom calculation, overriding theprice_amount_cents
set at creation time (remember to specify theexternal_prices_url
when creating or updating the shipping method).
If a free_over_amount
was specified, it applies regardless of the tier. If a min_weight
and/or max_weight
value for the shipping method's availability was specified, only the tiers between those values will be considered.
Shipping cost cut-off
If you want to apply a custom shipping cost policy (e.g. charging your customers with one single shipping cost for the whole order) you can set to 0 the unit amount of some of the line items of type shipments
that are created when a shipping method is associated with an order's shipments. To do that, leverage the dedicated attribute at the market level.
Last updated