Create simple rules
post
/fscmRestApi/resources/11.13.18.05/discountLists/{DiscountListId}/child/items/{DiscountListItemId}/child/simpleRules
Request
Path Parameters
-
DiscountListId(required): integer(int64)
Value that uniquely identifies the discount list.
-
DiscountListItemId(required): integer(int64)
Value that uniquely identifies the discount list item.
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
-
Upsert-Mode:
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
AdjustmentAmount: number
Title:
Adjustment AmountValue of the adjustment amount. -
AdjustmentBasis: string
Name of the basis for adjustment.
-
AdjustmentBasisId: integer
(int64)
Title:
Adjustment BasisValue that identifies the basis for adjustment. -
AdjustmentType: string
Name of the type of adjustment. A list of accepted values is defined in the lookup type ORA_QP_LINE_ADJ_TYPES.
-
AdjustmentTypeCode: string
Title:
Adjustment TypeMaximum Length:30Default Value:DISCOUNT_AMOUNTAbbreviation that identifies the type of adjustment. -
ApplyToRollup: string
Maximum Length:
30Value that identifies the rollup. -
ChargeSubtype: string
Subtype of charge for the pricing charge definition. Valid values include Price, Fee, and so on. A list of accepted values is defined in the lookup type ORA_QP_CHARGE_SUBTYPES.
-
ChargeSubtypeCode: string
Title:
Charge SubtypeMaximum Length:30Abbreviation that identifies the charge subtype in the discount list. -
ChargeType: string
Type of charge for the pricing charge definition. Valid values include Sale, Service, Restocking, and so on. A list of accepted values is defined in the lookup type ORA_QP_CHARGE_TYPES.
-
ChargeTypeCode: string
Title:
Charge TypeMaximum Length:30Abbreviation that identifies the type of charge in the discount list. -
EndDate: string
(date-time)
Title:
End DateDate when the rule becomes inactive. -
Name(required): string
Title:
NameMaximum Length:80Name of the rule for the discount list item. -
PricePeriodicity: string
Name of the price periodicity.
-
PricePeriodicityCode: string
Title:
Price PeriodicityMaximum Length:3Abbreviation that identifies the price periodicity in the discount list. -
PriceType: string
Type of price for the pricing charge definition. Valid values include One time and Recurring. A list of accepted values is defined in the lookup type ORA_QP_PRICE_TYPES.
-
PriceTypeCode: string
Title:
Price TypeMaximum Length:30Abbreviation that identifies the type of price in the discount list. -
PricingCurrencyCode: string
Title:
Pricing CurrencyMaximum Length:15Abbreviation that identifies the currency of the discount list. -
PricingTermId: integer
(int64)
Value that uniquely identifies the pricing term.
-
rulesDFF: array
Flexfields for Discount List Rules
Title:
Flexfields for Discount List RulesThe Flexfields for Discount List Rules resource associates descriptive flexfield segments and its values to a discount list rule. -
StartDate: string
(date-time)
Title:
Start DateDate when the rule becomes active.
Nested Schema : Flexfields for Discount List Rules
Type:
arrayTitle:
Flexfields for Discount List RulesThe Flexfields for Discount List Rules resource associates descriptive flexfield segments and its values to a discount list rule.
Show Source
Nested Schema : discountLists-items-simpleRules-rulesDFF-item-post-request
Type:
Show Source
object-
__FLEX_Context: string
Title:
Context ValueMaximum Length:150Descriptive flexfield context name for pricing terms. -
__FLEX_Context_DisplayValue: string
Title:
Context ValueContext Value -
PricingTermId: integer
(int64)
Value that uniquely identifies the pricing term to which the descriptive flexfields belong.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : discountLists-items-simpleRules-item-response
Type:
Show Source
object-
AdjustmentAmount: number
Title:
Adjustment AmountValue of the adjustment amount. -
AdjustmentBasis: string
Name of the basis for adjustment.
-
AdjustmentBasisId: integer
(int64)
Title:
Adjustment BasisValue that identifies the basis for adjustment. -
AdjustmentType: string
Name of the type of adjustment. A list of accepted values is defined in the lookup type ORA_QP_LINE_ADJ_TYPES.
-
AdjustmentTypeCode: string
Title:
Adjustment TypeMaximum Length:30Default Value:DISCOUNT_AMOUNTAbbreviation that identifies the type of adjustment. -
ApplyToRollup: string
Maximum Length:
30Value that identifies the rollup. -
ChargeSubtype: string
Subtype of charge for the pricing charge definition. Valid values include Price, Fee, and so on. A list of accepted values is defined in the lookup type ORA_QP_CHARGE_SUBTYPES.
-
ChargeSubtypeCode: string
Title:
Charge SubtypeMaximum Length:30Abbreviation that identifies the charge subtype in the discount list. -
ChargeType: string
Type of charge for the pricing charge definition. Valid values include Sale, Service, Restocking, and so on. A list of accepted values is defined in the lookup type ORA_QP_CHARGE_TYPES.
-
ChargeTypeCode: string
Title:
Charge TypeMaximum Length:30Abbreviation that identifies the type of charge in the discount list. -
CreatedBy: string
Read Only:
trueMaximum Length:64User who created the record. -
CreationDate: string
(date-time)
Read Only:
trueDate and time when the record was created. -
DiscountListId: integer
Read Only:
trueValue that uniquely identifies the discount list. -
DiscountListItemId: string
Read Only:
trueMaximum Length:255Value that uniquely identifies the discount list item. -
EndDate: string
(date-time)
Title:
End DateDate when the rule becomes inactive. -
LastUpdateDate: string
(date-time)
Read Only:
trueDate and time when the user most recently updated the record. -
LastUpdatedBy: string
Read Only:
trueMaximum Length:64User who most recently updated the record. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
Name: string
Title:
NameMaximum Length:80Name of the rule for the discount list item. -
PricePeriodicity: string
Name of the price periodicity.
-
PricePeriodicityCode: string
Title:
Price PeriodicityMaximum Length:3Abbreviation that identifies the price periodicity in the discount list. -
PriceType: string
Type of price for the pricing charge definition. Valid values include One time and Recurring. A list of accepted values is defined in the lookup type ORA_QP_PRICE_TYPES.
-
PriceTypeCode: string
Title:
Price TypeMaximum Length:30Abbreviation that identifies the type of price in the discount list. -
PricingCurrency: string
Read Only:
trueCurrency that the discount list uses. -
PricingCurrencyCode: string
Title:
Pricing CurrencyMaximum Length:15Abbreviation that identifies the currency of the discount list. -
PricingTermId: integer
(int64)
Value that uniquely identifies the pricing term.
-
rulesDFF: array
Flexfields for Discount List Rules
Title:
Flexfields for Discount List RulesThe Flexfields for Discount List Rules resource associates descriptive flexfield segments and its values to a discount list rule. -
StartDate: string
(date-time)
Title:
Start DateDate when the rule becomes active.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : Flexfields for Discount List Rules
Type:
arrayTitle:
Flexfields for Discount List RulesThe Flexfields for Discount List Rules resource associates descriptive flexfield segments and its values to a discount list rule.
Show Source
Nested Schema : link
Type:
Show Source
object-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : discountLists-items-simpleRules-rulesDFF-item-response
Type:
Show Source
object-
__FLEX_Context: string
Title:
Context ValueMaximum Length:150Descriptive flexfield context name for pricing terms. -
__FLEX_Context_DisplayValue: string
Title:
Context ValueContext Value -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
PricingTermId: integer
(int64)
Value that uniquely identifies the pricing term to which the descriptive flexfields belong.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Links
- rulesDFF
-
Parameters:
- DiscountListId:
$request.path.DiscountListId - DiscountListItemId:
$request.path.DiscountListItemId - PricingTermId3:
$request.path.PricingTermId3
The Flexfields for Discount List Rules resource associates descriptive flexfield segments and its values to a discount list rule. - DiscountListId:
Examples
This example describes how to create simple rules.
Example cURL Command
Use the following cURL command to submit a request on the REST resource.
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/discountLists/DiscountListId/child/items/DiscountListItemId/child/simpleRules"
Example Request Body
The following example includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.
{
"Name": "Discount Rule 11",
"PriceType": "One time",
"ChargeType": "Sale",
"ChargeSubtype": "Fee",
"PricePeriodicity": null,
"PricePeriodicityCode": null,
"AdjustmentType": "Discount amount",
"AdjustmentBasis": "QP_AdjBasisforListPrc",
"AdjustmentAmount": 10,
"StartDate": "2015-12-03T03:04:00+00:00",
"EndDate": "2015-12-09T03:04:00+00:00"
}
Example Response Body
The following example includes the contents of the response body in JSON format:
{
"PricingTermId": 300100170439023,
"Name": "Discount Rule 11",
"PriceType": "One time",
"PriceTypeCode": "ONE_TIME",
"ChargeType": "Sale",
"ChargeTypeCode": "ORA_SALE",
"ChargeSubtype": "Fee",
"ChargeSubtypeCode": "ORA_FEE",
"PricePeriodicity": null,
"PricePeriodicityCode": null,
"AdjustmentType": "Discount amount",
"AdjustmentTypeCode": "DISCOUNT_AMOUNT",
"AdjustmentBasis": "QP_AdjBasisforListPrc",
"AdjustmentBasisId": null,
"AdjustmentAmount": 10,
"StartDate": "2015-12-03T03:04:00+00:00",
"EndDate": "2015-12-09T03:04:00+00:00",
"PricingCurrency": "US Dollar",
"PricingCurrencyCode": "USD",
"ApplyToRollup": "N",
"CreatedBy": "PRICING_MGR_OPERATIONS",
"CreationDate": "2018-11-20T08:17:59.001+00:00",
"LastUpdateDate": "2018-11-20T08:18:01.334+00:00",
"LastUpdatedBy": "PRICING_MGR_OPERATIONS",
"DiscountListId": 300100170438948,
"DiscountListItemId": "300100170438987"
}