commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Shipping-method → Update ShippingMethod by Key

AI-generated

Summary

Update a Shipping-method in commercetools by specifying its unique key and current version, applying one or more update actions to modify its properties or configurations.

Inputs

  • Shipping-method Key (required) — The unique key identifying the Shipping-method to update.
  • Version (required) — The current version of the Shipping-method for optimistic concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply to the Shipping-method. When provided and not empty, this overrides the UI-based actions.
  • Actions (UI) — One or more UI-configured update actions such as adding/removing shipping rates or zones, changing active status, setting custom fields, and more.

Output shape

a single JSON object representing the updated Shipping-method

Returns the updated Shipping-method object as received from the commercetools API after applying the specified update actions. Requires specifying the correct current version to avoid update conflicts.

Examples

Example 1: Update Shipping-method name and make it default

Set 'Shipping-method Key' to the target key, 'Version' to the current version number, and use Actions (UI) to add 'ChangeName' with the new name and 'ChangeIsDefault' set to true.

Links

Discussion