Category Use Cases

I want toRequest TypeExample URL
Retrieve and display details of a requested category.GET by ID{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}

NOTE:
For invalid category ID, you will receive HTTP 404 error.
Based on the provided field values, retrieve and display details of a particular category ID.GET by ID and Fields{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}?fields=name,id
List all the categories present in the system.GET List{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category
List all the categories present in the system based on the provided field values.GET List with Fields{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category?name=Postpaid Add On
List all the categories present in the inventory based on the provided field values and filter applied.GET List by Fields and Filtering{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category?fields=lifecycleStatus,lastUpdate
Limit the number of categories to a maximum of specified limit and
display results from the page specified by an offset.
GET List by limit and offset{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category?isRoot=true&fields=lifecycleStatus,name&limit=3&offset=2
Create a category.POST{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category
Update a category.PATCH{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}
Delete a category.DELETE{https://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}

GET by ID 

Consider you want to retrieve details of a category from the inventory. For example, category ID = 432b3763-2233-65cd-8ba3-a67a035aab74.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/432b3763-2233-65cd-8ba3-a67a035aab74

Sample Response 

1200 OK
2{
3  "PageInfo": "Page 1 of 1",
4  "PageSize": 50,
5  "Result": {
6    "id": "432b3763-2233-65cd-8ba3-a67a035aab74",
7    "description": "A category to hold all available cloud service offers",
8    "name": "GS0 Category996",
9    "isRoot": true,
10    "lastUpdate": "2022-07-28T10:42:56.000+0000",
11    "lifecycleStatus": "Active",
12    "validFor": {
13      "endDateTime": "2024-03-25T00:00:00.000+0000",
14      "startDateTime": "2020-08-24T00:00:00.000+0000"
15    },
16    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003boMeAAI",
17    "@type": "Category",
18    "subCategory": [
19      {
20        "id": "dba5604b-115b-ff1c-cb98-135b3073f037",
21        "name": "GS0 Category008",
22        "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003boMfAAI",
23        "@type": "Catalog"
24      },
25      {
26        "id": "0494e298-7457-3446-4f68-fce852be06a0",
27        "name": "GS0 Category009",
28        "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003boMjAAI",
29        "@type": "Catalog"
30      }
31    ]
32  }
33}

GET by ID and Fields 

Consider you want to retrieve details of the category ID = 7cc8a363-51ab-2413-7214-6bf24f90e856 and get the name and id details in the output.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/7cc8a363-51ab-2413-7214-6bf24f90e856?fields=name,id

Sample Response 

1200 OK
2{
3  "PageInfo": "Page 1 of 1",
4  "PageSize": 50,
5  "Result": {
6    "@referredType": "vlocity_cmt__Catalog__c",
7    "id": "7cc8a363-51ab-2413-7214-6bf24f90e856",
8    "name": "Cloud Services T",
9    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/catalog/a0e5e000003biUxAAI",
10    "@type": "Catalog"
11  }
12}

GET List 

Consider you want to retrieve details of all the categories in the inventory.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category

Sample Response 

1200 OK
2{
3  "PageInfo": "Page 1 of 3",
4  "PageSize": 50,
5  "Result": [
6    {
7      "id": "be03bc15-8f67-c5a4-379e-32f4acf3cb96",
8      "description": "ADDON Root catalog",
9      "name": "Add On",
10      "isRoot": true,
11      "lastUpdate": "2022-04-04T05:48:27.000+0000",
12      "lifecycleStatus": "Active",
13      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bKGIAA2",
14      "@type": "Category",
15      "subCategory": [
16        {
17          "id": "15847f92-c3df-162a-50a1-3917a1dcf333",
18          "name": "Prepaid Add On",
19          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bKFjAAM",
20          "@type": "Catalog"
21        }
22      ]
23    },
24    {
25      "id": "3d6a1b15-6778-9ed0-e8ba-395f72540246",
26      "description": "This catalog describes Product Offerings and technical specifications     intended to address the wholesale business segment.",
27      "name": "Catalog Wholesale Business",
28      "isRoot": false,
29      "lastUpdate": "2022-06-08T15:25:23.000+0000",
30      "lifecycleStatus": "Active",
31      "validFor": {
32        "endDateTime": "2024-03-25T00:00:00.000+0000",
33        "startDateTime": "2020-08-29T00:00:00.000+0000"
34      },
35      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bgZXAAY",
36      "@type": "Category",
37      "subCategory": [
38        {
39          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
40          "name": "Cloud Storage",
41          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
42          "@type": "Catalog"
43        }
44      ]
45    },
46    {
47      "id": "d4275490-89d8-bc3c-7cfe-4b8ce7df2548",
48      "description": "A category to hold all available cloud service offers",
49      "name": "Cloud Services retest",
50      "isRoot": true,
51      "lastUpdate": "2022-06-30T04:15:18.000+0000",
52      "lifecycleStatus": "Active",
53      "validFor": {
54        "endDateTime": "2024-03-25T00:00:00.000+0000",
55        "startDateTime": "2020-08-24T00:00:00.000+0000"
56      },
57      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bjyMAAQ",
58      "@type": "Category",
59      "subCategory": [
60        {
61          "name": "Cloud Storage",
62          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
63          "@type": "Catalog"
64        },
65        {
66          "name": "Cloud Storage",
67          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
68          "@type": "Catalog"
69        }
70      ]
71    },
72    {
73      "id": "0defa8d6-9a10-d755-3e7c-9124bc1e3ae1",
74      "description": "A category to hold all available cloud service offers",
75      "name": "Cloud test Services",
76      "isRoot": false,
77      "lastUpdate": "2022-06-16T04:22:11.000+0000",
78      "lifecycleStatus": "Active",
79      "validFor": {
80        "endDateTime": "2024-03-25T00:00:00.000+0000",
81        "startDateTime": "2020-08-24T00:00:00.000+0000"
82      },
83      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bhugAAA",
84      "@type": "Category",
85      "subCategory": [
86        {
87          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
88          "name": "Cloud Storage",
89          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
90          "@type": "Catalog"
91        }
92      ]
93    },
94    {
95      "id": "7cc8a363-51ab-2413-7214-6bf24f90e856",
96      "description": "A category to hold all available cloud service offers",
97      "name": "Cloud Services T",
98      "isRoot": false,
99      "lastUpdate": "2022-06-30T04:31:14.000+0000",
100      "lifecycleStatus": "Active",
101      "validFor": {
102        "endDateTime": "2024-03-25T00:00:00.000+0000",
103        "startDateTime": "2020-08-24T00:00:00.000+0000"
104      },
105      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003biUxAAI",
106      "@type": "Category",
107      "subCategory": [
108        {
109          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
110          "name": "Cloud Storage",
111          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
112          "@type": "Catalog"
113        }
114      ]
115    },
116    {
117      "id": "9b900254-2bc3-ba43-cc0f-b102ef9f18af",
118      "description": "A category to hold all available cloud service offers",
119      "name": "Cloud Services retest",
120      "isRoot": false,
121      "lastUpdate": "2022-06-23T05:49:46.000+0000",
122      "lifecycleStatus": "Active",
123      "validFor": {
124        "endDateTime": "2024-03-25T00:00:00.000+0000",
125        "startDateTime": "2020-08-24T00:00:00.000+0000"
126      },
127      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003biu4AAA",
128      "@type": "Category",
129      "subCategory": [
130        {
131          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
132          "name": "Cloud Storage",
133          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
134          "@type": "Catalog"
135        }
136      ]
137    },
138    {
139      "id": "cbb24487-16aa-d5b4-4b19-b8156bd0d608",
140      "description": "A category to hold all available cloud service offers",
141      "name": "Cloud Services creating 5",
142      "isRoot": true,
143      "lastUpdate": "2022-07-13T10:01:57.000+0000",
144      "lifecycleStatus": "Active",
145      "validFor": {
146        "endDateTime": "2024-03-25T00:00:00.000+0000",
147        "startDateTime": "2020-08-24T00:00:00.000+0000"
148      },
149      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003blkaAAA",
150      "@type": "Category",
151      "subCategory":[
152
153        {
154          "name": "Cloud Storage",
155          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
156          "@type": "Catalog",
157          "id": "a960f423-2431-f36c-d528-9bbb2a7b3724"
158        },
159        {
160          "name": "Cloud Storage",
161          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
162          "@type": "Catalog",
163          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d"
164        },
165        {
166          "name": "Cloud Storage",
167          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
168          "@type": "Catalog",
169          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d"
170        }
171      ],
172      "productOffering": [
173
174        {
175          "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gsxnAAA",
176          "id": "a960f423-2431-f36c-d528-9bbb2a7b3724",
177          "name": "Airtel Wifi Router 123 test",
178          "@type": "ProductOffering"
179        },
180        {
181          "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gFzMAAU",
182          "id": "abbc2f2f-a78d-cbdb-4265-92118b4c3e4e",
183          "name": "100GB Postpaid Plan",
184          "@type": "ProductOffering"
185        }
186      ]
187    }
188]

GET List with Fields 

Consider you want to retrieve all the catalogs by applying the requested fields.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category?name=Postpaid Add On

Sample Response 

1200 OK
2  {
3  "PageInfo": "Page 1 of 1",
4  "PageSize": 50,
5  "Result": {
6    "id": "ad2afce3-2690-10f8-f765-16e0a0bb9bbd",
7    "description": "Postpaid add on catalog",
8    "name": "Postpaid Add On",
9    "isRoot": false,
10    "lastUpdate": "2022-04-04T05:47:50.000+0000",
11    "lifecycleStatus": "Active",
12    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bKFeAAM",
13    "@type": "Category",
14    "productOffering": [
15      {
16        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gFzKAAU",
17        "id": "693bb8d1-1c23-8aa8-13f2-561466651a38",
18        "name": "10 GB Data Postpaid Addon",
19        "@type": "ProductOffering"
20      },
21      {
22        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG3sAAE",
23        "id": "5cd51d35-3413-c28b-3869-4faf56a0eb22",
24        "name": "10GB, 500 Minutes & 500 Texts Postpaid Addon",
25        "@type": "ProductOffering"
26      },
27      {
28        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG0eAAE",
29        "id": "edeafc77-336c-f915-bf13-78d65284de5c",
30        "name": "50 GB Data Postpaid Addon",
31        "@type": "ProductOffering"
32      },
33      {
34        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG0bAAE",
35        "id": "cdced4ad-719e-6670-be85-8d55bf855f11",
36        "name": "5GB, 500 Minutes & 500 Texts Postpaid Addon",
37        "@type": "ProductOffering"
38      }
39    ]
40  }
41}

GET List by Fields and Filtering 

Consider you want to retrieve all the categories by specified filter.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category?id=ad2afce3-2690-10f8-f765-16e0a0bb9bbd&fields=lifecycleStatus,lastUpdate

Sample Response 

1200 OK
2{
3  "PageInfo": "Page 1 of 1",
4  "PageSize": 50,
5  "Result": {
6    "id": "ad2afce3-2690-10f8-f765-16e0a0bb9bbd",
7    "lastUpdate": "2022-04-04T05:47:50.000+0000",
8    "lifecycleStatus": "Active",
9    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bKFeAAM",
10    "@type": "Category"
11  }
12}

GET List by limit and offset 

Consider you want to retrieve perform the following.

  • Limit the number of categories to a maximum of specified limit
  • Display results from the page specified by an offset

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category?isRoot=true&fields=lifecycleStatus,name&limit=3&offset=2

Sample Response 

1200 OK
2{
3  "PageInfo": "Page 3 of 39",
4  "PageSize": 2,
5  "Result": [
6    {
7      "id": "92678182-03e7-8048-d047-93c2c9793ef2",
8      "name": "category demo",
9      "lifecycleStatus": "Active",
10      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bu9pAAA",
11      "@type": "Category"
12    },
13    {
14      "id": "d503b6cc-fb39-48d7-9897-fab9a198f5b6",
15      "name": "category name",
16      "lifecycleStatus": "Active",
17      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bu75AAA",
18      "@type": "Category"
19    }
20  ]
21}

POST 

Consider you want to create a new category.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category

Sample Request 

1{
2    "name" : "Cloud Services mmmm",
3    "version": "1.0",
4    "validFor": {
5        "startDateTime": "2020-08-24T00:00:00Z",
6        "endDateTime": "2024-03-25T00:00:00Z"
7    },
8    "lifecycleStatus": "Active",
9    "isRoot": true,
10    "subCategory": [
11        {
12            "name": "Child Catalog",
13            "id": "1234",
14            "version": "1.0",
15            "@type": "Catalog"
16        }
17    ],
18    "@type": "Category",
19    "@schemaLocation": "https://mycsp.com:8080/tmf-api/schemas/Product/Category.schema.json"
20}

Sample Response 

1{
2    "subCategory": [
3        {
4            "name": "Child Catalog",
5            "id": "d50e9e04-62ff-712e-6242-e37ad7cfff00",
6            "href": "/services/data/v58.0/sobjects/vlocity_cmt__Catalog__c/a0hDn000003yZW9IAM",
7            "@type": "Catalog"
8        }
9    ],
10    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0hDn000003ymYiIAI",
11    "@type": "Category",
12    "validFor": {
13        "startDateTime": "2020-08-24T00:00:00.000+0000",
14        "endDateTime": "2024-03-25T00:00:00.000+0000"
15    },
16    "name": "Cloud Services mmmm",
17    "lifecycleStatus": "Active",
18    "lastUpdate": "2023-06-19T09:52:31.000+0000",
19    "isRoot": true,
20    "id": "8b7fa6db-e5a9-dbe8-b48a-88915ebfde49"
21}

PATCH 

Consider for the category ID: 432b3763-2233-65cd-8ba3-a67a035aab74, you want to update sub-resources: subCategory / productOffering.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/432b3763-2233-65cd-8ba3-a67a035aab74

Sample Request 

1{
2    "subCategory": [
3        {
4            "name": "Cloud Services retest4",
5            "id": "f5a2cf7f-8405-baeb-2a83-f371aa89a303"
6        },
7        {
8            "name": "GS0 Category2-5",
9            "id": "57f0ad75-63ab-3c7a-f738-8fa719c9858e"
10        }
11    ],
12    "description": "A category to hold all available cloud service offers updated",
13    "productOffering": [
14        {
15            "id": "edeafc77-336c-f915-bf13-78d65284de5c",
16            "name": "50 GB Data Postpaid Addon"
17        },
18        {
19            "name": "Postpaid Add On1",
20            "id": "693bb8d1-1c23-8aa8-13f2-561466651a38"
21        }
22    ]
23}

Sample Response 

1{
2    "productOffering": [
3        {
4            "@type": "ProductOffering",
5            "name": "50 GB Data Postpaid Addon",
6            "id": "edeafc77-336c-f915-bf13-78d65284de5c",
7            "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG0eAAE"
8        },
9        {
10            "@type": "ProductOffering",
11            "name": "Postpaid Add On1",
12            "id": "693bb8d1-1c23-8aa8-13f2-561466651a38",
13            "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gFzKAAU"
14        }
15    ],
16    "subCategory": [
17        {
18            "@type": "Catalog",
19            "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOTAAY",
20            "name": "Cloud Services retest4",
21            "id": "f5a2cf7f-8405-baeb-2a83-f371aa89a303"
22        },
23        {
24            "@type": "Catalog",
25            "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bo3WAAQ",
26            "name": "GS0 Category2-5",
27            "id": "57f0ad75-63ab-3c7a-f738-8fa719c9858e"
28        }
29    ],
30    "@type": "Category",
31    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003boMeAAI",
32    "validFor": {
33        "startDateTime": "2020-08-24T00:00:00.000+0000",
34        "endDateTime": "2024-03-25T00:00:00.000+0000"
35    },
36    "lifecycleStatus": "Active",
37    "lastUpdate": "2023-01-19T07:02:37.000+0000",
38    "isRoot": true,
39    "name": "GS0 Category996 updated",
40    "description": "A category to hold all available cloud service offers updated",
41    "id": "432b3763-2233-65cd-8ba3-a67a035aab74"
42}

DELETE 

Consider you want to delete a category ID: 3830.

Sample URL 

https://vlocity-1f5-dev-ed.develop.my.salesforce.com/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/3830

Sample Response 

1204 No content