Create Picklist Values
Add new values to a picklist. Learn about picklist limits in Vault Help
POST
/api/{version}/objects/picklists/{picklist_name}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{picklist_name} | The picklist name field value (license_type__v, product_family__c, region__c, etc.) |
Body Parameters
Section link for Body ParametersIn the body of the request, use value_1, value_2, etc., set to alphanumeric values. Enter each new picklist value label as they will be displayed in the UI.
You do not need to enter a name value, instead, Vault uses the label to create the picklist value name.
You cannot specify picklist order on creation. New picklist values are added in the order they are submitted, after any existing values in the picklist. To re-order picklist values, use the Vault UI or Vault Toolbox.
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "value_1=North America" \
-d "value_2=Central America" \
-d "value_3=South America" \
https://myvault.veevavault.com/api/v26.1/objects/picklists/regions__cResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Created picklist value(s).",
"picklistValues": [
{
"name": "north_america__c",
"label": "North America"
},
{
"name": "central_america__c",
"label": "Central America"
},
{
"name": "south_america__c",
"label": "South America"
}
]
}Response Details
Section link for Response Details| Metadata Field | Description |
|---|---|
name | The picklist value name. This is used to reference this value in the API, and displayed to Vault Admins in the UI. |
label | The picklist value label. Users see this label when selecting picklist values. Maximum 128 characters. |