---
title: Exit/cancel a commitment.
slug: amberflo-api/exitcancel-a-commitment
docTags: 
createdAt: 2024-11-07T15:10:16.976Z
---

{
  "id": "6T1VMoUYClTXWJkULCbOQ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/exit",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/exit"
      }
    ],
    "name": "Exit/cancel a commitment.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "payment.pricing.commitments.exit_clauses.CommitmentExitRequest.in",
          "schema": [
            {
              "name": "customerId",
              "kind": "required",
              "type": "string",
              "description": "Customer id.",
              "example": ""
            },
            {
              "name": "commitmentId",
              "kind": "required",
              "type": "string",
              "description": "Commitment id.",
              "example": ""
            },
            {
              "name": "exitClauseId",
              "kind": "optional",
              "type": "string",
              "description": "Exit clause id.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.commitments.exit_clauses.CommitmentExitRequest.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "boolean",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "_t53yZQeutZQ5y3_oCBeq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/exit \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"customerId\": \"\",\n     \"commitmentId\": \"\"\n     }'"
        },
        {
          "id": "NPv7R7cWAXruU7UGi4znP",
          "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   \"customerId\": \"\",\n   \"commitmentId\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/exit\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "dKsUcI4K-SnHQqfzqIwNb",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/exit\")\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   \"customerId\": \"\",\n   \"commitmentId\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "GZKbt3rI2MNbeFAEqfssz",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/exit\"\n\npayload = json.dumps({\n   \"customerId\": \"\",\n   \"commitmentId\": \"\"\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"
        }
      ],
      "selectedLanguageId": "_t53yZQeutZQ5y3_oCBeq"
    },
    "results": {
      "languages": [
        {
          "id": "3rogVDkEDH9O_5Xh1UGj5",
          "language": "200",
          "code": "// Successful request\nfalse"
        }
      ],
      "selectedLanguageId": "3rogVDkEDH9O_5Xh1UGj5"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}