Search Templates

Searches, filters, sorts, and paginates Sales Configuration Templates, supporting field-level filtering (AND logic), free-text search (OR logic), tag-based filtering, and multi-field sorting.

Resource Information 

  • Resource URL: /services/apexrest/<namespace>/v1/cpq/templates/search
  • HTTP Method: POST
  • Content-Type: application/json
  • Response Format: JSON

Request Body 

ParameterTypeRequiredDescription
filterObjectNoFilter criteria applied with AND logic.
offsetIntegerNoNumber of records to skip. Default value is 0.
pageSizeIntegerNoNumber of results per page. Default value is 20.
searchObjectNoSearch criteria applied with OR logic across specified fields.
sortbyArrayNoArray of sort clauses.

Example REST Request: Full Search 

1{
2  "filter": {
3    "criteria": [
4      { "field": "Status__c", "operator": "=", "values": "Approved" },
5      { "field": "Category__c", "operator": "IN", "values": "Enterprise,Premium" }
6    ]
7  },
8  "search": {
9    "fields": "Name,Description__c,tags",
10    "value": "fiber"
11  },
12  "sortby": [
13    { "field": "Name", "direction": "ASC" }
14  ],
15  "pageSize": 10,
16  "offset": 0
17}

Example REST Response 

Success Response (200):

1{
2  "success": true,
3  "errorCode": "INVOKE-200",
4  "error": "OK",
5  "result": {
6    "records": [
7      {
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        "Tags": ["Enterprise", "Fiber"],
14        "vlocity_cmt__EffectiveOneTimeTotal__c": 299.99,
15        "vlocity_cmt__EffectiveRecurringTotal__c": 89.99,
16        "vlocity_cmt__PriceList__r": {
17          "Id": "a3Dxx0000002GhiJKL",
18          "Name": "Standard Price List",
19          "vlocity_cmt__CurrencyCode__c": "USD"
20        }
21      }
22    ],
23    "messages": []
24  },
25  "totalCount": 1,
26  "offset": 0,
27  "pageSize": 10,
28  "totalPages": 1
29}