Skip to main content
Skip table of contents

What API do I use to create/update picklists?

Picklist API

Example 1 - Creating Picklist sets only

CODE
{
  "name": "TestPicklistSet1",
  "displayname": "Test Picklist Set 1"
}

Example 2 - Creating picklist sets and options together

CODE
{
  "name": "TestPicklistSet3",
  "displayname": "Test Picklist Set 3",
  "picklistoptions": [
    {
      "name": "Picklist Option 1",
      "value": 1,
      "code": "code",
      "description": "Description is optional",
      "isactive": false
    },
    {
      "name": "Picklist Option 2",
      "value": 2
    }
  ]
}

Example 3 - Updating Picklist options

CODE
{
  "name": "TestPicklistSet3",
  "displayname": "Test Picklist Set 3",
  "picklistoptions": [
    {
      "name": "Picklist Option 1",
      "description": "updating description",
      "isactive": true
    }
  ]
}

Sample Response

CODE
{
  "success": true,
  "message": "Processed 1 items, Failed to process 0 items",
  "output": {
    "processedItems": [
      {
        "message": "record successfully created",
        "record": {}
      }
    ],
    "unProcessedItems": [
      {
        "message": "Batch execute error while creating and the error is - ...",
        "record": {}
      }
    ]
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.