createShippingMethod
post
/ccadmin/v1/shippingMethods
Create Shipping Method. Create a new shipping method based on request parameters. **Requires the x-ccasset-language header so translated content can be set for a specific language.**
Request
Supported Media Types
- application/json
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
Root Schema : createShippingMethod_request
Type:
Show Source
object
-
associatedPriceListGroups(optional):
array associatedPriceListGroups
The Price list group for shipping method
-
description(optional):
string
The description of the shipping method.
-
displayName:
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:
string
The internal name for the shipping method.
-
ranges:
array ranges
The price ranges for this shipping method.
-
shippingCalculator:
string
A valid key for the available calculator types.
-
shippingGroupType:
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,
"shippingCalculator":"priceRange",
"isExternallyPriced":true,
"ranges":[
{
"amount":"50.00",
"high":null,
"low":0
}
],
"associatedPriceListGroups":[
"UsDollar"
],
"displayName":"Sea",
"externalId":"id12345",
"description":"sea",
"taxCode":"abcd",
"enabled":true,
"internalName":"Internal Name",
"name":"Sea",
"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.
Nested Schema : items
Type:
Show Source
object
-
shippingRegion:
string
The name of a Shipping Region
-
shippingRegionName:
string
The shipping region name.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createShippingMethod_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.
-
eligibleForProductsWithSurcharges(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 newly created shipping method item.
-
shippingCalculator(optional):
string
A valid key for the available calculator types.
-
shippingGroupType(optional):
string
The internal name for 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.
Example Response (application/json)
{
"eligibleForProductWithSurcharges":false,
"shippingCalculator":"priceRange",
"isExternallyPriced":false,
"ranges":[
{
"amount":50,
"high":null,
"low":0,
"repositoryId":"100003"
}
],
"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",
"externalId":"id12345",
"description":"sea",
"type":0,
"taxCode":"abcd",
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"internalName":"Internal Name",
"displaySequence":4,
"repositoryId":"100002",
"isFallback":false,
"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|
|31001|Internal error when creating new shipping method.|
|31000|For any validation error with input data.|
|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