Update shipping methods

Once you create and populate non-navigable collections for products to exclude, configure the exclusion features through the createShippingMethod and updateShippingMethod endpoints, which contain the following array properties:

  • shippingMethodExclusions identifies the collections you want to exclude from the shipping method. All products in the specified collections and any child collections are excluded.
  • shippingChargeExclusions identifies the collections you want to exclude from shipping cost calculations. All products in the specified collections and any child collections are excluded from shipping cost calculations.

The following sample request updates the Ground shipping method to exclude products in two collections (gift wrap and electronic gift cards) from shipping cost calculations.

PUT /ccadmin/v1/shippingMethods/standardShippingMethod HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "shippingChargeExclusions": {
    "excludedCategoriesShippingCharge": [
      "catGW",
      "catDownloads"
    ]
  }
}

The following sample request updates the Next Day shipping method to exclude products in two collections (furniture and oversized).

PUT /ccadmin/v1/shippingMethods/overnightShippingMethod HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "shippingMethodExclusions": {
    "excludedCategories": [
      "catFurniture",
      "catOversized"    ]
 }
}