updateShippingMethod

put

/ccadmin/v1/shippingMethods/{id}

Update Shipping Method. Update a shipping method based on ID and request parameters. The properties omitted will not be updated. **Requires the x-ccasset-language header so translated content can be set for a specific language.**

Request

Supported Media Types
  • application/json
Path Parameters
id
Type: string
Required: true
The id of the shipping method to update.
Header Parameters
X-CCAsset-Language
Type: string
Required: true
The asset language of the request
Body Parameter
Root Schema : updateShippingMethod_request
Nested Schema : associatedPriceListGroups
Type: array
The Price list group for shipping method
Nested Schema : ranges
Type: array
The price ranges for this shipping method.
Nested Schema : shipToLocations
Type: array
The Shipping Regions for a Shipping Method
Nested Schema : items
Type: object
Nested Schema : items
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateShippingMethod_response
Nested Schema : associatedPriceListGroups
Type: array
The associated Price list groups for this Shipping Method.
Nested Schema : ranges
Type: array
The price ranges for this shipping method.
Nested Schema : shipToLocations
Type: array
The Shipping Regions for this Shipping Method.
Nested Schema : items
Type: object
Nested Schema : currency
Type: object
The currency of the price list group.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : shippingCountryRegion
Type: array
The shipping country region.
Nested Schema : items
Type: object
Nested Schema : country
Type: object
The shipping country.
Nested Schema : regions
Type: array
The regions in the shipping country.
Nested Schema : items
Type: object
Example application/json

{
    "eligibleForProductWithSurcharges":false,
    "shippingCalculator":"priceRange",
    "ranges":[
        {
            "amount":50,
            "high":null,
            "low":0,
            "repositoryId":"100004"
        }
    ],
    "associatedPriceListGroups":[
        {
            "displayName":"UsDollar",
            "listPriceList":{
                "repositoryId":"listPrices"
            },
            "repositoryId":"UsDollar",
            "active":true,
            "salePriceList":{
                "repositoryId":"salePrices"
            },
            "currency":{
                "symbol":"$",
                "displayName":"US Dollar",
                "repositoryId":"en_US",
                "fractionalDigits":2,
                "currencyCode":"USD",
                "numericCode":"840"
            },
            "id":"UsDollar",
            "locale":"en_US",
            "shippingSurchargePriceList":{
                "repositoryId":"shippingSurchargePrices"
            }
        }
    ],
    "displayName":"Sea transport",
    "description":"sea transport",
    "type":0,
    "taxCode":"abcd",
    "shippingGroupType":"hardgoodShippingGroup",
    "enabled":true,
    "displaySequence":4,
    "repositoryId":"100002",
    "shipToLocations":[
        {
            "repositoryId":"SouthUS"
        },
        {
            "repositoryId":"NorthUS"
        }
    ]
}
Default Response
The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |31005|{0} is not valid price list group| |31010|For any validation error with input data| |31011|Internal error when updating a shipping method| |31018|The Shipping Region {0} does not exist|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Request:

{
  "eligibleForProductWithSurcharges": false,
  "ranges": [{
    "amount": "50.00",
    "high": null,
    "low": 0
  }],
  "associatedPriceListGroups": ["UsDollar"],
  "shippingCharges": "valid",
  "displayName": "Sea transport",
  "repositoryId": "100002",
  "description": "sea transport",
  "taxCode": "abcd",
  "enabled": true,
  "shipToLocations": [
    {"shippingRegion": "SouthUS"},
    {"shippingRegion": "NorthUS"}
  ]
}

Sample Response Payload returned by endpoint:

{
  "eligibleForProductWithSurcharges": false,
  "shippingCalculator": "priceRange",
  "ranges": [{
    "amount": 50,
    "high": null,
    "low": 0,
    "repositoryId": "100004"
  }],
  "associatedPriceListGroups": [{
    "displayName": "UsDollar",
    "listPriceList": {"repositoryId": "listPrices"},
    "repositoryId": "UsDollar",
    "active": true,
    "salePriceList": {"repositoryId": "salePrices"},
    "currency": {
      "symbol": "$",
      "displayName": "US Dollar",
      "repositoryId": "en_US",
      "fractionalDigits": 2,
      "currencyCode": "USD",
      "numericCode": "840"
    },
    "id": "UsDollar",
    "locale": "en_US",
    "shippingSurchargePriceList": {"repositoryId": "shippingSurchargePrices"}
  }],
  "displayName": "Sea transport",
  "description": "sea transport",
  "type": 0,
  "taxCode": "abcd",
  "shippingGroupType": "hardgoodShippingGroup",
  "enabled": true,
  "displaySequence": 4,
  "repositoryId": "100002",
  "shipToLocations": [
    {"repositoryId": "SouthUS"},
    {"repositoryId": "NorthUS"}
  ]
}