---
title: Cancel
slug: PaOO-cancel
createdAt: 2025-09-25T11:57:08.996Z
---

:::ApiMethodV2
```json
{
  "name": "Cancel Booking",
  "method": "POST",
  "url": "https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX",
  "description": "Provides the TPS Partner with the cancellation payload generated by Bakuun, confirming the booking status change and including all relevant reservation identifiers and cancellation details.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "n1-Rf0oJoKeo_VL1rex_h",
        "language": "json",
        "code": "{\n   \"username\": \"String\",\n   \"password\": \"String\",\n   \"partnerId\": \"String\",\n   \"partnerName\": \"String\",\n   \"action\": \"pushCancelBooking\",\n   \"reservationDetail\": [\n      {\n         \"propertyId\": \"String\",\n         \"propertyName\": \"String\",\n         \"reservationId\": \"String\",\n         \"reservationStatus\": \"Cancel\"\n      }\n   ]\n}",
        "customLabel": ""
      },
      {
        "id": "4JUzwB-YkMLF0nlVIothP",
        "language": "curl",
        "code": "curl --location 'https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"username\": \"String\",\n  \"password\": \"String\",\n  \"partnerId\": \"String\",\n  \"action\": \"String\",\n  \"reservationDetail\": {\n    \"propertyID\": \"\",\n    \"propertyName\": \"\",\n    \"reservationID\": \"\",\n    \"reservationStatus\": \"\"\n  }\n}'",
        "customLabel": ""
      },
      {
        "id": "Vk3ntXU45wcw9VT9H1J3T",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX',\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      \"action\": \"String\",\n      \"reservationDetail\": {\n         \"propertyID\": \"\",\n         \"propertyName\": \"\",\n         \"reservationID\": \"\",\n         \"reservationStatus\": \"\"\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": "5p921GLBdWH-rHHUs_mbR",
        "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   \"action\": \"String\",\n   \"reservationDetail\": {\n      \"propertyID\": \"\",\n      \"propertyName\": \"\",\n      \"reservationID\": \"\",\n      \"reservationStatus\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "QY1NdGlrkXGddotmcL33Q",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX\"\n\npayload = json.dumps({\n   \"username\": \"String\",\n   \"password\": \"String\",\n   \"partnerId\": \"String\",\n   \"action\": \"String\",\n   \"reservationDetail\": {\n      \"propertyID\": \"\",\n      \"propertyName\": \"\",\n      \"reservationID\": \"\",\n      \"reservationStatus\": \"\"\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": "OwUgDQv2Ocqf9mkNaY-pt",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX\")\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   \"action\": \"String\",\n   \"reservationDetail\": {\n      \"propertyID\": \"\",\n      \"propertyName\": \"\",\n      \"reservationID\": \"\",\n      \"reservationStatus\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "6-DZ4_zS_ri3VSKyLUQRk",
        "language": "curl",
        "code": "curl --location 'https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"username\": \"String\",\n  \"password\": \"String\",\n  \"partnerId\": \"String\",\n  \"action\": \"String\",\n  \"reservationDetail\": {\n    \"propertyID\": \"\",\n    \"propertyName\": \"\",\n    \"reservationID\": \"\",\n    \"reservationStatus\": \"\"\n  }\n}'",
        "customLabel": ""
      },
      {
        "id": "5G6ntUlyUumFGMh0ShhUg",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX',\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      \"action\": \"String\",\n      \"reservationDetail\": {\n         \"propertyID\": \"\",\n         \"propertyName\": \"\",\n         \"reservationID\": \"\",\n         \"reservationStatus\": \"\"\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": "b3KGTBFVoTsf6nSkxoWvM",
        "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   \"action\": \"String\",\n   \"reservationDetail\": {\n      \"propertyID\": \"\",\n      \"propertyName\": \"\",\n      \"reservationID\": \"\",\n      \"reservationStatus\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "pCGRq6U_zJjBrM9PjrCbF",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX\"\n\npayload = json.dumps({\n   \"username\": \"String\",\n   \"password\": \"String\",\n   \"partnerId\": \"String\",\n   \"action\": \"String\",\n   \"reservationDetail\": {\n      \"propertyID\": \"\",\n      \"propertyName\": \"\",\n      \"reservationID\": \"\",\n      \"reservationStatus\": \"\"\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": "etIbU6zSXhoSn4JNnZZo2",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://wsb.bakuun.com/v1/booking/PushReservationApi/CPBXXX\")\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   \"action\": \"String\",\n   \"reservationDetail\": {\n      \"propertyID\": \"\",\n      \"propertyName\": \"\",\n      \"reservationID\": \"\",\n      \"reservationStatus\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "n1-Rf0oJoKeo_VL1rex_h"
  },
  "results": {
    "languages": [
      {
        "id": "QCanLQmojpvVqF_XlE8z1",
        "language": "200",
        "code": "{\n  \"success\": true\n}",
        "customLabel": ""
      },
      {
        "id": "TPgb3TSXWkHQnIBEMk9ec",
        "language": "408",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 408,\n            \"message\": \"Processing error\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "yETwDFk4FksXzxv1tKs97",
        "language": "415",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 415,\n            \"message\": \"Invalid authentication key\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "qlAjLewtKia8esRvbBxQH",
        "language": "451",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 476,\n            \"message\": \"Reservation ID not found\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "v7Ub27q1kA82KPLLmV7zY",
        "language": "431",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 440,\n            \"message\": \"Reservation ID not found\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "xjRxQiutiP-hoXzjVUrE6",
        "language": "429",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 442,\n            \"message\": \"Endpoint is not active\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "zM1jXYXu5E2ikAO3OPzcv",
        "language": "428",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 454,\n            \"message\": \"Invalid endpoint\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "zkemts01FEQxmpE2nwjlI",
        "language": "500",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"message\": \"Internal server error\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "Oxx6UoCUIvt4_FNo5fmu1",
        "language": "502",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 502,\n            \"message\": \"Bad gateway\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "GbEstt1zzzswiTD_b_Z6x",
        "language": "503",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 503,\n            \"message\": \"Service unavailable\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "nNDOy1Yc_eLSWYlEX0XHr",
        "language": "504",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 504,\n            \"message\": \"Endpoint request timed-out\"\n        }\n    ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "TPgb3TSXWkHQnIBEMk9ec"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "username",
        "kind": "required",
        "type": "string",
        "description": "API username provided by the TPS Partner to authenticate incoming requests from Bakuun.",
        "": "API username provided by the TPS Partner to authenticate incoming requests from Bakuun."
      },
      {
        "name": "password",
        "kind": "required",
        "type": "string",
        "description": "API password provided by the TPS Partner to authenticate incoming requests from Bakuun.",
        "": "API password provided by the TPS Partner to authenticate incoming requests from Bakuun."
      },
      {
        "name": "partnerId",
        "kind": "required",
        "type": "string",
        "description": "Demand Partner identifier assigned by Bakuun (e.g. MPBXX)",
        "": "Demand Partner identifier assigned by Bakuun (e.g. MPBXX)"
      },
      {
        "name": "partnerName",
        "kind": "required",
        "type": "string",
        "description": "Demand Partner Name",
        "": "Demand Partner Name"
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Always set as pushCancelBooking",
        "": "Always set as pushCancelBooking"
      },
      {
        "name": "reservationDetail",
        "kind": "required",
        "type": "object",
        "description": "",
        "": "required",
        "children": [
          {
            "name": "propertyId",
            "kind": "required",
            "type": "string",
            "description": "Unique property identifier (shared mapping between Bakuun and the TPS partner)."
          },
          {
            "name": "propertyName",
            "kind": "required",
            "type": "string",
            "description": "Hotel/property name."
          },
          {
            "name": "reservationId",
            "kind": "required",
            "type": "string",
            "description": "Reservation ID generaed by Bakuun"
          },
          {
            "name": "reservationStatus",
            "kind": "required",
            "type": "string",
            "description": "Always set as Cancel"
          }
        ],
        "schema": [
          {
            "name": "propertyId",
            "kind": "required",
            "type": "string",
            "description": "Unique property identifier (shared mapping between Bakuun and the TPS partner)."
          },
          {
            "name": "propertyName",
            "kind": "required",
            "type": "string",
            "description": "Hotel/property name."
          },
          {
            "name": "reservationId",
            "kind": "required",
            "type": "string",
            "description": "Reservation ID generaed by Bakuun"
          },
          {
            "name": "reservationStatus",
            "kind": "required",
            "type": "string",
            "description": "Always set as Cancel"
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "success",
      "kind": "optional",
      "type": "boolean",
      "description": ""
    }
  ],
  "autoGeneratedAnchorSlug": "cancel-booking",
  "legacyHash": "MMsQ2VOAQp42VYYSnjc-h"
}
```
:::

