Get Lists of Values

Retrieve time plans, time policies, and adjustment codes. The Price Adjustment dialog box enables a user to pick a time plan and time policy to associate with a recurring adjustment or to pick a code that defines an adjustment for a specific price, such as a recurring charge, one-time charge, one-time total, and so on.

1GET /v2/listsofvalues?listkeys={type_of_list}&cartId={cart_ID}&id={line_item_ID}&fields={field_name}&PricingVariableCode={price_variable_code}

Remote Method 

1getListsOfValues

Package 

Communication (vlocity_cmt)

API Parameters and Response Format 

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Resource Information 

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/listsofvalues

Example Request 

1GET
2/services/apexrest/vlocity_cmt/v2/listsofvalues?listkeys=AdjustmentCodes&cartId=80146000000goGvAAI&id=80246000000gaR9AAI&fields=vlocity_cmt__OneTimeCharge__c&PricingVariableCode=OT_STD_PRC

Example Response 

1{
2   "totalSize": 1,
3   "messages": [],
4   "records": [
5      {
6         "messages": [],
7         "displaySequence": -1,
8         "id": "80246000000gZfOAAU",
9         "vlocity_cmt__OneTimeCharge__c": {
10            "pricedetail": [
11               {
12                  "actions": {},
13                  "DetailType": "PRICE",
14                  "Description": "$50 One Time Standard Price",
15                  "StartValue": 50,
16                  "EndValue": 50,
17                  "AdjustmentType": "None",
18                  "AdjustmentMethod": null,
19                  "AdjustmentValue": 0
20               },
21               {
22                  "actions": {},
23                  "DetailType": "ADJUSTMENT",
24                  "Description": "5% Discount on OT Std Price due to Bundle A...",
25                  "StartValue": 50,
26                  "EndValue": 47.5,
27                  "AdjustmentType": "Discount",
28                  "AdjustmentMethod": "Percent",
29                  "AdjustmentValue": -5
30                  },
31                  {
32                     "actions": {},
33                     "DetailType": "ADJUSTMENT",
34                     "Description": "10% Discount on OT Std Price due to Promotion 'Add Bundle A'",
35                     "StartValue": 47.5,
36                     "EndValue": 42.5,
37                     "AdjustmentType": "Discount",
38                     "AdjustmentMethod": "Percent",
39                     "AdjustmentValue": -10
40                  },
41                  {
42                     "actions": {},
43                     "DetailType": "ADJUSTMENT",
44                     "Description": "Additional 10% - Add Child 2 Promo",
45                     "StartValue": 42.5,
46                     "EndValue": 37.5,
47                     "AdjustmentType": "Discount",
48                     "AdjustmentMethod": "Percent",
49                     "AdjustmentValue": -10
50                  }
51               ]
52            }
53         }
54      ]
55}

Example Request 

1GET
2/services/apexrest/vlocity_cmt/v2/listsofvalues?listkeys=TimePlans,TimePolicies

Example Response 

1{
2  "totalSize": 2,
3  "messages": [],
4  "records": [
5    {
6      "messages": [],
7      "displaySequence": -1,
8      "listkey": "TimePlans",
9      "listvalues": [
10        {
11          "uiStates": {},
12          "nameResult": {},
13          "messages": [],
14          "fields": {
15            "valuekey": "a2l460000005J5xAAE",
16            "label": "One Year"
17          },
18          "displaySequence": -1,
19          "actions": {}
20        },
21        {
22          "uiStates": {},
23          "nameResult": {},
24          "messages": [],
25          "fields": {
26            "valuekey": "a2l460000005J1ZAAU",
27            "label": "60 Days"
28          },
29          "displaySequence": -1,
30          "actions": {}
31        },
32        {
33          "uiStates": {},
34          "nameResult": {},
35          "messages": [],
36          "fields": {
37            "valuekey": "a2l460000005J1UAAU",
38            "label": "6 months"
39          },
40          "displaySequence": -1,
41          "actions": {}
42        }
43      ]
44    },
45    {
46      "messages": [],
47      "displaySequence": -1,
48      "listkey": "TimePolicies",
49      "listvalues": [
50        {
51          "uiStates": {},
52          "nameResult": {},
53          "messages": [],
54          "fields": {
55            "valuekey": "a2m460000004xcvAAA",
56            "label": "First Day of the Month"
57          },
58          "displaySequence": -1,
59          "actions": {}
60        },
61        {
62          "uiStates": {},
63          "nameResult": {},
64          "messages": [],
65          "fields": {
66            "valuekey": "a2m460000004xbfAAA",
67            "label": "Time Policy Purchase Date"
68          },
69          "displaySequence": -1,
70          "actions": {}
71        }
72      ]
73    }
74  ]
75}