Question:
With the following API endpoint, only Active picklist values can be retrieved.
GET /api/{version}/objects/picklists/{picklist_name}
Is there a way to retrieve all the picklist values including the Inactive values?
Answer:
The configuration API endpoint for the Picklist obtains active and inactive values:
https://{vaultDNS}/api/{version}/configuration/Picklist.{picklist name}
Example:
https://aaa.veevavault.com/api/v21.3/configuration/Picklist.my_picklist__c
Response:
{
"responseStatus": "SUCCESS",
"data": {
"name": "picklist_abby__c",
"label": "Picklist Abby",
"Picklistentry": [
{
"name": "a__c",
"value": "A",
"order": 0,
"active": false
},
{
"name": "b__c",
"value": "B",
"order": 1,
"active": true
}
]
}
}
Related Documentation:
Vault Help Documentation: Retrieve Component Record (XML/JSON)