Compact Layouts

Returns a list of compact layouts for multiple objects. This resource is available in REST API version 31.0 and later.
This resource returns the primary compact layout for a set of objects. The set of objects is specified using a query parameter. Up to 100 objects can be queried at once.

PersonAccount isn��t supported for bulk queries. If you want to get the primary compact layout for PersonAccount, get it directly from /services/data/v67.0/sobjects/Account/describe/compactLayouts/primaryPersonAccount.

Note

Syntax

URI
/services/data/vXX.X/compactLayouts?q=objectList
Formats
JSON, XML
HTTP methods
GET
Authentication
Authorization: Bearer token
Request parameters
Parameter Description
q A comma-delimited list of objects. The primary compact layout for each object in this list will be returned in the response of this resource.

Example

Example Request
1curl https://MyDomainName.my.salesforce.com/services/data/v67.0/compactLayouts?q=Account,Contact,CustomObj__c -H "Authorization: Bearer token"
Example Response Body
1{
2  "Account" : {
3    "actions" : [ {
4      "behavior" : null,
5      "content" : null,
6      "contentSource" : null,
7      "custom" : false,
8      "encoding" : null,
9      "height" : null,
10      "icons" : null,
11      "label" : "Call",
12      "menubar" : false,
13      "name" : "CallHighlightAction",
14      "overridden" : false,
15      "resizeable" : false,
16      "scrollbars" : false,
17      "showsLocation" : false,
18      "showsStatus" : false,
19      "toolbar" : false,
20      "url" : null,
21      "width" : null,
22      "windowPosition" : null
23    },
24    ...
25    "id" : "0AHD000000000AbOAI",
26    "label" : "Custom Account Compact Layout",
27    "name" : "Custom_Account_Compact_Layout"
28  },
29  "Contact" : {
30    "actions" : [ {
31      "behavior" : null,
32      "content" : null,
33      "contentSource" : null,
34      "custom" : false,
35      "encoding" : null,
36      "height" : null,
37      "icons" : null,
38      "label" : "Call",
39      "menubar" : false,
40      "name" : "CallHighlightAction",
41      "overridden" : false,
42      "resizeable" : false,
43      "scrollbars" : false,
44      "showsLocation" : false,
45      "showsStatus" : false,
46      "toolbar" : false,
47      "url" : null,
48      "width" : null,
49      "windowPosition" : null
50    },
51    ...
52    "id" : null,
53    "label" : "System Default",
54    "name" : "SYSTEM"
55  }
56  "CustomObj__c" : {
57    "actions" : [ {
58      "behavior" : null,
59      "content" : null,
60      "contentSource" : null,
61      "custom" : false,
62      "encoding" : null,
63      "height" : null,
64      "icons" : null,
65      "label" : "Call",
66      "menubar" : false,
67      "name" : "CallHighlightAction",
68      "overridden" : false,
69      "resizeable" : false,
70      "scrollbars" : false,
71      "showsLocation" : false,
72      "showsStatus" : false,
73      "toolbar" : false,
74      "url" : null,
75      "width" : null,
76      "windowPosition" : null
77    },
78    ...
79    "id" : null,
80    "imageItems" : null,
81    "label" : "System Default",
82    "name" : "SYSTEM"
83  }
84}