Deletes a Sales Configuration Template, with an option to also delete the underlying template Quote or Order.
Resource Information
- Resource URL:
/services/apexrest/<namespace>/v1/cpq/templates/{templateId} - HTTP Method: DELETE
- Content-Type: application/json
- Response Format: JSON
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| templateId | String | Yes | The SalesConfigTemplate__c record ID. |
| deleteTemplateRecord | Boolean | No | If true, also deletes the underlying template Quote or Order and its line items. |
| forceDelete | Boolean | No | If true, allows deletion of templates in Approved status. |
Example REST Request
DELETE /services/apexrest/vlocity_cmt/v1/cpq/templates/a1Bxx0000004XyzDEF?deleteTemplateRecord=true&forceDelete=false
Example REST Response
Success Response (200):
{
"success": true,
"errorCode": "INVOKE-200",
"error": "OK",
"result": {
"messages": [],
"records": [
{
"deletedTemplateId": "a1Bxx0000004XyzDEF",
"deletedTemplateRecordId": "0Q0xx0000004CabCAE"
}
]
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| deletedTemplateId | String | The ID of the deleted SalesConfigTemplate__c record. |
| deletedTemplateRecordId | String | The ID of the deleted underlying Quote or Order (only present when deleteTemplateRecord was true and the record was successfully deleted). |