updateShippingRegion
put
/ccadmin/v1/shippingRegions/{id}
Update Shipping Region. Updates a Shipping Region based on request parameters.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The ID of the shipping region to be updated.
Body Parameter
Root Schema : updateShippingRegion_request
{
"shippingRegionName":"NorthUS",
"shippingCountryRegion":{
"regions":[
{
"repositoryId":"US-AL"
}
],
"repositoryId":"US"
}
}
- repositoryId
-
Type:
string
Required:true
Repository Id of Shipping Region. - shippingCountryRegion
-
Type:
array
shippingCountryRegionRequired:true
Additional Properties Allowed:Repository Id of the region. - shippingRegionName
-
Type:
string
Required:true
Name of the Shipping Region.
Nested Schema : shippingCountryRegion
Nested Schema : items
Type:
object
- regions
-
Type:
array
regionsAdditional Properties Allowed:The list of all Shipping Regions. - repositoryId
-
Type:
string
Required:true
Repository Id of shipping Country Region.
Nested Schema : regions
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Required:true
The Repository Id of the specific region.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateShippingRegion_response
- repositoryId
-
Type:
string
The Repository Id of the Shipping Region. - shippingCountryRegion
-
Type:
array
shippingCountryRegionAdditional Properties Allowed:The list of all regions of a country in the Shipping region. - shippingRegionName
-
Type:
string
Name of the Shipping Region.
Nested Schema : shippingCountryRegion
Nested Schema : items
Type:
object
Nested Schema : country
Nested Schema : regions
Nested Schema : items
Type:
object
- countryCode
-
Type:
string
The code of the country in the Shipping Region. - displayName
-
Type:
string
The name of the country. - repositoryId
-
Type:
string
The repository Id of country.
Nested Schema : items
Type:
object
- abbreviation
-
Type:
string
The region code in abbreviated form. Usually a 2 letter country code - displayName
-
Type:
string
The name of the specific region. - regionCode
-
Type:
string
The code of the specific Region. - repositoryId
-
Type:
string
The Repository Id of the specific region.
Example application/json
{
"shippingRegions":[
{
"repositoryId":"NorthUS",
"shippingRegionName":"NorthUS",
"shippingCountryRegion":[
{
"country":{
"countryCode":"US",
"displayName":"United States",
"repositoryId":"US"
},
"regions":[
{
"regionCode":"US-AL",
"displayName":"Alabama",
"repositoryId":"US-AL",
"abbreviation":"AL"
}
],
"repositoryId":"100001"
}
]
}
]
}
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|
|------------------|------------------|
|31014|One or more region is invalid for country: {0}.|
|80012|Invalid shipping region details.|
|80018|Invalid or unsupported country name: {0}.|
|81014|Error updating shipping region|
|31018|Please enter a valid shipping region name.|
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:
{ "shippingRegionName": "NorthUS", "shippingCountryRegion": { "regions": [{"repositoryId": "US-AL"}], "repositoryId": "US" } }
Sample Response Payload returned by endpoint:
{"shippingRegions": [{ "repositoryId": "NorthUS", "shippingRegionName": "NorthUS", "shippingCountryRegion": [{ "country": { "countryCode": "US", "displayName": "United States", "repositoryId": "US" }, "regions": [{ "regionCode": "US-AL", "displayName": "Alabama", "repositoryId": "US-AL", "abbreviation": "AL" }], "repositoryId": "100001" }] }]}