Category Use Cases

I want to Request Type Example URL
Retrieve and display details of a requested category. GET by ID {https<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}<br><br>NOTE:<br>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<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}?fields=name,id<br>
List all the categories present in the system. GET List {https<nolink>://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<nolink>://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<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category?fields=lifecycleStatus,lastUpdate
Limit the number of categories to a maximum of specified limit and<br>display results from the page specified by an offset. GET List by limit and offset {https<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category?isRoot=true&fields=lifecycleStatus,name&limit=3&offset=2<br>
Create a category. POST {https<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category<br>
Update a category. PATCH {https<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}
Delete a category. DELETE {https<nolink>://MyDomainLoginUrl}/services/apexrest/{namespace}/tmforum/productopenapi/v1/category/{ID}<br>

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

200 OK
{
  "PageInfo": "Page 1 of 1",
  "PageSize": 50,
  "Result": {
    "id": "432b3763-2233-65cd-8ba3-a67a035aab74",
    "description": "A category to hold all available cloud service offers",
    "name": "GS0 Category996",
    "isRoot": true,
    "lastUpdate": "2022-07-28T10:42:56.000+0000",
    "lifecycleStatus": "Active",
    "validFor": {
      "endDateTime": "2024-03-25T00:00:00.000+0000",
      "startDateTime": "2020-08-24T00:00:00.000+0000"
    },
    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003boMeAAI",
    "@type": "Category",
    "subCategory": [
      {
        "id": "dba5604b-115b-ff1c-cb98-135b3073f037",
        "name": "GS0 Category008",
        "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003boMfAAI",
        "@type": "Catalog"
      },
      {
        "id": "0494e298-7457-3446-4f68-fce852be06a0",
        "name": "GS0 Category009",
        "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003boMjAAI",
        "@type": "Catalog"
      }
    ]
  }
}

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

200 OK
{
  "PageInfo": "Page 1 of 1",
  "PageSize": 50,
  "Result": {
    "@referredType": "vlocity_cmt__Catalog__c",
    "id": "7cc8a363-51ab-2413-7214-6bf24f90e856",
    "name": "Cloud Services T",
    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/catalog/a0e5e000003biUxAAI",
    "@type": "Catalog"
  }
}

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

200 OK
{
  "PageInfo": "Page 1 of 3",
  "PageSize": 50,
  "Result": [
    {
      "id": "be03bc15-8f67-c5a4-379e-32f4acf3cb96",
      "description": "ADDON Root catalog",
      "name": "Add On",
      "isRoot": true,
      "lastUpdate": "2022-04-04T05:48:27.000+0000",
      "lifecycleStatus": "Active",
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bKGIAA2",
      "@type": "Category",
      "subCategory": [
        {
          "id": "15847f92-c3df-162a-50a1-3917a1dcf333",
          "name": "Prepaid Add On",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bKFjAAM",
          "@type": "Catalog"
        }
      ]
    },
    {
      "id": "3d6a1b15-6778-9ed0-e8ba-395f72540246",
      "description": "This catalog describes Product Offerings and technical specifications     intended to address the wholesale business segment.",
      "name": "Catalog Wholesale Business",
      "isRoot": false,
      "lastUpdate": "2022-06-08T15:25:23.000+0000",
      "lifecycleStatus": "Active",
      "validFor": {
        "endDateTime": "2024-03-25T00:00:00.000+0000",
        "startDateTime": "2020-08-29T00:00:00.000+0000"
      },
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bgZXAAY",
      "@type": "Category",
      "subCategory": [
        {
          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
          "@type": "Catalog"
        }
      ]
    },
    {
      "id": "d4275490-89d8-bc3c-7cfe-4b8ce7df2548",
      "description": "A category to hold all available cloud service offers",
      "name": "Cloud Services retest",
      "isRoot": true,
      "lastUpdate": "2022-06-30T04:15:18.000+0000",
      "lifecycleStatus": "Active",
      "validFor": {
        "endDateTime": "2024-03-25T00:00:00.000+0000",
        "startDateTime": "2020-08-24T00:00:00.000+0000"
      },
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bjyMAAQ",
      "@type": "Category",
      "subCategory": [
        {
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
          "@type": "Catalog"
        },
        {
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
          "@type": "Catalog"
        }
      ]
    },
    {
      "id": "0defa8d6-9a10-d755-3e7c-9124bc1e3ae1",
      "description": "A category to hold all available cloud service offers",
      "name": "Cloud test Services",
      "isRoot": false,
      "lastUpdate": "2022-06-16T04:22:11.000+0000",
      "lifecycleStatus": "Active",
      "validFor": {
        "endDateTime": "2024-03-25T00:00:00.000+0000",
        "startDateTime": "2020-08-24T00:00:00.000+0000"
      },
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bhugAAA",
      "@type": "Category",
      "subCategory": [
        {
          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
          "@type": "Catalog"
        }
      ]
    },
    {
      "id": "7cc8a363-51ab-2413-7214-6bf24f90e856",
      "description": "A category to hold all available cloud service offers",
      "name": "Cloud Services T",
      "isRoot": false,
      "lastUpdate": "2022-06-30T04:31:14.000+0000",
      "lifecycleStatus": "Active",
      "validFor": {
        "endDateTime": "2024-03-25T00:00:00.000+0000",
        "startDateTime": "2020-08-24T00:00:00.000+0000"
      },
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003biUxAAI",
      "@type": "Category",
      "subCategory": [
        {
          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
          "@type": "Catalog"
        }
      ]
    },
    {
      "id": "9b900254-2bc3-ba43-cc0f-b102ef9f18af",
      "description": "A category to hold all available cloud service offers",
      "name": "Cloud Services retest",
      "isRoot": false,
      "lastUpdate": "2022-06-23T05:49:46.000+0000",
      "lifecycleStatus": "Active",
      "validFor": {
        "endDateTime": "2024-03-25T00:00:00.000+0000",
        "startDateTime": "2020-08-24T00:00:00.000+0000"
      },
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003biu4AAA",
      "@type": "Category",
      "subCategory": [
        {
          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d",
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bfqlAAA",
          "@type": "Catalog"
        }
      ]
    },
    {
      "id": "cbb24487-16aa-d5b4-4b19-b8156bd0d608",
      "description": "A category to hold all available cloud service offers",
      "name": "Cloud Services creating 5",
      "isRoot": true,
      "lastUpdate": "2022-07-13T10:01:57.000+0000",
      "lifecycleStatus": "Active",
      "validFor": {
        "endDateTime": "2024-03-25T00:00:00.000+0000",
        "startDateTime": "2020-08-24T00:00:00.000+0000"
      },
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003blkaAAA",
      "@type": "Category",
      "subCategory":[

        {
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
          "@type": "Catalog",
          "id": "a960f423-2431-f36c-d528-9bbb2a7b3724"
        },
        {
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
          "@type": "Catalog",
          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d"
        },
        {
          "name": "Cloud Storage",
          "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOAAAY",
          "@type": "Catalog",
          "id": "03ed94db-2d33-af8e-f785-deddd0d6657d"
        }
      ],
      "productOffering": [

        {
          "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gsxnAAA",
          "id": "a960f423-2431-f36c-d528-9bbb2a7b3724",
          "name": "Airtel Wifi Router 123 test",
          "@type": "ProductOffering"
        },
        {
          "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gFzMAAU",
          "id": "abbc2f2f-a78d-cbdb-4265-92118b4c3e4e",
          "name": "100GB Postpaid Plan",
          "@type": "ProductOffering"
        }
      ]
    }
]

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

200 OK
  {
  "PageInfo": "Page 1 of 1",
  "PageSize": 50,
  "Result": {
    "id": "ad2afce3-2690-10f8-f765-16e0a0bb9bbd",
    "description": "Postpaid add on catalog",
    "name": "Postpaid Add On",
    "isRoot": false,
    "lastUpdate": "2022-04-04T05:47:50.000+0000",
    "lifecycleStatus": "Active",
    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bKFeAAM",
    "@type": "Category",
    "productOffering": [
      {
        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gFzKAAU",
        "id": "693bb8d1-1c23-8aa8-13f2-561466651a38",
        "name": "10 GB Data Postpaid Addon",
        "@type": "ProductOffering"
      },
      {
        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG3sAAE",
        "id": "5cd51d35-3413-c28b-3869-4faf56a0eb22",
        "name": "10GB, 500 Minutes & 500 Texts Postpaid Addon",
        "@type": "ProductOffering"
      },
      {
        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG0eAAE",
        "id": "edeafc77-336c-f915-bf13-78d65284de5c",
        "name": "50 GB Data Postpaid Addon",
        "@type": "ProductOffering"
      },
      {
        "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG0bAAE",
        "id": "cdced4ad-719e-6670-be85-8d55bf855f11",
        "name": "5GB, 500 Minutes & 500 Texts Postpaid Addon",
        "@type": "ProductOffering"
      }
    ]
  }
}

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

200 OK
{
  "PageInfo": "Page 1 of 1",
  "PageSize": 50,
  "Result": {
    "id": "ad2afce3-2690-10f8-f765-16e0a0bb9bbd",
    "lastUpdate": "2022-04-04T05:47:50.000+0000",
    "lifecycleStatus": "Active",
    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bKFeAAM",
    "@type": "Category"
  }
}

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

200 OK
{
  "PageInfo": "Page 3 of 39",
  "PageSize": 2,
  "Result": [
    {
      "id": "92678182-03e7-8048-d047-93c2c9793ef2",
      "name": "category demo",
      "lifecycleStatus": "Active",
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bu9pAAA",
      "@type": "Category"
    },
    {
      "id": "d503b6cc-fb39-48d7-9897-fab9a198f5b6",
      "name": "category name",
      "lifecycleStatus": "Active",
      "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003bu75AAA",
      "@type": "Category"
    }
  ]
}

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

{
    "name" : "Cloud Services mmmm",
    "version": "1.0",
    "validFor": {
        "startDateTime": "2020-08-24T00:00:00Z",
        "endDateTime": "2024-03-25T00:00:00Z"
    },
    "lifecycleStatus": "Active",
    "isRoot": true,
    "subCategory": [
        {
            "name": "Child Catalog",
            "id": "1234",
            "version": "1.0",
            "@type": "Catalog"
        }
    ],
    "@type": "Category",
    "@schemaLocation": "https://mycsp.com:8080/tmf-api/schemas/Product/Category.schema.json"
}

Sample Response

{
    "subCategory": [
        {
            "name": "Child Catalog",
            "id": "d50e9e04-62ff-712e-6242-e37ad7cfff00",
            "href": "/services/data/v58.0/sobjects/vlocity_cmt__Catalog__c/a0hDn000003yZW9IAM",
            "@type": "Catalog"
        }
    ],
    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0hDn000003ymYiIAI",
    "@type": "Category",
    "validFor": {
        "startDateTime": "2020-08-24T00:00:00.000+0000",
        "endDateTime": "2024-03-25T00:00:00.000+0000"
    },
    "name": "Cloud Services mmmm",
    "lifecycleStatus": "Active",
    "lastUpdate": "2023-06-19T09:52:31.000+0000",
    "isRoot": true,
    "id": "8b7fa6db-e5a9-dbe8-b48a-88915ebfde49"
}

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

{
    "subCategory": [
        {
            "name": "Cloud Services retest4",
            "id": "f5a2cf7f-8405-baeb-2a83-f371aa89a303"
        },
        {
            "name": "GS0 Category2-5",
            "id": "57f0ad75-63ab-3c7a-f738-8fa719c9858e"
        }
    ],
    "description": "A category to hold all available cloud service offers updated",
    "productOffering": [
        {
            "id": "edeafc77-336c-f915-bf13-78d65284de5c",
            "name": "50 GB Data Postpaid Addon"
        },
        {
            "name": "Postpaid Add On1",
            "id": "693bb8d1-1c23-8aa8-13f2-561466651a38"
        }
    ]
}

Sample Response

{
    "productOffering": [
        {
            "@type": "ProductOffering",
            "name": "50 GB Data Postpaid Addon",
            "id": "edeafc77-336c-f915-bf13-78d65284de5c",
            "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gG0eAAE"
        },
        {
            "@type": "ProductOffering",
            "name": "Postpaid Add On1",
            "id": "693bb8d1-1c23-8aa8-13f2-561466651a38",
            "href": "/services/data/v56.0/sobjects/Product2/01t5e000003gFzKAAU"
        }
    ],
    "subCategory": [
        {
            "@type": "Catalog",
            "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bjOTAAY",
            "name": "Cloud Services retest4",
            "id": "f5a2cf7f-8405-baeb-2a83-f371aa89a303"
        },
        {
            "@type": "Catalog",
            "href": "/services/data/v56.0/sobjects/vlocity_cmt__Catalog__c/a0e5e000003bo3WAAQ",
            "name": "GS0 Category2-5",
            "id": "57f0ad75-63ab-3c7a-f738-8fa719c9858e"
        }
    ],
    "@type": "Category",
    "href": "/services/apexrest/vlocity_cmt/tmforum/productopenapi/v1/category/a0e5e000003boMeAAI",
    "validFor": {
        "startDateTime": "2020-08-24T00:00:00.000+0000",
        "endDateTime": "2024-03-25T00:00:00.000+0000"
    },
    "lifecycleStatus": "Active",
    "lastUpdate": "2023-01-19T07:02:37.000+0000",
    "isRoot": true,
    "name": "GS0 Category996 updated",
    "description": "A category to hold all available cloud service offers updated",
    "id": "432b3763-2233-65cd-8ba3-a67a035aab74"
}

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

204 No content