createPriceListGroup
post
/ccadmin/v1/priceListGroups
Create a new PriceListGroup. **Requires the x-ccasset-language header so translated content can be set for a specific language.**
Request
Supported Media Types
- application/json
Query Parameters
-
includeAncestors(optional): boolean
If true, returns PriceListGroup's ancestor information in the response. Default is false.It can not be used to update base/ancestor price list groups. It is a read only property.
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request which is expressed as a supported locale code.
Root Schema : createPriceListGroup_request
Type:
Show Source
object
-
associatePriceListGroupToSite:
boolean
If true, this PLG will be associated to the site which is passed as part of query param (siteId). Else it will be associated to default site. If false it would not be associated with any site.
-
basePriceListGroup(optional):
object basePriceListGroup
The base price list group of this price list group.
-
displayName:
string
The display name of the PriceListGroup.
-
endDate(optional):
string
End date of the associated price lists
-
id:
string
Id to create PriceListGroup with.
-
includeAllProducts(optional):
boolean
If true, and active flag is also set to true then list price is mandatory for all products. This flag will automatically be set to false for child price list groups and cannot be update.
-
isTaxIncluded(optional):
boolean
Indicates whether prices are inclusive of tax. If the basePriceListGroup is passed, the isTaxIncluded will always be overridden by its isTaxIncluded.
-
locale:
string
The locale with which the PriceListGroup is to be created. If the basePriceListGroup is passed, the locale will always be overridden by its locale.
-
startDate(optional):
string
Start date of the associated price lists
-
taxCalculationType(optional):
string
Indicates how tax calls are made based on the price list group setting. For a monetary price list group, the possible values are calculateTax and doNotCalculateTax with default being calculateTax. For a point based price list group, the possible values are doNotCalculateTax, calculateTaxWithCurrencyConversion and calculateTaxWithoutCurrencyConversion with default being doNotCalculateTax. If the base price list group is passed, the taxCalculationType will always be overridden by its taxCalculationType.
Example:
{
"isTaxIncluded":false,
"taxCalculationType":"calculateTax",
"displayName":"Canadian Dollar",
"id":"canadianDollar",
"locale":"en_CA",
"basePriceListGroup":{
"id":"canadianDollarSale"
},
"includeAllProducts":true,
"associatePriceListGroupToSite":true
}
Nested Schema : basePriceListGroup
Type:
object
The base price list group of this price list group.
Show Source
-
id(optional):
string
Repository ID of the base price list group.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createPriceListGroup_response
Type:
Show Source
object
-
active(optional):
boolean
indicates if the PriceListGroup is active
-
basePriceListGroup(optional):
object basePriceListGroup
The base price list group of this price list group.
-
currency(optional):
object currency
The currency data.
-
deleted(optional):
boolean
indicates if the PriceListGroup is deleted
-
displayName(optional):
string
display name of the PriceListGroup
-
endDate(optional):
string
End date of the the associated list price list
-
id(optional):
string
The ID of the PriceListGroup item
-
includeAllProducts(optional):
boolean
If true, indicates that all the products in the catalog should have prices for activation of the PLG
-
isPointsBased(optional):
boolean
If true, indicates the PriceListGroup was created with a point based currency
-
isTaxIncluded(optional):
boolean
Indicates whether prices are inclusive of tax.
-
listPriceList(optional):
object listPriceList
The price list for list prices
-
locale(optional):
string
locale of the the associated list price list
-
repositoryId(optional):
string
The ID of the PriceListGroup item
-
salePriceList(optional):
object salePriceList
The price list for sale prices
-
shippingSurchargePriceList(optional):
object shippingSurchargePriceList
The price list for shipping surcharge prices
-
startDate(optional):
string
Start date of the the associated list price list
-
taxCalculationType(optional):
string
Indicates how tax calls are made based on the PriceListGroup setting. For a monetary PriceListGroup, the possible values are calculateTax and doNotCalculateTax. For a point based PriceListGroup, the possible values are doNotCalculateTax, calculateTaxWithCurrencyConversion and calculateTaxWithoutCurrencyConversion.
Nested Schema : basePriceListGroup
Type:
object
The base price list group of this price list group.
Show Source
-
displayName(optional):
string
Name of the base price list group.
-
id(optional):
string
Repository ID of the base price list group.
Nested Schema : currency
Type:
object
The currency data.
Show Source
-
currencyCode(optional):
string
The currency Code of the currency
-
displayName(optional):
string
The display Name of the currency
-
fractionalDigits(optional):
string
The currency Code of the currency
-
numericCode(optional):
string
The numeric Code of the currency
-
repositoryId(optional):
string
The repository Id of the currency
-
symbol(optional):
string
The symbol of the currency
Nested Schema : listPriceList
Type:
object
The price list for list prices
Show Source
-
repositoryId(optional):
string
Repository ID
Nested Schema : salePriceList
Type:
object
The price list for sale prices
Show Source
-
repositoryId(optional):
string
Repository ID
Nested Schema : shippingSurchargePriceList
Type:
object
The price list for shipping surcharge prices
Show Source
-
repositoryId(optional):
string
Repository ID
Example Response (application/json)
{
"isTaxIncluded":false,
"endDate":null,
"displayName":"Canadian Dollar",
"listPriceList":{
"repositoryId":"canadianDollar_listPrice"
},
"active":false,
"isPointsBased":false,
"basePriceListGroup":{
"displayName":"Canadian Dollar Sale",
"id":"canadianDollarSale"
},
"locale":"en_US",
"shippingSurchargePriceList":{
"repositoryId":"canadianDollar_shippingSurchargePrice"
},
"deleted":false,
"taxCalculationType":"calculateTax",
"repositoryId":"CanadianDollar",
"currency":{
"symbol":"$",
"displayName":"Canadian Dollar",
"repositoryId":"en_CA",
"fractionalDigits":2,
"currencyCode":"CAD",
"numericCode":"840"
},
"links":[
{
"rel":"self",
"href":"/priceListGroups"
}
],
"salePriceList":{
"repositoryId":"canadianDollar_salePrice"
},
"id":"canadianDollar",
"includeAllProducts":true,
"startDate":null
}
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|
|------------------|------------------|
|20212|There was an error creating price list group|
|20211|PriceListGroup with ID: {0} already exists|
|20210|There was an error creating the price list|
|13037|Missing required property: id|
|13036|Locale key is not valid|
|99000|The ID "**78" is invalid|
|20206|price list group with display name: {0} already exists|
|20217|The selected parent price list group is not found or is invalid.|
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