---
title: Cancel
slug: DA7T-cancel
docTags: 
createdAt: 2025-10-14T05:44:04.972Z
---

:::ApiMethodV2
```json
{
  "name": "Cancel",
  "method": "POST",
  "url": "https://wsb.bakuun.com/v2/booking/MPBXX/XXXX",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "POLHsw0FAL_4GozDFSkjr",
        "language": "json",
        "code": "{\n  \"username\": \"XXXXX\",\n  \"password\": \"XXXXX\",\n  \"partnerId\": \"MPBXX\",\n  \"partnerName\": \"Test Partner\",\n  \"action\": \"pushCancelBooking\",\n  \"hotelReservation\": [\n    {\n      \"hotelCode\": \"HTLXX\",\n      \"hotelName\": \"Test Property\",\n      \"resStatus\": \"cancel\",\n      \"resID\": \"RD00123-Bakuun123\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "BQeCOjP44eB4PNV5rJFKl",
        "language": "curl",
        "code": "curl --location 'https://wsb.qabakuun.cloud/v2/booking/MPBXX/163944' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"username\": \"String\",\n  \"password\": \"String\",\n  \"partnerId\": \"String\",\n  \"partnerName\": \"String\",\n  \"action\": \"String\",\n  \"hotelReservation\": {\n    \"hotelCode\": \"\",\n    \"hotelName\": \"\",\n    \"resStatus\": \"\",\n    \"resID\": \"\"\n  }\n}'",
        "customLabel": ""
      },
      {
        "id": "oFVI9SCfHnuhpberIV8Qo",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://wsb.qabakuun.cloud/v2/booking/MPBXX/163944',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"username\": \"String\",\n      \"password\": \"String\",\n      \"partnerId\": \"String\",\n      \"partnerName\": \"String\",\n      \"action\": \"String\",\n      \"hotelReservation\": {\n         \"hotelCode\": \"\",\n         \"hotelName\": \"\",\n         \"resStatus\": \"\",\n         \"resID\": \"\"\n      }\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "zIRLWVfeAGPEgHwN7WDrw",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"username\": \"String\",\n   \"password\": \"String\",\n   \"partnerId\": \"String\",\n   \"partnerName\": \"String\",\n   \"action\": \"String\",\n   \"hotelReservation\": {\n      \"hotelCode\": \"\",\n      \"hotelName\": \"\",\n      \"resStatus\": \"\",\n      \"resID\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://wsb.qabakuun.cloud/v2/booking/MPBXX/163944\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "t2xvxxuWLbOyBBQeZ4IzC",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://wsb.qabakuun.cloud/v2/booking/MPBXX/163944\"\n\npayload = json.dumps({\n   \"username\": \"String\",\n   \"password\": \"String\",\n   \"partnerId\": \"String\",\n   \"partnerName\": \"String\",\n   \"action\": \"String\",\n   \"hotelReservation\": {\n      \"hotelCode\": \"\",\n      \"hotelName\": \"\",\n      \"resStatus\": \"\",\n      \"resID\": \"\"\n   }\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",
        "customLabel": ""
      },
      {
        "id": "olp17gOqx1AX5hep-TWuy",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://wsb.qabakuun.cloud/v2/booking/MPBXX/163944\")\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   \"username\": \"String\",\n   \"password\": \"String\",\n   \"partnerId\": \"String\",\n   \"partnerName\": \"String\",\n   \"action\": \"String\",\n   \"hotelReservation\": {\n      \"hotelCode\": \"\",\n      \"hotelName\": \"\",\n      \"resStatus\": \"\",\n      \"resID\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "POLHsw0FAL_4GozDFSkjr"
  },
  "results": {
    "languages": [
      {
        "id": "InX-ac2uWXrDuWmPlwZUu",
        "language": "200",
        "code": "[\n    {\n        \"success\": true,\n        \"message\": \"Reservation Cancel Success\",\n        \"roomIndex\": \"2\",\n        \"reservationID\": \"MPBXX-2\"\n    },\n    {\n        \"success\": true,\n        \"message\": \"Reservation Cancel Success\",\n        \"roomIndex\": \"1\",\n        \"reservationID\": \"MPBXX-1\"\n    }\n]",
        "customLabel": ""
      },
      {
        "id": "s_KU_eacI_3Sqmif56KPn",
        "language": "451",
        "code": "{\n  \"success\": false,\n  \"errors\": [\n    {\n      \"code\": 450,\n      \"message\": \"Insufficient Property data\"\n    }\n  ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "InX-ac2uWXrDuWmPlwZUu"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "username",
        "kind": "required",
        "type": "string",
        "description": "System-generated,  API access secret key (unique per account).",
        "": "System-generated,  API access secret key (unique per account)."
      },
      {
        "name": "password",
        "kind": "required",
        "type": "string",
        "description": "System-generated,  API access secret key (unique per account).",
        "": "System-generated,  API access secret key (unique per account)."
      },
      {
        "name": "partnerId",
        "kind": "required",
        "type": "string",
        "description": "Partner (buyer) identifier (e.g. RDKXX - MPBXXX).",
        "": "Partner (buyer) identifier (e.g. RDKXX - MPBXXX)."
      },
      {
        "name": "partnerName",
        "kind": "required",
        "type": "string",
        "description": "Partner (buyer) name",
        "": "Partner (buyer) name"
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Always set as pushCancelBooking",
        "": "Always set as pushCancelBooking"
      },
      {
        "name": "hotelReservation",
        "kind": "required",
        "type": "object",
        "description": "",
        "": "object",
        "children": [
          {
            "name": "hotelCode",
            "kind": "required",
            "type": "string",
            "description": "Unique Bakuun or Partner property ID. "
          },
          {
            "name": "hotelName",
            "kind": "required",
            "type": "string",
            "description": "Name of the property (for reference)."
          },
          {
            "name": "resStatus",
            "kind": "required",
            "type": "string",
            "description": "Must be \"cancel\" to confirm cancellation action."
          },
          {
            "name": "resID",
            "kind": "required",
            "type": "string",
            "description": "Reservation ID previously generated"
          }
        ],
        "schema": [
          {
            "name": "hotelCode",
            "kind": "required",
            "type": "string",
            "description": "Unique Bakuun or Partner property ID. "
          },
          {
            "name": "hotelName",
            "kind": "required",
            "type": "string",
            "description": "Name of the property (for reference)."
          },
          {
            "name": "resStatus",
            "kind": "required",
            "type": "string",
            "description": "Must be \"cancel\" to confirm cancellation action."
          },
          {
            "name": "resID",
            "kind": "required",
            "type": "string",
            "description": "Reservation ID previously generated"
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "success",
      "kind": "optional",
      "type": "boolean",
      "description": "true  --> when the reservation is cancelled."
    },
    {
      "name": "message",
      "kind": "optional",
      "type": "string",
      "description": "Reservation Cancel Success  --> when the reservation for that room is cancelled.",
      "children": []
    },
    {
      "name": "roomIndex",
      "kind": "optional",
      "type": "string",
      "description": "The room reference index tied to the original request payload.",
      "children": []
    },
    {
      "name": "reservationID",
      "kind": "optional",
      "type": "string",
      "description": "The room reference index tied to the original request payload.",
      "children": []
    }
  ],
  "autoGeneratedAnchorSlug": "cancel",
  "legacyHash": "0MwBU-SsERMufqZEvOiMI"
}
```
:::

