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
{
"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:
array
associatedPriceListGroupsAdditional Properties Allowed:The Price list group for shipping method - displayName
-
Type:
string
The display name for the shipping method. - displaySequence
-
Type:
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
-
Type:
boolean
Whether this shipping method is enabled for products with surcharges or not. Defaults to false. - enabled
-
Type:
boolean
Whether this shipping method is enabled or not. Defaults to true. - name
-
Type:
string
The internal name for the shipping method. - ranges
-
Type:
array
rangesAdditional Properties Allowed:The price ranges for this shipping method. - shippingCalculator
-
Type:
string
A valid key for the available calculator types. - shippingGroupType
-
Type:
string
The shipping group type of the shipping method. - shipToLocations
-
Type:
array
shipToLocationsAdditional Properties Allowed:The Shipping Regions for a Shipping Method - taxCode
-
Type:
string
A valid tax code for calculating tax on shipping.
Nested Schema : associatedPriceListGroups
Nested Schema : ranges
Nested Schema : shipToLocations
Nested Schema : items
Type:
object
- amount
-
Type:
number
Required:true
The monetary value for the range. - high
-
Type:
number
The upper boundary of the range. - low
-
Type:
number
The lower boundary of the range.
Nested Schema : items
Type:
object
- shippingRegion
-
Type:
string
Required:true
The 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:
array
associatedPriceListGroupsAdditional Properties Allowed:The associated Price list groups for this Shipping Method. - description
-
Type:
string
The description of the shipping method - displayName
-
Type:
string
The display name for the shipping method given the current locale. - displaySequence
-
Type:
integer
Used to determine the ordering of shipping methods in the UI. Lower values should appear first in any ordered list. - eligibleForProductWithSurcharges
-
Type:
boolean
Whether this shipping method is enabled for products with surcharges or not. Defaults to false. - enabled
-
Type:
boolean
Whether this shipping method is enabled or not. - name
-
Type:
string
The internal name for the shipping method. - ranges
-
Type:
array
rangesAdditional Properties Allowed:The price ranges for this shipping method. - repositoryId
-
Type:
string
The id of the update shipping method item. - shippingCalculator
-
Type:
string
A valid key for the available calculator types. - shippingGroupType
-
Type:
string
The shipping group type of the shipping method. - shipToLocations
-
Type:
array
shipToLocationsAdditional Properties Allowed:The Shipping Regions for this Shipping Method. - taxCode
-
Type:
string
A valid tax code for calculating tax on shipping. - type
-
Type:
integer
The type of shipping method
Nested Schema : associatedPriceListGroups
Nested Schema : ranges
Nested Schema : shipToLocations
Nested Schema : items
Type:
object
- active
-
Type:
boolean
If the price list group is active. - currency
-
Type:
object
currencyAdditional Properties Allowed:The currency of the price list group. - deleted
-
Type:
boolean
If the price list deleted - displayName
-
Type:
string
The display name of the price list group. - id
-
Type:
string
The id of the price list group. - locale
-
Type:
string
The locale associated - repositoryId
-
Type:
string
The repository Id of the price list group.
Nested Schema : currency
Type:
object
The currency of the price list group.
- repositoryId
-
Type:
string
The repository ID of the currency.
Nested Schema : items
Type:
object
- amount
-
Type:
number
The monetary value for the range. - high
-
Type:
number
The upper boundary of the range. - low
-
Type:
number
The lower boundary of the range. - repositoryId
-
Type:
string
The repository id of this priceRange item.
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
The repository ID of the shipping region. - shippingCountryRegion
-
Type:
array
shippingCountryRegionAdditional Properties Allowed:The shipping country region. - shippingRegionName
-
Type:
string
The shipping region name.
Nested Schema : shippingCountryRegion
Nested Schema : items
Type:
object
Nested Schema : country
Type:
object
The shipping country.
- repositoryId
-
Type:
string
The repository ID of the country.
Nested Schema : regions
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
The 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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"} ] }