---
title: Change Appointment status
slug: import-test-pdf/change-appointment-status
createdAt: 2025-10-28T16:28:34.252Z
---

{
  "id": "1_0PV76vxKoCF0y-DYr_t",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "/api/v1/appointment/{id}/change-status",
    "servers": [],
    "name": "Change Appointment status",
    "description": "Change Appointment status state",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "undefined",
          "description": "",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "422",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "undefined",
            "example": "{\"message\":\"The given data was invalid.\",\"errors\":{\"status\":[\"This value is invalid\"]}}",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url /api/v1/appointment/{id}/change-status \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\"body\":\"undefined\"}'"
        },
        {
          "id": "example-1-javascript",
          "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   \"body\": \"undefined\"\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/api/v1/appointment/{id}/change-status\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v1/appointment/{id}/change-status\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"body\": \"undefined\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/v1/appointment/{id}/change-status\"\n\npayload = json.dumps({\n   \"body\": \"undefined\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-422",
          "language": "422",
          "code": "// Bad request\n\"{\\\"message\\\":\\\"The given data was invalid.\\\",\\\"errors\\\":{\\\"status\\\":[\\\"This value is invalid\\\"]}}\""
        }
      ],
      "selectedLanguageId": "response-0-422"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}