Update a shipping method in settings
Changes a shipping method. The body is checked as a whole method, so send description, countries and one set of rules every time, even if you change only one field. The method_id stays the same. 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.
method_id*stringThe shipping method ID.
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 shipping method, after the change.
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/string' \ -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" } ] } ]}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.
Delete a shipping method in settings DELETE
Removes a shipping method from the shipping settings. This cannot be undone. It does not change the methods under `/shipping_methods`, which are the ones shoppers pick from. Secret and trusted tokens may call it when their permissions allow deletes on `settings_shipping`. Limited tokens may not.