---
title: Preview the Approval Path
slug: preview-the-approval-path
docTags: 
createdAt: 2026-09-04T03:52:07.814Z
---

{
  "id": "2UdutuW70QJyt7ncCtN82",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/approvals:preview",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/approvals:preview",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/approvals:preview",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Preview the Approval Path",
    "description": "<p>Returns the approval routing a record would follow if it were submitted now, without submitting it or writing anything. <code>requiresApproval</code> reports whether any path applies at all; each path reports <code>willTrigger</code> with the reason, and each step lists its resolved approvers. Use this to surface required approvals while a quote can still be changed.</p>\n<p>The response is the standard approvals envelope: <code>status</code> is <code>SUCCESS</code> or <code>FAILURE</code>, <code>data</code> carries the typed payload, and <code>warnings</code> and <code>errors</code> carry coded messages. Validation and engine failures are reported as coded errors on the envelope rather than as exceptions.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "PreviewApprovalRequest",
          "schema": [
            {
              "name": "recordId",
              "kind": "required",
              "type": "string",
              "description": "ID of the record to preview approval routing for."
            },
            {
              "name": "processName",
              "kind": "optional",
              "type": "string",
              "description": "Approval process name. Omit to let the engine resolve the applicable process."
            }
          ],
          "modelRef": "#/components/schemas/PreviewApprovalRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Approval routing previewed. Nothing is persisted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Envelope returned by the preview verb.",
            "customType": "ApprovalPreviewResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "<p><code>SUCCESS</code> or <code>FAILURE</code>.</p>"
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ApprovalPreviewData",
                "customType": "ApprovalPreviewData",
                "schema": [
                  {
                    "name": "recordId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "requiresApproval",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "<p><code>false</code> when no configured path applies to the record.</p>"
                  },
                  {
                    "name": "resolvedProcessName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Process the engine resolved for this record."
                  },
                  {
                    "name": "paths",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalPreviewPath",
                    "customType": "ApprovalPreviewPath[]",
                    "schema": [
                      {
                        "name": "pathId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "pathName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "willTrigger",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Whether this path applies to the record as it currently stands."
                      },
                      {
                        "name": "dependsOnPathId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "steps",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/ApprovalPreviewStep",
                        "customType": "ApprovalPreviewStep[]",
                        "schema": [
                          {
                            "name": "stepId",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "stepName",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "stepStatus",
                            "kind": "optional",
                            "type": "string",
                            "description": "<p>Step-level rollup status.</p>"
                          },
                          {
                            "name": "triggerReason",
                            "kind": "optional",
                            "type": "string",
                            "description": "Why this step applies to the record."
                          },
                          {
                            "name": "approvalReason",
                            "kind": "optional",
                            "type": "string",
                            "description": "The configured reason recorded when the step is approved."
                          },
                          {
                            "name": "resolveOn",
                            "kind": "optional",
                            "type": "string",
                            "description": "<p>How the step resolves, e.g. when all or any approver responds.</p>"
                          },
                          {
                            "name": "numberOfApprovers",
                            "kind": "optional",
                            "type": "integer",
                            "description": ""
                          },
                          {
                            "name": "dependsOnStepId",
                            "kind": "optional",
                            "type": "string",
                            "description": "Step that must resolve before this one becomes active."
                          },
                          {
                            "name": "isRemembered",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "Whether a prior decision is reused for this step."
                          },
                          {
                            "name": "approvers",
                            "kind": "optional",
                            "type": "array",
                            "description": "",
                            "modelRef": "#/components/schemas/ApprovalApprover",
                            "customType": "ApprovalApprover[]",
                            "schema": [
                              {
                                "name": "approverType",
                                "kind": "optional",
                                "type": "string",
                                "description": "<p>How the approver is resolved, e.g. <code>User</code>, <code>Group</code>, <code>Role</code>.</p>"
                              },
                              {
                                "name": "userId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Salesforce User ID when the approver resolves to a user."
                              },
                              {
                                "name": "name",
                                "kind": "optional",
                                "type": "string",
                                "description": "Display name of the approver."
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApprovalPreviewResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Missing or invalid parameter.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Envelope returned by the approval action verbs.",
            "customType": "ApprovalActionResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "<p><code>SUCCESS</code> or <code>FAILURE</code>.</p>"
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ApprovalActionData",
                "customType": "ApprovalActionData",
                "schema": [
                  {
                    "name": "requestId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "recordId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "isLocked",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "approvers",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalActionItem",
                    "customType": "ApprovalActionItem[]",
                    "schema": [
                      {
                        "name": "approvalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "approverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "originalApproverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "reassignedFromApprovalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "rejectionMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "approvals",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalActionItem",
                    "customType": "ApprovalActionItem[]",
                    "schema": [
                      {
                        "name": "approvalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "approverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "originalApproverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "reassignedFromApprovalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "rejectionMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApprovalActionResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authentication failed or the Salesforce session is unavailable.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Record not found.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "429",
        "description": "Salesforce limit exceeded.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Unexpected or upstream failure.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "wtlu7x_fdczegLhDsGQjL",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/approvals:preview \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"recordId\": \"\"\n     }'"
        },
        {
          "id": "F0mP99uhxFI7YcfI5jU16",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"recordId\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/cpq/approvals:preview\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "HkkCYuo0R6hUPn-fTWd37",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/cpq/approvals:preview\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"recordId\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "DpBECNKi6UWwkWypRSM7Y",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/approvals:preview\"\n\npayload = json.dumps({\n   \"recordId\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "wtlu7x_fdczegLhDsGQjL"
    },
    "results": {
      "languages": [
        {
          "id": "LIASAoYxCYTa3vFWaFRB-",
          "language": "200",
          "code": "// Approval routing previewed. Nothing is persisted.\n{\n  \"status\": \"\",\n  \"data\": {\n    \"recordId\": \"\",\n    \"requiresApproval\": false,\n    \"resolvedProcessName\": \"\",\n    \"paths\": [\n      {\n        \"pathId\": \"\",\n        \"pathName\": \"\",\n        \"willTrigger\": false,\n        \"dependsOnPathId\": \"\",\n        \"steps\": [\n          {\n            \"stepId\": \"\",\n            \"stepName\": \"\",\n            \"stepStatus\": \"\",\n            \"triggerReason\": \"\",\n            \"approvalReason\": \"\",\n            \"resolveOn\": \"\",\n            \"numberOfApprovers\": 0,\n            \"dependsOnStepId\": \"\",\n            \"isRemembered\": false,\n            \"approvers\": [\n              {\n                \"approverType\": \"\",\n                \"userId\": \"\",\n                \"name\": \"\"\n              }\n            ]\n          }\n        ]\n      }\n    ]\n  },\n  \"warnings\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ],\n  \"errors\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "kC8ZE-Eg4MXBXFamPM5it",
          "language": "400",
          "code": "// Missing or invalid parameter.\n{\n  \"status\": \"\",\n  \"data\": {\n    \"requestId\": \"\",\n    \"recordId\": \"\",\n    \"status\": \"\",\n    \"isLocked\": false,\n    \"approvers\": [\n      {\n        \"approvalId\": \"\",\n        \"stepName\": \"\",\n        \"stepStatus\": \"\",\n        \"approverUserId\": \"\",\n        \"originalApproverUserId\": \"\",\n        \"reassignedFromApprovalId\": \"\",\n        \"rejectionMessage\": \"\"\n      }\n    ],\n    \"approvals\": [\n      {\n        \"approvalId\": \"\",\n        \"stepName\": \"\",\n        \"stepStatus\": \"\",\n        \"approverUserId\": \"\",\n        \"originalApproverUserId\": \"\",\n        \"reassignedFromApprovalId\": \"\",\n        \"rejectionMessage\": \"\"\n      }\n    ]\n  },\n  \"warnings\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ],\n  \"errors\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "D5skPsN87PLV456jgJPdY",
          "language": "401",
          "code": "// Authentication failed or the Salesforce session is unavailable.\n"
        },
        {
          "id": "OX_XtxNdtJONiiDvHrUSh",
          "language": "404",
          "code": "// Record not found.\n"
        },
        {
          "id": "kl_lC-BtnY6z8byv9W3yb",
          "language": "429",
          "code": "// Salesforce limit exceeded.\n"
        },
        {
          "id": "je06rbJpyrs9bbjpyYv77",
          "language": "500",
          "code": "// Unexpected or upstream failure.\n"
        }
      ],
      "selectedLanguageId": "LIASAoYxCYTa3vFWaFRB-"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}