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:
stringRequired:trueThe id of the shipping method to update.
Header Parameters
- X-CCAsset-Language
-
Type:
stringRequired:trueThe asset language of the request
Body Parameter
Root Schema : updateShippingMethod_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"
}
]
}
- associatedPriceListGroups
-
Type:
arrayassociatedPriceListGroupsAdditional Properties Allowed:The Price list group for shipping method - displayName
-
Type:
stringThe display name for the shipping method. - displaySequence
-
Type:
integerUsed to determine the ordering of shipping methods in the UI. Defaults to N+1 where N is the highest value of any existing shippingMethod's displaySequence. - eligibleForProductWithSurcharges
-
Type:
booleanWhether this shipping method is enabled for products with surcharges or not. Defaults to false. - enabled
-
Type:
booleanWhether this shipping method is enabled or not. Defaults to true. - name
-
Type:
stringThe internal name for the shipping method. - ranges
-
Type:
arrayrangesAdditional Properties Allowed:The price ranges for this shipping method. - shippingCalculator
-
Type:
stringA valid key for the available calculator types. - shippingGroupType
-
Type:
stringThe shipping group type of the shipping method. - shipToLocations
-
Type:
arrayshipToLocationsAdditional Properties Allowed:The Shipping Regions for a Shipping Method - taxCode
-
Type:
stringA valid tax code for calculating tax on shipping.
Nested Schema : associatedPriceListGroups
Nested Schema : ranges
Nested Schema : shipToLocations
Nested Schema : items
Type:
object- amount
-
Type:
numberRequired:trueThe monetary value for the range. - high
-
Type:
numberThe upper boundary of the range. - low
-
Type:
numberThe lower boundary of the range.
Nested Schema : items
Type:
object- shippingRegion
-
Type:
stringRequired:trueThe name of a Shipping Region
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateShippingMethod_response
- associatedPriceListGroups
-
Type:
arrayassociatedPriceListGroupsAdditional Properties Allowed:The associated Price list groups for this Shipping Method. - description
-
Type:
stringThe description of the shipping method - displayName
-
Type:
stringThe display name for the shipping method given the current locale. - displaySequence
-
Type:
integerUsed to determine the ordering of shipping methods in the UI. Lower values should appear first in any ordered list. - eligibleForProductWithSurcharges
-
Type:
booleanWhether this shipping method is enabled for products with surcharges or not. Defaults to false. - enabled
-
Type:
booleanWhether this shipping method is enabled or not. - name
-
Type:
stringThe internal name for the shipping method. - ranges
-
Type:
arrayrangesAdditional Properties Allowed:The price ranges for this shipping method. - repositoryId
-
Type:
stringThe id of the update shipping method item. - shippingCalculator
-
Type:
stringA valid key for the available calculator types. - shippingGroupType
-
Type:
stringThe shipping group type of the shipping method. - shipToLocations
-
Type:
arrayshipToLocationsAdditional Properties Allowed:The Shipping Regions for this Shipping Method. - taxCode
-
Type:
stringA valid tax code for calculating tax on shipping. - type
-
Type:
integerThe type of shipping method
Nested Schema : associatedPriceListGroups
Nested Schema : ranges
Nested Schema : shipToLocations
Nested Schema : items
Type:
object- active
-
Type:
booleanIf the price list group is active. - currency
-
Type:
objectcurrencyAdditional Properties Allowed:The currency of the price list group. - deleted
-
Type:
booleanIf the price list deleted - displayName
-
Type:
stringThe display name of the price list group. - id
-
Type:
stringThe id of the price list group. - locale
-
Type:
stringThe locale associated - repositoryId
-
Type:
stringThe repository Id of the price list group.
Nested Schema : currency
Type:
objectThe currency of the price list group.
- repositoryId
-
Type:
stringThe repository ID of the currency.
Nested Schema : items
Type:
object- amount
-
Type:
numberThe monetary value for the range. - high
-
Type:
numberThe upper boundary of the range. - low
-
Type:
numberThe lower boundary of the range. - repositoryId
-
Type:
stringThe repository id of this priceRange item.
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringThe repository ID of the shipping region. - shippingCountryRegion
-
Type:
arrayshippingCountryRegionAdditional Properties Allowed:The shipping country region. - shippingRegionName
-
Type:
stringThe shipping region name.
Nested Schema : shippingCountryRegion
Nested Schema : items
Type:
objectNested Schema : country
Type:
objectThe shipping country.
- repositoryId
-
Type:
stringThe repository ID of the country.
Nested Schema : regions
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringThe repository ID of the region.
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- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
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"}
]
}