---
title: Get Approval For Account
slug: single-connect-api-3-0-3/get-approval-for-account
description: Learn how to use the curl command to effortlessly make a POST request to any desired URL using this step-by-step code example. Understand the importance of including headers for accepting and sending JSON data, and effortlessly send a string in your reque
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "Cx3WgcTF2AhEtSIIb7qPC",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/getApprovalForAccount",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"dbId\":86624,\n\t\"comment\":\"asdfg\"\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "500",
        "description": "Get Approval For Account",
        "jsonExample": "SUCCESS"
      }
    ],
    "contentType": "application/json",
    "description": "<p>This API allows you to request approval for the account dbId you sent on your request.\ndbId = SAPM Account's dbId.</p>",
    "examples": {
      "languages": [
        {
          "id": "R_TTD5_3XrNMYAC00G_ec",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/getApprovalForAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "cEYtEjLgXXJfLX7v-pIy6",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/getApprovalForAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Xbjm3olddlwO13PshxcIn",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/getApprovalForAccount\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "fSGyEVQiCBUxRrhQ_h047",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/getApprovalForAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "R_TTD5_3XrNMYAC00G_ec"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-500",
          "language": "500",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "response-0-500"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}