comecerodocs

Update a shipping method

POST
/shipping_methods/{shipping_method_id}

Changes a shipping method. Only the fields you send are changed, but the request is checked as a whole method: it must hold description, countries and exactly one of the three configs, even when you change only one of them. The id does not change. Secret and trusted tokens may call it.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

shipping_method_id*string

The shipping method id.

Query Parameters

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Request Body

The shipping method, with the fields to change.

application/json
  1. body

The fields of a shipping method. description, countries and exactly one of quantity_config, subtotal_config and weight_config are required, on update as well as on create.

description*string

The name shoppers see, for example Standard Shipping.

Lengthlength <= 75
details?|

More text shown with the method, such as delivery times.

Lengthlength <= 125
countries*array<string>

The two-letter ISO codes of the countries the method ships to, up to 50, or ["*"] for every country. * cannot be mixed with codes.

Items1 <= items <= 50
quantity_config?|

Prices by quantity, or null. Exactly one of the three configs must be set.

subtotal_config?|

Prices by subtotal, or null. Exactly one of the three configs must be set.

weight_config?|

Prices by weight, or null. Exactly one of the three configs must be set.

adjustments?array<>|

Extra charges for some regions, for example Alaska and Hawaii. Only for the United States and Canada, and only for countries in countries.

Response Body

The updated shipping method.

application/json
  1. response

A way to ship an order, with its price rules. Shoppers pick one at checkout from the methods that ship to their country.

object*"shipping_method"

The object type. Always shipping_method.

Value in"shipping_method"
url*string

The URL of this shipping method in the API.

Formaturi
shipping_method_id*string

The id of the shipping method, made from its description when it was created.

test*boolean

True for a test-mode shipping method.

account_id*string

The account the shipping method belongs to.

date_created*string

When the shipping method was created.

Formatdate-time
date_modified*string

When the shipping method was last changed.

Formatdate-time
description*string

The name shoppers see, for example Standard Shipping.

Lengthlength <= 75
details*|

More text shown with the method, such as delivery times.

Lengthlength <= 125
countries*array<string>

The two-letter ISO codes of the countries the method ships to, up to 50, or ["*"] for every country. * cannot be mixed with codes.

Items1 <= items <= 50
quantity_config*|

Prices by quantity, or null. Exactly one of the three configs must be set.

subtotal_config*|

Prices by subtotal, or null. Exactly one of the three configs must be set.

weight_config*|

Prices by weight, or null. Exactly one of the three configs must be set.

adjustments*array<>|

Extra charges for some regions, for example Alaska and Hawaii. Only for the United States and Canada, and only for countries in countries.

formatted?

Present only when you send formatted=true.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/shipping_methods/string' \  -H 'Content-Type: application/json' \  -d '{  "description": "Standard Shipping",  "details": "Arrives in 3 to 5 business days.",  "countries": [    "US"  ],  "subtotal_config": {    "rules": [      {        "currency": "USD",        "ranges": [          {            "minimum": 0,            "maximum": 49.99,            "price": 5          },          {            "minimum": 50,            "maximum": 999999,            "price": 0          }        ]      }    ]  }}'
Example Response
{  "object": "shipping_method",  "url": "https://api.comecero.com/api/v1/shipping_methods/Standard-Shipping",  "shipping_method_id": "Standard-Shipping",  "test": true,  "account_id": "AB1234",  "date_created": "2026-11-02T20:13:16Z",  "date_modified": "2026-11-02T20:13:16Z",  "description": "Standard Shipping",  "details": "Arrives in 3 to 5 business days.",  "countries": [    "US"  ],  "quantity_config": null,  "subtotal_config": {    "percent_of_subtotal": null,    "rules": [      {        "currency": "USD",        "ranges": [          {            "minimum": 0,            "maximum": 49.99,            "price": 5          },          {            "minimum": 50,            "maximum": 999999,            "price": 0          }        ]      }    ]  },  "weight_config": null,  "adjustments": null}