Create a product rule

post

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

Request

There are no request parameters for this operation.

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

201 Response

Your request is successful and a new resource has been created.
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 examples show how to create a product rule by submitting a POST request on the REST resource using cURL.

Compatibility product rule

cURL Command

curl -u username:password -X POST https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule \ -H 'Content-Type: application/json' -D @productrule_create.json | json_pp

Example of Request Body

The following shows an example of creating a product rule based on compatibility rule in JSON format.

{
    "id": "RULE-CP-4055990588-17296789138",
    "name": "Sleek Protective Mustang 11 Max CR",
    "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRule/RULE-CP-4055990588-17296789138",
    "lifecycleStatus": "In design",
    "ruleType": "COMPATIBILITY",
    "@type": "ProductRuleOracle",
    "version": "1.0",
    "project": {
        "id": "DBE_RI_Mob_ProdModel_PSP",
        "name": "DBE RI Mobile Product Model",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/project/DBE_RI_Mob_ProdModel_PSP",
        "version": "1.0",
        "@referredType": "ProjectOracle"
    },
    "subject": {
        "id": "PO-SLK-M11-MAX-CASE",
        "name": "Sleek Protective Mustang 11 Max Case",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOffering/PO-SLK-M11-MAX-CASE",
        "@referredType": "ProductOfferingOracle",
        "@type": "SubjectRef",
        "@baseType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "id": "Condition1",
            "name": "Rule condition1",
            "description": "Rule condition1",
            "stringExpression": "REQUIRES ENTITY(PO-Mustang11Max,ProductOfferingOracle)",
            "validFor": {
                "startDateTime": "2024-09-03T00:00:00.000Z"
            },
            "@type": "RuleConditionOracle",
            "productRuleExpression": [
                {
                    "id": "OPERANDNODE1",
                    "expressionType": "ENTITY",
                    "value": "PO-Mustang11Max",
                    "@type": "EntityRuleExpressionOracle",
                    "valueType": "PRODUCT_OFFERING",
                    "productRuleExpressionRelationship": {
                        "id": "REQUIRES_OPERANDNODE1",
                        "name": "RHS of (REQUIRES_OPERANDNODE1)",
                        "relationshipType": "RIGHT_HAND_SIDE",
                        "@type": "ProductRuleExprRelationshipOracle"
                    }
                },
                {
                    "id": "REQUIRES_OPERANDNODE1",
                    "operator": "REQUIRES",
                    "expressionType": "UNARY",
                    "@type": "RuleExpressionOracle"
                }
            ]
        }
    ],
    "scope": "ALL"
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "id": "RULE-CP-4055990588-17296789138",
    "name": "Sleek Protective Mustang 11 Max CR",
    "href": "https://cptbbwiqy.fusionapps.ocs.oc-test.com:443/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRule/RULE-CP-4055990588-17296789138",
    "lifecycleStatus": "In design",
    "ruleType": "COMPATIBILITY",
    "@type": "ProductRuleOracle",
    "created": "2025-02-17T12:01:50.000Z",
    "createdBy": "booth",
    "lastUpdate": "2025-02-17T12:01:50.098Z",
    "lastUpdatedBy": "booth",
    "version": "1.0",
    "versionState": 0,
    "project": {
        "id": "DBE_RI_Mob_ProdModel_PSP",
        "name": "DBE RI Mobile Product Model",
        "href": "https://cptbbwiqy.fusionapps.ocs.oc-test.com/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/project/DBE_RI_Mob_ProdModel_PSP",
        "version": "1.0",
        "@referredType": "ProjectOracle"
    },
    "subject": {
        "id": "PO-SLK-M11-MAX-CASE",
        "name": "Sleek Protective Mustang 11 Max Case",
        "href": "https://cptbbwiqy.fusionapps.ocs.oc-test.com/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOffering/PO-SLK-M11-MAX-CASE",
        "@referredType": "ProductOfferingOracle",
        "@type": "SubjectRef",
        "@baseType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "id": "Condition1",
            "name": "Rule condition1",
            "description": "Rule condition1",
            "stringExpression": "REQUIRES ENTITY(PO-Mustang11Max,ProductOfferingOracle)",
            "validFor": {
                "startDateTime": "2024-09-03T00:00:00.000Z"
            },
            "@type": "RuleConditionOracle",
            "productRuleExpression": [
                {
                    "id": "REQUIRES_OPERANDNODE1",
                    "operator": "REQUIRES",
                    "expressionType": "UNARY",
                    "@type": "RuleExpressionOracle"
                },
                {
                    "id": "OPERANDNODE1",
                    "expressionType": "ENTITY",
                    "value": "PO-Mustang11Max",
                    "@type": "EntityRuleExpressionOracle",
                    "valueType": "PRODUCT_OFFERING",
                    "productRuleExpressionRelationship": {
                        "id": "REQUIRES_OPERANDNODE1",
                        "name": "RHS of (REQUIRES_OPERANDNODE1)",
                        "relationshipType": "RIGHT_HAND_SIDE",
                        "@type": "ProductRuleExprRelationshipOracle"
                    }
                }
            ]
        }
    ],
    "scope": "ALL"
} 

Recommendation product rule

cURL Command

curl curl -u username:password -X POST https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule \ -H 'Content-Type: application/json' -D @create_productrule.json | json_pp

Example of Request Body

The following shows an example of creating a product rule based on compatibility rule in JSON format.

{
    "id": "RULE-RC-675598761-172967838164",
    "name": "Mustang 11 Upsell Rule2",
    "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRule/RULE-RC-675598761-172967838164",
    "lifecycleStatus": "Ready to publish",
    "ruleType": "RECOMMENDATION",
    "@type": "ProductRuleOracle",
    "version": "1.0",
    "subject": {
        "id": "PO-Mustang11",
        "name": "Mustang 11",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOffering/PO-Mustang11",
        "versionState": -1,
        "@referredType": "ProductOfferingOracle",
        "@type": "SubjectRef",
        "@baseType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "id": "Condition1",
            "name": "Rule condition1",
            "description": "Rule condition1",
            "validFor": {
                "startDateTime": "2024-09-03T00:00:00.000Z"
            },
            "@type": "RuleConditionOracle",
            "productRuleResult": [
                {
                    "id": "CR-3236288663-1729678381843",
                    "value": "PO-Mustang11Pro",
                    "valueType": "PRODUCT_OFFERING",
                    "@type": "RecommendationRuleResultOracle",
                    "message": "Upsell to Mustang 11 Pro",
                    "score": 8,
                    "messageType": "UPSELL_RECOMMEND"
                }
            ]
        }
    ]
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "id": "RULE-RC-675598761-172967838164",
    "name": "Mustang 11 Upsell Rule2",
    "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRule/RULE-RC-675598761-172967838164",
    "lifecycleStatus": "In design",
    "ruleType": "RECOMMENDATION",
    "@type": "ProductRuleOracle",
    "created": "2025-02-17T12:17:13.000Z",
    "createdBy": "booth",
    "lastUpdate": "2025-02-17T12:17:13.073Z",
    "lastUpdatedBy": "booth",
    "version": "1.0",
    "versionState": 0,
    "subject": {
        "id": "PO-Mustang11",
        "name": "Mustang 11",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOffering/PO-Mustang11",
        "versionState": -1,
        "@referredType": "ProductOfferingOracle",
        "@type": "SubjectRef",
        "@baseType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "id": "Condition1",
            "name": "Rule condition1",
            "description": "Rule condition1",
            "validFor": {
                "startDateTime": "2024-09-03T00:00:00.000Z"
            },
            "@type": "RuleConditionOracle",
            "productRuleResult": [
                {
                    "id": "CR-3236288663-1729678381843",
                    "value": "PO-Mustang11Pro",
                    "valueType": "PRODUCT_OFFERING",
                    "@type": "RecommendationRuleResultOracle",
                    "message": "Upsell to Mustang 11 Pro",
                    "score": 8,
                    "messageType": "UPSELL_RECOMMEND"
                }
            ]
        }
    ]
}

Migration product rule

cURL Command

curl -u username:password -X POST https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule \ -H 'Content-Type: application/json' -D create_productrule.json | json_pp

Example of Request Body

The following shows an example of creating a product rule based on compatibility rule in JSON format.

{
      "id": "RULE-MG-1331982568-17296782301",
      "name": "Supremo 5G Unlimited to Supremo 5G Premium",
      "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRule/RULE-MG-1331982568-17296782301",
      "lifecycleStatus": "Ready to publish",
      "ruleType": "MIGRATION",
      "@type": "ProductRuleOracle",
      "created": "2025-01-20T13:37:18.000Z",
      "createdBy": "booth",
      "lastUpdate": "2025-01-30T08:49:30.518Z",
      "lastUpdatedBy": "booth",
      "version": "1.0",
      "versionState": 0,
      "subject": {
        "id": "PO-SUP-5G-UNLMTD-PACK",
        "name": "Supremo 5G Unlimited",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOffering/PO-SUP-5G-UNLMTD-PACK",
        "versionState": -1,
        "@referredType": "ProductOfferingOracle",
        "@type": "SubjectRef",
        "@baseType": "ProductOfferingOracle"
      },
      "ruleCondition": [
        {
          "id": "MG-GRP-1637325533-172967823039",
          "name": "MG-GRP-1637325533-172967823039",
          "description": "MG-GRP-1637325533-172967823039",
          "stringExpression": "UPG_FRM ENTITY(PO-SUP-5G-PREM-PACK,ProductOfferingOracle)",
          "validFor": {
            "startDateTime": "2024-09-03T00:00:00.000Z"
          },
          "@type": "RuleConditionOracle",
          "productRuleExpression": [
            {
              "id": "OPERANDNODE1",
              "expressionType": "ENTITY",
              "value": "PO-SUP-5G-PREM-PACK",
              "@type": "EntityRuleExpressionOracle",
              "valueType": "PRODUCT_OFFERING",
              "productRuleExpressionRelationship": {
                "id": "UPG_FRM_OPERANDNODE1",
                "name": "RHS of (UPG_FRM_OPERANDNODE1)",
                "relationshipType": "RIGHT_HAND_SIDE",
                "@type": "ProductRuleExprRelationshipOracle"
              }
            },
            {
              "id": "UPG_FRM_OPERANDNODE1",
              "operator": "UPG_FRM",
              "expressionType": "UNARY",
              "@type": "RuleExpressionOracle"
            }
          ],
          "productRuleResult": [
            {
              "duration": "ORIGINAL_DURATION",
              "id": "Result-468685504-1729678285178",
              "@type": "MigrationRuleResultOracle",
              "productOfferingPrice": [
                {
                  "id": "MG_PP-11441434-1729678284326",
                  "name": "MG_PP-11441434-1729678284326",
                  "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOfferingPrice/MG_PP-11441434-1729678284326",
                  "versionState": -1,
                  "@referredType": "ProductOfferingPriceOracle",
                  "@type": "ProductOfferingPriceRef",
                  "@baseType": "ProductOfferingPriceOracle"
                }
              ]
            }
          ]
        }
      ]
    }

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "id": "RULE-MG-1331982568-17296782301",
    "name": "Supremo 5G Unlimited to Supremo 5G Premium",
    "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRule/RULE-MG-1331982568-17296782301",
    "lifecycleStatus": "In design",
    "ruleType": "MIGRATION",
    "@type": "ProductRuleOracle",
    "created": "2025-02-17T12:11:54.000Z",
    "createdBy": "booth",
    "lastUpdate": "2025-02-17T12:11:54.215Z",
    "lastUpdatedBy": "booth",
    "version": "1.0",
    "versionState": 0,
    "project": {
        "id": "DBE_RI_Mob_ProdModel_PSP",
        "name": "DBE RI Mobile Product Model",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/project/DBE_RI_Mob_ProdModel_PSP",
        "version": "1.0",
        "@referredType": "ProjectOracle"
    },
    "subject": {
        "id": "PO-SUP-5G-UNLMTD-PACK",
        "name": "Supremo 5G Unlimited",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOffering/PO-SUP-5G-UNLMTD-PACK",
        "versionState": -1,
        "@referredType": "ProductOfferingOracle",
        "@type": "SubjectRef",
        "@baseType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "id": "MG-GRP-1637325533-172967823039",
            "name": "MG-GRP-1637325533-172967823039",
            "description": "MG-GRP-1637325533-172967823039",
            "stringExpression": "UPG_FRM ENTITY(PO-SUP-5G-PREM-PACK,ProductOfferingOracle)",
            "validFor": {
                "startDateTime": "2024-09-03T00:00:00.000Z"
            },
            "@type": "RuleConditionOracle",
            "productRuleExpression": [
                {
                    "id": "UPG_FRM_OPERANDNODE1",
                    "operator": "UPG_FRM",
                    "expressionType": "UNARY",
                    "@type": "RuleExpressionOracle"
                },
                {
                    "id": "OPERANDNODE1",
                    "expressionType": "ENTITY",
                    "value": "PO-SUP-5G-PREM-PACK",
                    "@type": "EntityRuleExpressionOracle",
                    "valueType": "PRODUCT_OFFERING",
                    "productRuleExpressionRelationship": {
                        "id": "UPG_FRM_OPERANDNODE1",
                        "name": "RHS of (UPG_FRM_OPERANDNODE1)",
                        "relationshipType": "RIGHT_HAND_SIDE",
                        "@type": "ProductRuleExprRelationshipOracle"
                    }
                }
            ],
            "productRuleResult": [
                {
                    "duration": "ORIGINAL_DURATION",
                    "id": "Result-468685504-1729678285178",
                    "@type": "MigrationRuleResultOracle",
                    "productOfferingPrice": [
                        {
                            "id": "MG_PP-11441434-1729678284326",
                            "name": "MG_PP-11441434-1729678284326",
                            "version": "1.0",
                            "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v5/productOfferingPrice/MG_PP-11441434-1729678284326",
                            "versionState": -1,
                            "@referredType": "ProductOfferingPriceOracle",
                            "@type": "ProductOfferingPriceRef",
                            "@baseType": "ProductOfferingPriceOracle"
                        }
                    ]
                }
            ]
        }
    ]
}
Back to Top