Create a shipping option (shipping cost)
Adds a shipping option to the table. See ShippingOptionInput for how rate_mode decides the price.
/shipping_tables/{shipping_table_id}/shipping_optionsAuthorizationBearer token (JWT) · headerrequiredshipping_table_idintegerrequiredapplication/jsonnamestringName shown to buyers at checkout. Required on create.
rate_modestringRequired on create.
flatby-weightby-stretchby-distanceby-weight-stepactivebooleancourierstring | nullexclusivebooleanWhen true, buyers in this option's regions/localities don't see broader options. Only for region or locality zones, and not overlapping another exclusive option of the table.
price_list_idinteger | nullOnly for orders with this price list. -1 any price list, -2 orders without a price list, null all orders.
base_rateintegerrate_per_kminteger | nullrate_per_weight_stepinteger | nullweight_step_in_grinteger | nullover_weight_amount_per_kgintegerAmount per extra kg over max_allowed_weight_in_gr (or the last rate). -1 means heavier orders can't use this option.
max_allowed_weight_in_grinteger | nullmin_days_to_deliveryinteger | nullBusiness days. Must be lower than max_days_to_delivery.
max_days_to_deliveryinteger | nullcutoff_timestring | nullavailability_schedule_idinteger | nullMust belong to the seller.
delivery_window_schedule_idinteger | nullMust belong to the seller.
polygon_set_idinteger | nullPolygon set limiting the zone. Must belong to the seller.
polygons_exclude_modebooleanExclude (instead of include) the polygon set area.
shipping_zonesShippingZone[]Zones covered, all at the same level: country (only country_code), region
(country_code + region_code, one country) or locality (all three, one
country and region). Required on create; on update it replaces the zones.
Show propertiesHide properties
ShippingZonecountry_codestringrequiredISO 3166 alpha-2 country code (upcased on input)
region_codestring | nullRegion code within the country. Set it on every zone for a region-level option.
locality_idinteger | nullLocality (comuna) ID. Set it on every zone for a locality-level option.
shipping_ratesShippingRate[]Only for by-weight and by-stretch (required for them on create, or when switching to them). On update it replaces all rates.
Show propertiesHide properties
ShippingRatetonumberrequiredUpper bound of the range, in grams (by-weight) or km (by-stretch). Ranges start at 0 or at the previous to.
amountintegerrequiredAmount charged for the range, in the seller's currency.
{
"name": "Envío a Santiago",
"rate_mode": "flat",
"base_rate": 3990,
"courier": "Starken",
"min_days_to_delivery": 1,
"max_days_to_delivery": 3,
"shipping_zones": [
{
"country_code": "CL",
"region_code": "RM"
}
]
}{
"name": "Envío por peso",
"rate_mode": "by-weight",
"shipping_zones": [
{
"country_code": "CL",
"region_code": "RM",
"locality_id": 13101
},
{
"country_code": "CL",
"region_code": "RM",
"locality_id": 13114
}
],
"shipping_rates": [
{
"to": 1000,
"amount": 2500
},
{
"to": 5000,
"amount": 4500
}
]
}Shipping option created
namestringName shown to buyers at checkout. Required on create.
rate_modestringRequired on create.
flatby-weightby-stretchby-distanceby-weight-stepactivebooleancourierstring | nullexclusivebooleanWhen true, buyers in this option's regions/localities don't see broader options. Only for region or locality zones, and not overlapping another exclusive option of the table.
price_list_idinteger | nullOnly for orders with this price list. -1 any price list, -2 orders without a price list, null all orders.
base_rateintegerrate_per_kminteger | nullrate_per_weight_stepinteger | nullweight_step_in_grinteger | nullover_weight_amount_per_kgintegerAmount per extra kg over max_allowed_weight_in_gr (or the last rate). -1 means heavier orders can't use this option.
max_allowed_weight_in_grinteger | nullmin_days_to_deliveryinteger | nullBusiness days. Must be lower than max_days_to_delivery.
max_days_to_deliveryinteger | nullcutoff_timestring | nullavailability_schedule_idinteger | nullMust belong to the seller.
delivery_window_schedule_idinteger | nullMust belong to the seller.
polygon_set_idinteger | nullPolygon set limiting the zone. Must belong to the seller.
polygons_exclude_modebooleanExclude (instead of include) the polygon set area.
shipping_zonesShippingZone[]Zones covered, all at the same level: country (only country_code), region
(country_code + region_code, one country) or locality (all three, one
country and region). Required on create; on update it replaces the zones.
Show propertiesHide properties
ShippingZoneidintegercountry_codestringrequiredISO 3166 alpha-2 country code (upcased on input)
region_codestring | nullRegion code within the country. Set it on every zone for a region-level option.
locality_idinteger | nullLocality (comuna) ID. Set it on every zone for a locality-level option.
shipping_ratesShippingRate[]Only for by-weight and by-stretch (required for them on create, or when switching to them). On update it replaces all rates.
Show propertiesHide properties
ShippingRateidintegertonumberrequiredUpper bound of the range, in grams (by-weight) or km (by-stretch). Ranges start at 0 or at the previous to.
amountintegerrequiredAmount charged for the range, in the seller's currency.
_linksHalLinksidintegershipping_table_idintegercreated_atstring<date-time>updated_atstring<date-time>_embeddedobjectShow propertiesHide properties
shipping_zonesShippingZone[]Show propertiesHide properties
ShippingZoneidintegercountry_codestringrequiredISO 3166 alpha-2 country code (upcased on input)
region_codestring | nullRegion code within the country. Set it on every zone for a region-level option.
locality_idinteger | nullLocality (comuna) ID. Set it on every zone for a locality-level option.
shipping_ratesShippingRate[]Show propertiesHide properties
ShippingRateidintegertonumberrequiredUpper bound of the range, in grams (by-weight) or km (by-stretch). Ranges start at 0 or at the previous to.
amountintegerrequiredAmount charged for the range, in the seller's currency.
Access denied
Validation errors, e.g. missing shipping_zones, zones at mixed levels,
shipping_rates missing for by-weight/by-stretch (or sent for another mode),
base_rate 0 on a flat option, or a price_list_id/schedule/polygon set of another seller.