Get Template

Retrieves a specific Sales Configuration Template by its ID, including metadata, associated tags, and cart totals.

Resource Information 

  • Resource URL: /services/apexrest/<namespace>/v1/cpq/templates/{templateId}
  • HTTP Method: GET
  • Content-Type: application/json
  • Response Format: JSON

Request Body 

ParameterTypeRequiredDescription
templateIdStringYesThe SalesConfigTemplate__c record ID.

Example REST Request 

GET /services/apexrest/vlocity_cmt/v1/cpq/templates/a1Bxx0000004XyzDEF

Response Parameters 

ParameterTypeDescription
IdStringTemplate record ID.
NameStringTemplate name.
Description__cStringTemplate description.
Status__cStringCurrent lifecycle status.
Category__cStringTemplate category.
TemplateQuoteId__cStringID of the underlying template Quote (if Quote-based).
TemplateOrderId__cStringID of the underlying template Order (if Order-based).
CartTypeStringEither “Quote” or “Order”, indicating the type of the underlying cart.
TagsArrayList of associated tag objects, each containing Id, Name, and Description__c.
EffectiveOneTimeTotal__cDecimalTotal effective one-time charges from the template cart.
EffectiveRecurringTotal__cDecimalTotal effective recurring charges from the template cart.
EffectiveUsagePriceTotal__cDecimalTotal effective usage charges (only present when the Usage Pricing feature is enabled).
PriceList__rObjectRelated Price List with Id, Name, and CurrencyCode__c.

Example REST Response 

Success Response (200):

1{
2  "success": true,
3  "errorCode": "INVOKE-200",
4  "result": {
5    "messages": [],
6    "templateDetails": {
7      "template": {
8        "Id": "a1Bxx0000004XyzDEF",
9        "Name": "Enterprise Fiber Bundle",
10        "vlocity_cmt__Description__c": "Standard fiber bundle for enterprise customers",
11        "vlocity_cmt__Status__c": "Approved",
12        "vlocity_cmt__Category__c": "Enterprise",
13        "vlocity_cmt__TemplateQuoteId__c": "0Q0xx0000004CabCAE",
14        "CartType": "Quote",
15        "Tags": [
16          {
17            "Id": "a2Cxx0000001AbcDEF",
18            "Name": "Enterprise",
19            "vlocity_cmt__Description__c": "Templates for enterprise customers"
20          },
21          {
22            "Id": "a2Cxx0000001DefGHI",
23            "Name": "Fiber",
24            "vlocity_cmt__Description__c": null
25          }
26        ],
27        "vlocity_cmt__EffectiveOneTimeTotal__c": 299.99,
28        "vlocity_cmt__EffectiveRecurringTotal__c": 89.99,
29        "vlocity_cmt__EffectiveUsagePriceTotal__c": 0.00,
30        "vlocity_cmt__PriceList__r": {
31          "Id": "a3Dxx0000002GhiJKL",
32          "Name": "Standard Price List",
33          "vlocity_cmt__CurrencyCode__c": "USD"
34        }
35      }
36    }
37  }
38}