---
title: Make Reservation For SAPM Account
slug: single-connect-api-3-2-0/make-reservation-for-sapm-account
description: Learn how to make a reservation using the curl command with this comprehensive code example. Discover the essential headers and data required to execute the request seamlessly. Boost your reservation process effortlessly with this insightful guide.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "K9uDA9v1f2rsgsxIpV0eQ",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/makeReservation",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"sapmDbId\":86389,\n\t\"comment\":\"asdf11g\",\n\t\"startDate\": \"2020-05-28 19:45:00:00\",\n\t\"endDate\": \"2020-05-28 21:45:00:00\",\n\t\"firstPartUsername\":\"apektas\",\n    \"secondPartUsername\":\"apektas\",\n    \"remindBeforeInMins\":15\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>Using this API, you can create password reservation for SAPM account.</p>",
    "examples": {
      "languages": [
        {
          "id": "9pd5JVry9rlqoDhNc5at7",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/makeReservation \\\n     --header 'accept: application/json'"
        },
        {
          "id": "GHf1s8B6mr7gcyK1T054Y",
          "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/makeReservation\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LPy79vu7sDcSvmPf08a8M",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/makeReservation\")\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": "5dLOx2HdYvfuV8kZjVfpn",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/makeReservation\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "9pd5JVry9rlqoDhNc5at7"
    },
    "results": {
      "languages": [
        {
          "id": "ROVIVkZdcH3HrXZU2YT7R",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "ROVIVkZdcH3HrXZU2YT7R"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}