Create or update a constraint
put
https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/constraint/{id}
Request
Path Parameters
-
id(required): string
The unique identifier of the resource item.
Supported Media Types
- application/json
Root Schema : Discriminator: @type
Type:
objectDiscriminator: @type
Discriminator Values
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : Discriminator: @type
Type:
objectDiscriminator: @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:
objectTitle:
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:
objectTitle:
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:
objectTitle:
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:
objectTitle:
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:
objectTitle:
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 update or create a constraint 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/tmf-api/productCatalogManagement/v4/constraint/Cons_Resell_123 -H 'Content-Type: application/json' -D @put_contraint.json | json_ppExample of Request Body
The following shows the contents of the request body in JSON format.
{
"@type": "PricingConstraintVariantOracle",
"@baseType": "Constraint",
"id": "Cons_Resell_987",
"name": "Re-seller constraint",
"description": "Description of CustTypeBasedConstraint0012",
"version": "3.0",
"project": {
"id": "ExtensionProject",
"name": "Extension Project"
},
"usageSpecification": {
"@referredType": "UsageSpecificationOracle",
"id": "UsageSpecTelcoGSM001",
"name": "UsageSpecTelcoGSM001"
},
"customerProfileSpecification": {
"@referredType": "CustomerProfileSpecificationOracle",
"id": "Cons_Resell_987",
"name": "Re-seller constraint"
},
"constraintRule": [
{
"priority": 1,
"priceTag": "PriceTag01",
"validFor": {
"startDateTime": "2017-04-19T16:42:23.0Z"
},
"valueRelationship": [
{
"value": "Platinum"
}
],
"productOfferingPrice": [
{
"id": "POPUsage001",
"name": "POPUsage001",
"version": "1.0"
}
]
},
{
"priority": 2,
"priceTag": "PriceTag02",
"validFor": {
"startDateTime": "2017-04-19T16:42:23.0Z"
},
"valueRelationship": [
{
"value": "Gold"
}
],
"productOfferingPrice": [
{
"id": "POPUsage002",
"name": "POPUsage002",
"version": "1.0"
}
]
},
{
"priority": 3,
"priceTag": "PriceTag03",
"validFor": {
"startDateTime": "2017-04-19T16:42:23.0Z"
},
"valueRelationship": [
{
"value": "Silver"
}
],
"productOfferingPrice": [
{
"id": "POPUsage003",
"name": "POPUsage003",
"version": "1.0"
}
]
}
],
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/constraint/Constraint1230012"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"@type": "PricingConstraintVariantOracle",
"@baseType": "Constraint",
"constraintType": "PRICE",
"constraintRule": [
{
"productOfferingPrice": [
{
"id": "POPUsage001",
"name": "POPUsage001",
"version": "1.0",
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOfferingPrice/POPUsage001",
"@referredType": "ProductOfferingPriceOracle"
}
],
"validFor": {
"startDateTime": "2017-04-19T16:42:23.0Z"
},
"valueRelationship": [
{
"value": "Platinum"
}
],
"priceTag": "PriceTag01",
"priority": 1
},
{
"productOfferingPrice": [
{
"id": "POPUsage002",
"name": "POPUsage002",
"version": "1.0",
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOfferingPrice/POPUsage002",
"@referredType": "ProductOfferingPriceOracle"
}
],
"validFor": {
"startDateTime": "2017-04-19T16:42:23.0Z"
},
"valueRelationship": [
{
"value": "Gold"
}
],
"priceTag": "PriceTag02",
"priority": 2
},
{
"productOfferingPrice": [
{
"id": "POPUsage003",
"name": "POPUsage003",
"version": "1.0",
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOfferingPrice/POPUsage003",
"@referredType": "ProductOfferingPriceOracle"
}
],
"validFor": {
"startDateTime": "2017-04-19T16:42:23.0Z"
},
"valueRelationship": [
{
"value": "Silver"
}
],
"priceTag": "PriceTag03",
"priority": 3
}
],
"customerProfileSpecification": {
"@referredType": "CustomerProfileSpecificationOracle",
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogReferenceManagement/v1/customerProfileSpecification/TestBRMCustomerProf001",
"name": "TestBRMCustomerProf001",
"id": "Cons_Resell_987"
},
"usageSpecification": {
"@referredType": "UsageSpecificationOracle",
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/usageManagement/v2/usageSpecification/UsageSpecTelcoGSM001",
"name": "SG_5GUsageSpec",
"id": "UsageSpecTelcoGSM001"
},
"href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/constraint/CustTypeBasedConstraint001ab",
"lastUpdate": "2020-12-04T07:22:12.000Z",
"lastUpdatedBy": "booth",
"createdBy": "booth",
"created": "2020-12-04T07:22:12.000Z",
"project": {
"id": "ExtensionProject",
"name": "Extension Project"
},
"description": "Description of CustTypeBasedConstraint0012",
"version": "3.0",
"name": "Re-seller constraint",
"id": "Cons_Resell_987",
"lifecycleStatus": "In design"
}