Adding Assets to Service Contract Using REST API
The application allows you to create Contract Line Items for a given Service Contract using REST API with the following details.
Endpoint URL: /services/apexrest/SVMXA360/scon/v1/createContractLineItems/
Request JSON
The following code is an example of JSON input.
{
"servicePlanProductId": "01t0x000007nhEuAAI",
"serviceContractId": "8100x000000XuBfAAK",
"assetDataList": [
{
"subscriptionId": null,
"subscriptionFieldName": null,
"subscribedAssetId": null,
"subscribedAssetFieldName": null,
"startDate": "2021-11-16",
"pricebookEntryId": null,
"endDate": "2021-12-16",
"contractLineItemId": null,
"assetId": "02i0x00000dXmC4AAK"
}
]
}
Response JSON
The following code is an example of JSON output.
{
"success": true,
"data": {
"servicePlanProductId": "01t0x000007nhEuAAI",
"serviceContractId": "8100x000000XuBfAAK",
"assetDataList": [
{
"startDate": "2021-11-16",
"endDate": "2021-12-16",
"contractLineItemId": "8110x000000Lr5fAAC",
"assetId": "02i0x00000dXmC4AAK"
}
]
}
}