Adding Services to Service Contract Using REST API
The application allows you to add Entitled Services (ES) to a Service Contract or Asset(s) record using REST API with the following details.
Endpoint URL: /services/apexrest/SVMXA360/scon/v1/createEntitledService/
Request JSON
The following code is an example of JSON input.
{
"workOrderEntitlementProcess": null,
"thresholdAlert": null,
"subscriptionId": "Phone Support",
"subscriptionFieldName": "Type",
"subscribedAssetId": null,
"subscribedAssetFieldName": null,
"startDate": null,
"serviceUnit": "Hours",
"serviceQty": "55",
"serviceProductId": "01t0x000007nhEuAAI",
"serviceContractId": "8100x000000XuBfAAK",
"entitledServiceName": "New ES-CPQ",
"entitledServiceId": null,
"endDate": null,
"contractLineItemId": "8110x000000Lr5fAAC",
"caseEntitlementProcess": null
}
Response JSON
The following code is an example of JSON output.
{
"success": true,
"errors": [],
"data": {
"subscriptionId": "Phone Support",
"subscriptionFieldName": "Type",
"serviceUnit": "Hours",
"serviceQty": "55",
"serviceProductId": "01t0x000007nhEuAAI",
"serviceContractId": "8100x000000XuBfAAK",
"entitledServiceName": "New ES-CPQ",
"entitledServiceId": "5500x000000l4y8AAA",
"contractLineItemId": "8110x000000Lr5fAAC"
}
}