Each item in the Dreamship catalog has its own Shipping data in terms of deliverability and cost.
In the past, Dreamship has used ship_zone
objects on the Item to communicate this data. Moving forward, Dreamship will simplify the data contained in a Ship Zone object by providing Shipping JSON object endpoints.
There are two endpoints on every item that can be called that return JSON objects. The us-shipping-methods
endpoint returns results for all US states and territories, and the international-shipping-methods
endpoint returns results for all countries. If a country or state does not include any methods
, it can be assumed that it is not deliverable any any way.
Both sets of codes use the ISO 3166-2 format.
US Shipping
Endpoint: items/{item.id}/us-shipping-methods
{
...
'code': 'CA',
'name': 'California',
'methods': [
{
'cost': 0.0,
'method': 'economy',
'delivery_days_max': 8,
'delivery_days_min': 4
},
{
'cost': 12.0,
'method': 'express',
'delivery_days_max': 3,
'delivery_days_min': 2
}
],
...
}
International Shipping
Endpoint: items/{item.id}/international-shipping-methods
{
...
'GB': {
'code': 'GB',
'name': 'United Kingdom',
'methods': [
{
'cost': 6.0,
'method': 'economy',
'delivery_days_max': 21,
'delivery_days_min': 7
}
],
},
...
}