Update Picklist Items

Update items in a picklist by specifying the ID of the picklist in the URI. You must also specify the ID of the item and the fields that you want to update in the request body.

1PUT /v2/epc/picklists/{picklist_ID}/items

Remote Method 

1updatePicklistItem

REST Handler 

1APIPicklistItemRestHandler

Apex Remote Service 

1PCAppHandler

Package 

Communication (vlocity_cmt)

API Parameters and Response Format 

For API parameter names and descriptions, see the Swagger (OpenAPI) reference documentation for Industries EPC REST APIs.

Resource Information 

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/epc/picklists/{picklist_ID}/items

Example Request 

1PUT v2/epc/picklists/a3K3h0000006Aj3EAE/items
2
3{
4  "epcRequest": {
5    "entity": {
6      "Id": "{Picklist-Item-ID}",
7      "vlocity_cmt__Description__c": "Description",
8      "vlocity_cmt__IsActive__c": true,
9      "vlocity_cmt__ActionType__c": "Add",
10      "vlocity_cmt__MaxQuantity__c": 10,
11      "vlocity_cmt__MinQuantity__c": 2,
12      "vlocity_cmt__Quantity__c": 2,
13      "vlocity_cmt__UpdateScope__c": "Update Item Only",
14      "vlocity_cmt__ContextProductId__c": ""
15    }
16  }
17}

Example Result 

1{
2    "epcResponse": {
3        "entities": [
4            {
5                "entity": {
6                    "attributes": {
7                        "type": "vlocity_cmt__PicklistItem__c",
8                        "url": "/services/data/v52.0/sobjects/vlocity_cmt__PicklistItem__c/a3J3h000000I4KKEA0"
9                    },
10                    "Id": "a3J3h000000I4KKEA0",
11                    "IsDeleted": false,
12                    "Name": "a3J3h000000I4KK",
13                    "CurrencyIsoCode": "USD",
14                    "CreatedDate": "2021-09-07T06:36:09.000+0000",
15                    "CreatedById": "0053h000002UGCUAA4",
16                    "LastModifiedDate": "2021-09-07T07:36:47.000+0000",
17                    "LastModifiedById": "0053h000002UGCUAA4",
18                    "SystemModstamp": "2021-09-07T07:36:47.000+0000",
19                    "vlocity_cmt__PicklistId__c": "a3K3h0000006Aj3EAE",
20                    "vlocity_cmt__ActionType__c": "Add",
21                    "vlocity_cmt__Description__c": "Description",
22                    "vlocity_cmt__IsActive__c": true,
23                    "vlocity_cmt__IsUndoable__c": false,
24                    "vlocity_cmt__MaxQuantity__c": 10.00,
25                    "vlocity_cmt__MinQuantity__c": 2.00,
26                    "vlocity_cmt__ProductHierarchyGlobalKeyPath__c": "20b3380d-5c42-f7db-4508-beff916feee1",
27                    "vlocity_cmt__ProductHierarchyGroupKeyPath__c": "f4a0d9e2-d6cd-59f8-8c20-c14298a2f4f2",
28                    "vlocity_cmt__ProductId__c": "01t3h000002TMciAAG",
29                    "vlocity_cmt__Quantity__c": 2.00,
30                    "vlocity_cmt__UpdateScope__c": "Update Item Only",
31                    "vlocity_cmt__GlobalGroupKey__c": "94bc0ea2-1a16-50b4-9e52-6f2fa7f8c53b",
32                    "vlocity_cmt__ProductId__r": {
33                        "attributes": {
34                            "type": "Product2",
35                            "url": "/services/data/v52.0/sobjects/Product2/01t3h000002TMciAAG"
36                        },
37                        "Id": "01t3h000002TMciAAG",
38                        "Name": "India V1.1",
39                        "ProductCode": "India V1.1",
40                        "vlocity_cmt__VersionLabel__c": "Version - V1.1"
41                    },
42                    "vlocity_cmt__PicklistId__r": {
43                        "attributes": {
44                            "type": "vlocity_cmt__Picklist__c",
45                            "url": "/services/data/v52.0/sobjects/vlocity_cmt__Picklist__c/a3K3h0000006Aj3EAE"
46                        },
47                        "Id": "a3K3h0000006Aj3EAE",
48                        "Name": "Picklist-Example",
49                        "vlocity_cmt__PriceListId__c": "a343h000001ACXFAA4",
50                        "vlocity_cmt__PriceListId__r": {
51                            "attributes": {
52                                "type": "vlocity_cmt__PriceList__c",
53                                "url": "/services/data/v52.0/sobjects/vlocity_cmt__PriceList__c/a343h000001ACXFAA4"
54                            },
55                            "Id": "a343h000001ACXFAA4",
56                            "Name": "ShamPriceList"
57                        }
58                    }
59                }
60            }
61        ],
62        "overallResult": "success"
63    }
64}