Create a constraint

post

https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/constraint

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root 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 : 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 a constraint by submitting a POST request on the REST resource using cURL.

cURL Command

curl -u username:password -X POST \
https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/constraint 
\ -H 'Content-Type: application/json' -D @create_constraing.json | json_pp

Example of Request Body

The following shows the contents of the request body in JSON format.

{
    "@type": "PricingConstraintVariantOracle",
    "@baseType": "Constraint",
    "name": "Re-seller constraint",
    "description": "Price Constraint for Re-seller multiple Pricelist and TimeTag.",
    "id": "Cons_Resell_123",
    "version": "1.0",
    "project": {
        "id": "ProjectID01",
        "name": "ProjectName01"
    },
    "productSpecification": {
        "@referredType": "ProductSpecificationOracle",
        "id": "IphoneSpec12Pro",
        "name": "IphoneSpec12Pro"
    },
    "serviceSpecification": {
        "id": "ServicSpecificatonTet111",
        "name": "ServicSpecificatonTet111"
    },
    "specCharUse": [
        {
            "relationshipType": "AGGREGATION",
            "charSpecSeq": 1,
            "name": "PriceList1",
            "valueType": "Price"
        },
        {
            "relationshipType": "AGGREGATION",
            "name": "PriceList2",
            "charSpecSeq": 2
        },
        {
            "relationshipType": "AGGREGATION",
            "name": "PriceList3",
            "charSpecSeq": 3
        }
    ],
    "constraintRule": [
        {
            "priority": 3,
            "priceTag": "Price 123",
            "validFor": {
                "startDateTime": "2017-04-19T16:42:23.0Z"
            },
            "valueRelationship": [
                {
                    "value": "P2"
                },
                {
                    "value": "Peak"
                },
                {
                    "value": "P3"
                }
            ]
        }
    ]
}

Example of Response Body

The following shows the contents of the response body in JSON format.

{
    "@type": "PricingConstraintVariantOracle",
    "@baseType": "Constraint",
    "constraintType": "PRICE",
    "specCharUse": [
        {
            "relationshipType": "AGGREGATION",
            "charSpecSeq": 1,
            "valueType": "Price",
            "name": "PriceList1"
        },
        {
            "relationshipType": "AGGREGATION",
            "charSpecSeq": 2,
            "name": "PriceList2"
        },
        {
            "relationshipType": "AGGREGATION",
            "charSpecSeq": 3,
            "name": "PriceList3"
        }
    ],
    "constraintRule": [
        {
            "valueRelationship": [
                {
                    "value": "P2"
                },
                {
                    "value": "Peak"
                },
                {
                    "value": "P3"
                }
            ],
            "validFor": {
                "startDateTime": "2017-04-19T16:42:23.0Z"
            },
            "priceTag": "Price 123",
            "priority": 3
        }
    ],
    "productSpecification": {
        "id": "IphoneSpec12Pro",
        "name": "IphoneSpec12Pro",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productSpecification/IphoneSpec12Pro",
        "@baseType": "ProductSpecificationOracle"
    },
    "serviceSpecification": {
        "id": "ServicSpecificatonTet111",
        "name": "ServicSpecificatonTet111",
        "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/serviceCatalogManagement/v3/serviceSpecification/ServicSpecificatonTet111",
        "@referredType": "ServiceSpecificationOracle"
    },
    "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/constraint/Cons_Resell_123",
    "lastUpdate": "2020-12-17T15:51:58.000Z",
    "lastUpdatedBy": "booth",
    "createdBy": "booth",
    "created": "2020-12-17T15:51:58.000Z",
    "project": {
        "id": "ProjectID01",
        "name": "ProjectName01"
    },
    "description": "Price Constraint for Re-seller multiple Pricelist and TimeTag.",
    "version": "1.0",
    "name": "Re-seller constraint",
    "id": "Cons_Resell_123",
	"lifecycleStatus": "In design"
}
Back to Top