Create or update a product rule
put
https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagment/v1/productRule/{id}
Request
Path Parameters
-
id(required): string
The unique identifier of the resource item.
Supported Media Types
- application/json
Root Schema : ProductRules
Type:
object
Title:
ProductRules
Discriminator: @type
Discriminator Values
The Product Rule resource represents a set of rules and relationships.
Show Source
-
@baseType: string
-
@schemaLocation: string
-
@type: string
-
applicationName: string
name of the external application
-
created: string
(date-time)
Date and time of creation
-
createdBy: string
name of the person who created
-
customProfileSpec: array
customProfileSpec
-
description: string
-
externalId: string
id of the external application
-
href: string
-
id: string
Maximum Length:
30
-
lastUpdate: string
(date-time)
-
lastUpdatedBy: string
name of the person who updated
-
lifecycleStatus: string
-
name(required): string
-
project: object
ProjectRef
Title:
ProjectRef
Project Reference -
ruleCondition: array
ruleCondition
-
ruleSubType: string
Allowed Values:
[ { } ]
-
ruleType: string
Allowed Values:
[ "COMPATIBILITY", "ELIGIBILITY", "MIGRATION", "RECOMMENDATION", "CONSTRAINT" ]
-
scope: string
Allowed Values:
[ "ALL", "BUNDLE", "PACKAGE" ]
-
subject: object
SubjectRef
Title:
SubjectRef
Subject Reference -
version: string
-
versionState: number
Version state of the product rule
Nested Schema : customProfileSpec
Type:
Show Source
array
-
Array of:
object CustomProfileSpecRefOracle
Title:
CustomProfileSpecRefOracle
Custom Profile specification reference.
Nested Schema : ProjectRef
Type:
object
Title:
ProjectRef
Project Reference
Show Source
-
href: string
Unique reference of the project
-
id(required): string
Unique identifier of the project
-
name: string
Name of the project
-
version: string
Version of the project
Nested Schema : ruleCondition
Type:
Show Source
array
-
Array of:
object RuleConditionOracle
Title:
RuleConditionOracle
A product rule condition
Nested Schema : SubjectRef
Type:
object
Title:
SubjectRef
Subject Reference
Show Source
-
@baseType: string
Immediate base (class) type of the subject entity
-
@referredType: string
The actual type of the target instance when needed for disambiguation
-
entityPathExpression: string
Path represent the hierarchy of the component PO within the product offering(offer id along with the associated parents i.e package_Id.bundledPO_Id.atomicOffer_Id),which is used in the runtime system to identify the subject entity that may be used in some other packages.
-
href: string
Unique reference of the project
-
id(required): string
Unique identifier of the subject
-
name: string
Name of the project
Nested Schema : CustomProfileSpecRefOracle
Type:
object
Title:
CustomProfileSpecRefOracle
Custom Profile specification reference.
Show Source
-
@baseType: string
Indicates the base (class) type of this REST resource
-
@referredType: string
(Class) type of the referred custom Specification.
-
@schemaLocation: string
This field provides a link to the schema describing this REST resource
-
@type: string
Indicates the (class) type of customSpecificationRef.
-
href: string
Reference of the custom specification.
-
id(required): string
Unique identifier of the custom specification.
-
name: string
Name of the custom specification.
-
version: string
Version of the custom specification.
-
versionState: number
To hold the version state for the reference
Nested Schema : RuleConditionOracle
Type:
object
Title:
RuleConditionOracle
A product rule condition
Show Source
-
@baseType: string
The immediate base class type of the Product Rule
-
@schemaLocation: string
A link to the schema describing this Product Rule entity
-
@type: string
the class type of the Product Rule
-
description: string
A string. Description of the product rule.
-
id(required): string
A string. Unique identifier of the product rule.
-
name: string
A string. The name given to the product rule
-
productRuleExpression: array
productRuleExpression
-
productRuleResult: array
productRuleResult
-
roundingMethod: string
Rounding applicable to the product rule
-
stringExpression: string
Metering Expression applicable to the product rule
-
unitOfMeasure: string
Unit of Measure of Rules
-
validFor: object
TimePeriodOracle
Title:
TimePeriodOracle
Validity period of the related party
Nested Schema : productRuleExpression
Type:
Show Source
array
-
Array of:
object Discriminator: @type
Discriminator:
{ "propertyName":"@type", "mapping":{ "RuleExpressionOracle":"#/components/schemas/RuleExpressionOracle", "EntityRuleExpressionOracle":"#/components/schemas/EntityRuleExpressionOracle", "EligibilityRuleExpressionOracle":"#/components/schemas/EligibilityRuleExpressionOracle" } }
Nested Schema : productRuleResult
Type:
Show Source
array
-
Array of:
object Discriminator: @type
Discriminator:
{ "propertyName":"@type", "mapping":{ "RuleResultOracle":"#/components/schemas/RuleResultOracle", "RecommendationRuleResultOracle":"#/components/schemas/RecommendationRuleResultOracle", "MigrationRuleResultOracle":"#/components/schemas/MigrationRuleResultOracle" } }
Nested Schema : TimePeriodOracle
Type:
object
Title:
TimePeriodOracle
Validity period of the related party
Show Source
-
endDateTime: string
(date-time)
An instant of time, ending at the TimePeriod.
-
startDateTime: string
(date-time)
An instant of time, starting at the TimePeriod
Nested Schema : Discriminator: @type
Type:
object
Discriminator: @type
Discriminator Values
Nested Schema : Discriminator: @type
Type:
object
Discriminator: @type
Discriminator Values
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : ProductRules
Type:
object
Title:
ProductRules
Discriminator: @type
Discriminator Values
The Product Rule resource represents a set of rules and relationships.
Show Source
-
@baseType: string
-
@schemaLocation: string
-
@type: string
-
applicationName: string
name of the external application
-
created: string
(date-time)
Date and time of creation
-
createdBy: string
name of the person who created
-
customProfileSpec: array
customProfileSpec
-
description: string
-
externalId: string
id of the external application
-
href: string
-
id: string
Maximum Length:
30
-
lastUpdate: string
(date-time)
-
lastUpdatedBy: string
name of the person who updated
-
lifecycleStatus: string
-
name(required): string
-
project: object
ProjectRef
Title:
ProjectRef
Project Reference -
ruleCondition: array
ruleCondition
-
ruleSubType: string
Allowed Values:
[ { } ]
-
ruleType: string
Allowed Values:
[ "COMPATIBILITY", "ELIGIBILITY", "MIGRATION", "RECOMMENDATION", "CONSTRAINT" ]
-
scope: string
Allowed Values:
[ "ALL", "BUNDLE", "PACKAGE" ]
-
subject: object
SubjectRef
Title:
SubjectRef
Subject Reference -
version: string
-
versionState: number
Version state of the product rule
Nested Schema : customProfileSpec
Type:
Show Source
array
-
Array of:
object CustomProfileSpecRefOracle
Title:
CustomProfileSpecRefOracle
Custom Profile specification reference.
Nested Schema : ProjectRef
Type:
object
Title:
ProjectRef
Project Reference
Show Source
-
href: string
Unique reference of the project
-
id(required): string
Unique identifier of the project
-
name: string
Name of the project
-
version: string
Version of the project
Nested Schema : ruleCondition
Type:
Show Source
array
-
Array of:
object RuleConditionOracle
Title:
RuleConditionOracle
A product rule condition
Nested Schema : SubjectRef
Type:
object
Title:
SubjectRef
Subject Reference
Show Source
-
@baseType: string
Immediate base (class) type of the subject entity
-
@referredType: string
The actual type of the target instance when needed for disambiguation
-
entityPathExpression: string
Path represent the hierarchy of the component PO within the product offering(offer id along with the associated parents i.e package_Id.bundledPO_Id.atomicOffer_Id),which is used in the runtime system to identify the subject entity that may be used in some other packages.
-
href: string
Unique reference of the project
-
id(required): string
Unique identifier of the subject
-
name: string
Name of the project
Nested Schema : CustomProfileSpecRefOracle
Type:
object
Title:
CustomProfileSpecRefOracle
Custom Profile specification reference.
Show Source
-
@baseType: string
Indicates the base (class) type of this REST resource
-
@referredType: string
(Class) type of the referred custom Specification.
-
@schemaLocation: string
This field provides a link to the schema describing this REST resource
-
@type: string
Indicates the (class) type of customSpecificationRef.
-
href: string
Reference of the custom specification.
-
id(required): string
Unique identifier of the custom specification.
-
name: string
Name of the custom specification.
-
version: string
Version of the custom specification.
-
versionState: number
To hold the version state for the reference
Nested Schema : RuleConditionOracle
Type:
object
Title:
RuleConditionOracle
A product rule condition
Show Source
-
@baseType: string
The immediate base class type of the Product Rule
-
@schemaLocation: string
A link to the schema describing this Product Rule entity
-
@type: string
the class type of the Product Rule
-
description: string
A string. Description of the product rule.
-
id(required): string
A string. Unique identifier of the product rule.
-
name: string
A string. The name given to the product rule
-
productRuleExpression: array
productRuleExpression
-
productRuleResult: array
productRuleResult
-
roundingMethod: string
Rounding applicable to the product rule
-
stringExpression: string
Metering Expression applicable to the product rule
-
unitOfMeasure: string
Unit of Measure of Rules
-
validFor: object
TimePeriodOracle
Title:
TimePeriodOracle
Validity period of the related party
Nested Schema : productRuleExpression
Type:
Show Source
array
-
Array of:
object Discriminator: @type
Discriminator:
{ "propertyName":"@type", "mapping":{ "RuleExpressionOracle":"#/components/schemas/RuleExpressionOracle", "EntityRuleExpressionOracle":"#/components/schemas/EntityRuleExpressionOracle", "EligibilityRuleExpressionOracle":"#/components/schemas/EligibilityRuleExpressionOracle" } }
Nested Schema : productRuleResult
Type:
Show Source
array
-
Array of:
object Discriminator: @type
Discriminator:
{ "propertyName":"@type", "mapping":{ "RuleResultOracle":"#/components/schemas/RuleResultOracle", "RecommendationRuleResultOracle":"#/components/schemas/RecommendationRuleResultOracle", "MigrationRuleResultOracle":"#/components/schemas/MigrationRuleResultOracle" } }
Nested Schema : TimePeriodOracle
Type:
object
Title:
TimePeriodOracle
Validity period of the related party
Show Source
-
endDateTime: string
(date-time)
An instant of time, ending at the TimePeriod.
-
startDateTime: string
(date-time)
An instant of time, starting at the TimePeriod
Nested Schema : Discriminator: @type
Type:
object
Discriminator: @type
Discriminator Values
Nested Schema : Discriminator: @type
Type:
object
Discriminator: @type
Discriminator Values
400 Response
Your request couldn't be processed because it contains missing or invalid information, such as a validation error on an input field, a missing required value, and so forth.
Root Schema : Error
Type:
object
Title:
Show Source
Error
-
@schemaLocation: string
It provides a link to the schema describing a REST resource.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list)
-
message: string
Text that provide more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
Text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
url pointing to documentation describing the error
-
status: string
http error code extension like 400-2
401 Response
Your request isn't authorized. The authentication credentials included with this request are missing or invalid.
Root Schema : Error
Type:
object
Title:
Show Source
Error
-
@schemaLocation: string
It provides a link to the schema describing a REST resource.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list)
-
message: string
Text that provide more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
Text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
url pointing to documentation describing the error
-
status: string
http error code extension like 400-2
404 Response
Your request includes a resource URI that doesn't exist.
Root Schema : Error
Type:
object
Title:
Show Source
Error
-
@schemaLocation: string
It provides a link to the schema describing a REST resource.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list)
-
message: string
Text that provide more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
Text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
url pointing to documentation describing the error
-
status: string
http error code extension like 400-2
405 Response
HTTP action specified in the request (DELETE, GET, POST, PUT) isn't supported for this request URI.
Root Schema : Error
Type:
object
Title:
Show Source
Error
-
@schemaLocation: string
It provides a link to the schema describing a REST resource.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list)
-
message: string
Text that provide more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
Text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
url pointing to documentation describing the error
-
status: string
http error code extension like 400-2
500 Response
The server encountered something unexpected that prevented it from completing the request.
Root Schema : Error
Type:
object
Title:
Show Source
Error
-
@schemaLocation: string
It provides a link to the schema describing a REST resource.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list)
-
message: string
Text that provide more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
Text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
url pointing to documentation describing the error
-
status: string
http error code extension like 400-2
Examples
The following example shows how to create or update a product rule by submitting a PUT request on the REST resource using cURL.
cURL Command
curl -u username:password -X PUT https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule/{id} -H 'Content-Type: application/json' -D @put_productrule.json | json_pp
Example of Request Body
The following shows an example of the request body in JSON format.
{ "id": "RULE001212", "name": "RULE001212", "version": "1.0", "ruleType": "ELIGIBILITY", "lifecycleStatus": "In design", "project": { "id": "PSPChristmansInitiative", "name": "Christmas Initiative" }, "subject": { "id": "iPhone12Pro", "@referredType": "ProductOfferingOracle" }, "ruleCondition": [ { "id": "Condtion1", "name": "Rule condition1", "stringExpression": "(COUNTRY EQUALS INDIA) AND (CITY IN BANGALORE,MUMBAI,DELHI)", "validFor": { "startDateTime": "2021-05-06T03:50:48.000Z", "endDateTime": "2021-12-31T03:50:48.000Z" } }, { "id": "Condtion2", "name": "Rule condition2", "stringExpression": "(COUNTRY EQUALS INDIA) AND (CITY IN BANGALORE,MUMBAI,DELHI) AND (RETAIL_STORE_CODE IN_BETWEEN 2002100,3002100)", "validFor": { "startDateTime": "2021-05-06T03:50:48.000Z", "endDateTime": "2023-12-31T03:50:48.000Z" } } ] }
Example of Response Body
The following shows an example of the response body in JSON format.
200 OK