HCL Commerce Version 9.1.14.0 or later

Adding support to get additional fields associated with the offer for display price REST API

You can see the start and end date in the response if you add these configuration properties.

  • Add the following lines of code in the wc-component.xml file at the wc\xml\config\com.ibm.commerce.price\wc-component.xml location:
    <_config:extendedconfiguration>
    <_config:configgrouping name="GetCustomizedFieldsForOffer">
    <_config:property name="enabled" value="true" />
    <_config:property name="offerFields" value="StartDate,EndDate" />
    </_config:configgrouping>
    </_config:extendedconfiguration>
  • After adding the above configuration properties, restart the Transaction server and run the Display price API. See Price for more information.
  • You can see the start and end date in the response. The response is as shown below:
    "resourceName": "display_price",
    "resultList": [
    {"unitPrice": [
    {
    "quantity": 
    {
    "uom": "C62",
    "value": 1.0}
    ,
    "price": 
    {
    "currency": "USD",
    "value": 250.00}
    }
    ],
    "catalogEntryId": "10004",
    "x_EndDate": "2023-06-19 00:00:00.0",
    "x_StartDate": "2000-06-19 00:00:00.0",
    "priceRuleId": "10001"
    }
    ]