[SalesForce] Getting picklist values for record type through REST API

My org has two record types on the Event sobject. There is one field (of type picklist) that has different values for each layout. I need to get the unique fields for one record type.

When I call the describe function on the Event object it just gives me all picklist values.

When I call the describe layout function (/services/data/vXXX/sobjects/Event/describe/layouts) it returns a list of recordTypeMappings and the correct record types are there, but for each record type there is a prop picklistsForRecordType which is strangely empty. Even though in the SF setup there are multiple picklists that should seemingly show up there.

Any idea what I'm doing wrong?

Best Answer

You can get the picklist values for a recordType by ui-api . you need to replace the url with

/services/data/v48.0/ui-api/object-info/{objectAPIName}/picklist-values/{recordTypeID}