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: string
The id of the shipping method to update.
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
Root Schema : updateShippingMethod_request
Type:
Show Source
object
-
associatedPriceListGroups(optional):
array associatedPriceListGroups
The Price list group for shipping method
-
displayName(optional):
string
The display name for the shipping method.
-
displaySequence(optional):
integer
Used 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(optional):
boolean
Whether this shipping method is enabled for products with surcharges or not. Defaults to false.
-
enabled(optional):
boolean
Whether this shipping method is enabled or not. Defaults to true.
-
externalId(optional):
string
External Id for the shipping method
-
internalName(optional):
string
Internal name for the shipping method.
-
isExternallyPriced(optional):
boolean
Whether this shipping method can be priced externally or not. Defaults to false.
-
isFallback(optional):
boolean
Use this shipping method when Commerce Cloud cannot connect to an external shipping service. Defaults to false.
-
name(optional):
string
The internal name for the shipping method.
-
ranges(optional):
array ranges
The price ranges for this shipping method.
-
shippingCalculator(optional):
string
A valid key for the available calculator types.
-
shippingGroupType(optional):
string
The shipping group type of the shipping method.
-
shipToLocations(optional):
array shipToLocations
The Shipping Regions for a Shipping Method
-
taxCode(optional):
string
A valid tax code for calculating tax on shipping.
Example:
{
"eligibleForProductWithSurcharges":false,
"isExternallyPriced":true,
"ranges":[
{
"amount":"50.00",
"high":null,
"low":0
}
],
"associatedPriceListGroups":[
"UsDollar"
],
"shippingCharges":"valid",
"displayName":"Sea transport",
"externalId":"externalId",
"description":"sea transport",
"taxCode":"abcd",
"enabled":true,
"internalName":"Internal Name",
"repositoryId":"100002",
"isFallback":false,
"shipToLocations":[
{
"shippingRegion":"SouthUS"
},
{
"shippingRegion":"NorthUS"
}
]
}
Nested Schema : associatedPriceListGroups
Type:
array
The Price list group for shipping method
Show Source
Nested Schema : items
Type:
Show Source
object
-
amount:
number
The monetary value for the range.
-
high(optional):
number
The upper boundary of the range.
-
low(optional):
number
The lower boundary of the range.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : updateShippingMethod_response
Type:
Show Source
object
-
associatedPriceListGroups(optional):
array associatedPriceListGroups
The associated Price list groups for this Shipping Method.
-
description(optional):
string
The description of the shipping method
-
displayName(optional):
string
The display name for the shipping method given the current locale.
-
displaySequence(optional):
integer
Used to determine the ordering of shipping methods in the UI. Lower values should appear first in any ordered list.
-
eligibleForProductWithSurcharges(optional):
boolean
Whether this shipping method is enabled for products with surcharges or not. Defaults to false.
-
enabled(optional):
boolean
Whether this shipping method is enabled or not.
-
externalId(optional):
string
External Id for the shipping method
-
internalName(optional):
string
Internal name for the shipping method.
-
isExternallyPriced(optional):
boolean
Whether this shipping method can be priced externally or not. Defaults to false.
-
isFallback(optional):
boolean
Use this shipping method when Commerce Cloud cannot connect to an external shipping service. Defaults to false.
-
name(optional):
string
The internal name for the shipping method.
-
ranges(optional):
array ranges
The price ranges for this shipping method.
-
repositoryId(optional):
string
The id of the update shipping method item.
-
shippingCalculator(optional):
string
A valid key for the available calculator types.
-
shippingGroupType(optional):
string
The shipping group type of the shipping method.
-
shipToLocations(optional):
array shipToLocations
The Shipping Regions for this Shipping Method.
-
taxCode(optional):
string
A valid tax code for calculating tax on shipping.
-
type(optional):
integer
The type of shipping method
Nested Schema : associatedPriceListGroups
Type:
array
The associated Price list groups for this Shipping Method.
Show Source
Nested Schema : shipToLocations
Type:
array
The Shipping Regions for this Shipping Method.
Show Source
Nested Schema : items
Type:
Show Source
object
-
active(optional):
boolean
If the price list group is active.
-
currency(optional):
object currency
The currency of the price list group.
-
deleted(optional):
boolean
If the price list deleted
-
displayName(optional):
string
The display name of the price list group.
-
id(optional):
string
The id of the price list group.
-
locale(optional):
string
The locale associated
-
repositoryId(optional):
string
The repository Id of the price list group.
Nested Schema : currency
Type:
object
The currency of the price list group.
Show Source
-
repositoryId(optional):
string
The repository ID of the currency.
Nested Schema : items
Type:
Show Source
object
-
amount(optional):
number
The monetary value for the range.
-
high(optional):
number
The upper boundary of the range.
-
low(optional):
number
The lower boundary of the range.
-
repositoryId(optional):
string
The repository id of this priceRange item.
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The repository ID of the shipping region.
-
shippingCountryRegion(optional):
array shippingCountryRegion
The shipping country region.
-
shippingRegionName(optional):
string
The shipping region name.
Nested Schema : items
Type:
Show Source
object
-
country(optional):
object country
The shipping country.
-
regions(optional):
array regions
The regions in the shipping country.
-
repositoryId(optional):
string
The repository ID of the shipping country region.
Nested Schema : country
Type:
object
The shipping country.
Show Source
-
repositoryId(optional):
string
The repository ID of the country.
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The repository ID of the region.
Example Response (application/json)
{
"eligibleForProductWithSurcharges":false,
"shippingCalculator":"priceRange",
"isExternallyPriced":false,
"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",
"externalId":"id12345",
"description":"sea transport",
"type":0,
"taxCode":"abcd",
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"internalName":"Internal Name",
"displaySequence":4,
"repositoryId":"100002",
"isFallback":false,
"shipToLocations":[
{
"repositoryId":"SouthUS"
},
{
"repositoryId":"NorthUS"
}
]
}
412 Response
ETag mismatch. Asset has been updated by another user.
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|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code