Get Compact Layouts Using sObject CompactLayouts

Retrieves a list of compact layouts for a specific object. This resource is available in REST API version 29.0 and later.

URI: /services/data/vXX.X/sobjects/sObject/describe/compactLayouts/

Formats: JSON, XML

HTTP methods: GET

Authentication: Authorization: Bearer token

Request parameters: None required

Example Request

Example Response Body

If you haven’t defined any compact layouts for an object, the compactLayoutId returns as Null.

This sample JSON response is for compact layouts created on the Account object. In this example, only one custom compact layout was created for Account. The custom compact layout is assigned as the primary compact layout for the object, and it contains two fields: Account Name and Phone.