Create or update a product rule

put

https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagment/v1/productRule/{id}

Request

Path Parameters
Supported Media Types
Request Body - 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
Nested Schema : customProfileSpec
Type: array
Show Source
Nested Schema : ProjectRef
Type: object
Title: ProjectRef
Project Reference
Show Source
Nested Schema : ruleCondition
Type: array
Show Source
Nested Schema : SubjectRef
Type: object
Title: SubjectRef
Subject Reference
Show Source
Nested Schema : CustomProfileSpecRefOracle
Type: object
Title: CustomProfileSpecRefOracle
Custom Profile specification reference.
Show Source
Nested Schema : RuleConditionOracle
Type: object
Title: RuleConditionOracle
A product rule condition
Show Source
Nested Schema : productRuleExpression
Type: array
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "RuleExpressionOracle":"#/components/schemas/RuleExpressionOracle", "EntityRuleExpressionOracle":"#/components/schemas/EntityRuleExpressionOracle", "EligibilityRuleExpressionOracle":"#/components/schemas/EligibilityRuleExpressionOracle" } }
Nested Schema : productRuleResult
Type: array
Show Source
  • 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
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : ProductRules
Type: object
Title: ProductRules
Discriminator: @type

Discriminator Values

The Product Rule resource represents a set of rules and relationships.
Show Source
Nested Schema : customProfileSpec
Type: array
Show Source
Nested Schema : ProjectRef
Type: object
Title: ProjectRef
Project Reference
Show Source
Nested Schema : ruleCondition
Type: array
Show Source
Nested Schema : SubjectRef
Type: object
Title: SubjectRef
Subject Reference
Show Source
Nested Schema : CustomProfileSpecRefOracle
Type: object
Title: CustomProfileSpecRefOracle
Custom Profile specification reference.
Show Source
Nested Schema : RuleConditionOracle
Type: object
Title: RuleConditionOracle
A product rule condition
Show Source
Nested Schema : productRuleExpression
Type: array
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "RuleExpressionOracle":"#/components/schemas/RuleExpressionOracle", "EntityRuleExpressionOracle":"#/components/schemas/EntityRuleExpressionOracle", "EligibilityRuleExpressionOracle":"#/components/schemas/EligibilityRuleExpressionOracle" } }
Nested Schema : productRuleResult
Type: array
Show Source
  • 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
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.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

401 Response

Your request isn't authorized. The authentication credentials included with this request are missing or invalid.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

404 Response

Your request includes a resource URI that doesn't exist.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

405 Response

HTTP action specified in the request (DELETE, GET, POST, PUT) isn't supported for this request URI.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

500 Response

The server encountered something unexpected that prevented it from completing the request.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source
Back to Top

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
Back to Top