Create a shipping method in settings
Adds a shipping method to the shipping settings. Comecero sets its method_id from the description and countries. Give exactly one set of rules: quantity_rules, subtotal_rules or weight_rules. Gaps between ranges are closed when saved. Carts and invoices are not priced from these settings: shoppers only see the methods made with POST /shipping_methods. Secret and trusted tokens may call it when their permissions allow updates to settings_shipping. Limited tokens may not.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
application/json- body
A shipping method. Send description, countries and exactly one of quantity_rules, subtotal_rules or weight_rules. This is checked on update too, so an update must send them again.
description*stringThe name the shopper sees. Up to 75 characters.
length <= 75details?|More text for the shopper. Up to 125 characters.
length <= 125countries*array<string>Two-letter ISO country codes, up to 50, or * on its own for every country.
1 <= items <= 50quantity_rules?array<>Prices by item count.
subtotal_rules?array<>Prices by order subtotal.
weight_rules?array<>Prices by order weight.
adjustments?array<>|Extra charges for some US states or Canadian provinces.
The new shipping method.
application/json- response
One shipping method in the shipping settings: the countries it serves and how its price is worked out. A method has exactly one set of rules: by quantity, by order subtotal or by weight.
object?"settings_shipping.method"The object type. Always settings_shipping.method.
"settings_shipping.method"url?stringThe URL of this method.
urimethod_id?stringThe method ID. Comecero makes it from the description and countries when the method is created. It does not change after that.
description?stringThe name the shopper sees, such as Standard Shipping. Up to 75 characters.
length <= 75details?|More text for the shopper, such as delivery times. Up to 125 characters.
length <= 125countries?array<string>Two-letter ISO country codes the method ships to, up to 50. Or * on its own for every country.
1 <= items <= 50quantity_rules?array<>|Prices by the number of items in the order.
subtotal_rules?array<>|Prices by the order subtotal, one entry per currency.
weight_rules?array<>|Prices by the total weight of the order.
adjustments?array<>|Extra charges for some states or provinces, such as Alaska and Hawaii. Only for the United States and Canada.
formatted?Display text. Returned only when formatted=true.
curl -X POST 'https://api.comecero.com/api/v1/settings/shipping/methods' \ -H 'Content-Type: application/json' \ -d '{ "description": "Standard Shipping", "details": "Arrives in 3 to 5 business days.", "countries": [ "US" ], "subtotal_rules": [ { "currency": "USD", "ranges": [ { "minimum": 0, "maximum": 49.99, "price": 5 }, { "minimum": 50, "maximum": 999999, "price": 0 } ] } ]}'{ "object": "settings_shipping.method", "url": "https://api.comecero.com/api/v1/settings/shipping/methods/standard-shipping-us", "method_id": "standard-shipping-us", "description": "Standard Shipping", "details": "Arrives in 3 to 5 business days.", "countries": [ "US" ], "quantity_rules": null, "subtotal_rules": [ { "currency": "USD", "ranges": [ { "minimum": 0, "maximum": 49.99, "price": 5 }, { "minimum": 50, "maximum": 999999, "price": 0 } ] } ], "weight_rules": null, "adjustments": [ { "country": "US", "regions": [ "AK", "HI" ], "percentage": null, "amounts": [ { "price": 10, "currency": "USD" } ] } ]}List shipping methods in settings GET
Lists the shipping methods in the shipping settings. The list is offset-based and returns every method unless you set `limit`. Filter by `country` to get the methods that ship there. Settings are kept per mode: a test token works on the test settings, a live token on the live ones. Secret and trusted tokens may call it when their permissions include `settings_shipping`. Limited tokens may not.
Get a shipping method in settings GET
Returns one shipping method from the shipping settings. Secret and trusted tokens may call it when their permissions include `settings_shipping`. Limited tokens may not.