Newer Version Available

This content describes an older version of this product. View Latest

sObject ApprovalLayouts

Returns a list of approval layouts for a specified object. Specify a particular approval process name to limit the return value to one specific approval layout. This resource is available in REST API version 30.0 and later.

Syntax

URI
To get an approval layout description for a specified object, use /services/data/vXX.X/sobjects/sObject/describe/approvalLayouts/
To get an approval layout description for a particular approval process, use /services/data/vXX.X/sobjects/sObject/describe/approvalLayouts/approvalProcessName
Formats
JSON, XML
HTTP methods
HEAD, GET
Authentication
Authorization: Bearer token
Request parameters
None required

Example

Getting all approval layouts for an sObject
1curl https://MyDomainName.my.salesforce.com/services/data/v54.0/sobjects/Account/describe/approvalLayouts/ -H "Authorization: Bearer token"
Example JSON Response body
1{
2  "approvalLayouts" : [ {
3    "id" : "04aD00000008Py9IAE",
4    "label" : "MyApprovalProcessName",
5    "layoutItems" : [...],
6    "name" : "MyApprovalProcessName"
7    }, {
8    "id" : "04aD00000008Q0KIAU",
9    "label" : "Process1",
10    "layoutItems" : [...],
11    "name" : "Process1"
12  } ]
13}
If you haven’t defined any approval layouts for an object, the response is {"approvalLayouts" : [ ]}.
Getting the approval layout for a particular approval process
1curl https://MyDomainName.my.salesforce.com/services/data/v54.0/sobjects/Account/describe/approvalLayouts/MyApprovalProcessName -H "Authorization: Bearer token"
Example JSON Response body
1{
2  "approvalLayouts" : [ {
3    "id" : "04aD00000008Py9IAE",
4    "label" : "MyApprovalProcessName",
5    "layoutItems" : [...],
6    "name" : "MyApprovalProcessName"
7  } ]
8}