In our terminology, a shipping type defines the way Spreadshirt delivers an ordered item to a customer. Depending on whether the customer ordered a real item, like a t-shirt, or a virtual item, like a gift certificate, we either need to ship the item using a standard carrier, like Deutsche Post or UPS, or we can send it using e-mail.
List of available shipping types
This resource will list all available shipping types for the given shop.
Detailed information about a shipping type
A shipping type has right now the following characteristics:
- Each shipping type has a name and a description, that can be used for displaying shipping type information in a client application. For shipping types that denote a shipping of a real item with a standard carrier, there are the available shipping countries and the shipping regions with the shipping costs for different order values defined.
- Shipping Country: A shipping country is a country that Spreadshirt ships items to using the specified standard carries, like UPS. A shipping country has a name that can be used for displaying country information in a client application. It also links to a specific shipping region that contains the actual shipping costs for different order values.
- Shipping Region: A shipping region contains the shipping costs for different order value ranges for a set of shipping countries, like France or United Kingdom if your country of delivery is Germany. Each order value range defines a from *order value (lower bound), like 0.00 €, and might define a *to order value (upper bound), like 24.89 € or unbound (undefined). Depending on the order value of the order, the shipping costs of the matching order value range apply.
Determining Shipping Costs
Keep in mind that for an existing basket, the basket resource already contains the assumed shipping costs. If you want to display shipping costs beforehand, it is possible to evaluate the ruleset shown above as follows:
The order value for the shipping cost calculation is always calculated based on a sellable's price and a sellable's product type. Each product type has a shipping factor between 0 and 1 (0-100%) that defines to which part the sellable price is used to calculate the order value. 0 means it is not used and 1 means the full sellable price is used for order value calculation. With the calculated order value, we now only need to find the right shipping region for the country we want to ship to and identify the shipping costs by finding the matching order value range for the shipping region.
Let’s assume we have an order with 2 x Bud Spencer t-shirts (sellables at 12.90 € each) that we want to ship to Germany with the standard shipping type, which means we use shipping type 1, shipping country 148 and shipping region 1. The shipping factor is 1 for that product type. Based on that data the order value calculation is as follows:
Using the hypothetical shipping cost order value ranges defined for shipping region 1,
the shipping costs for the basket in our example are 3.90 €.