ID for picklist value in record API

ID for picklist value in record API


Picklist data field type returns a simple string value via get record REST, i. e.

/crm/v2.1/Conctacts/1306462000000888026

  1. {
  2. ...
  3.    "id": "1306462000000888026",
  4.    "CustomType": "foo" // 'CustomType' is my custom picklist field 
  5. ...
  6. }

CustomType picklist has several values defined, let's imagine 3 options for the sake of the example: "foo", "bar", "baz".

when retrieving values via Records API, it would be much safer to have the ability to retrieve the key of the "foo" value as "foo" string is not stable.

"foo" option is indeed represented by an ID in the Meta Data API, however, the underlying question is how does Zoho store picklist values in records - is it a reference to the picklist or direct (string) value?

if it was the latter returning full object this should be possible and welcome for picklists, similar to what is done for other objects such as Modified By below

  1. {
  2. ...
  3.    "id": "1306462000000888026",
  4.    "CustomType": {
  5.      "value": "foo",
  6.      "id": "12345"
  7.    }
  8. ...
  9. }

"Modified_By": {
                "name": "Patricia Boyle",
                "id": "1306462000000374001",
                "email": "..."
            },