---
title: Remove line buckets from a quote
slug: remove-line-buckets-from-a-quote
docTags: 
createdAt: 2026-10-25T21:00:19.009Z
---

{
  "id": "5VBMFSNgWcp4b1J3tkOK6",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/quotes/{quoteId}/line-buckets:delete",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/quotes/{quoteId}/line-buckets:delete",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/quotes/{quoteId}/line-buckets:delete",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Remove line buckets from a quote",
    "description": "<p>Remove line buckets from a quote.</p>\n<p>Delete buckets that are no longer wanted. Refused, with the reason, when a bucket still holds lines (move them first), when it is the default bucket, or when it has already become an order -- that order must go first: delete it in Salesforce if it is still Draft (a Draft order can't be canceled, and no tool here deletes an order), or cancel it if it was activated. Nothing else about the split changes. The reply's <code>buckets</code> are the ones that REMAIN; <code>deleted</code> names what went, with each bucket's key and name -- report the split from <code>deleted</code> rather than from what is missing.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "quoteId",
          "type": "string",
          "description": "The Quote id."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "*/*"
          ],
          "default": "*/*"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The buckets to remove",
          "customType": "DeleteLineBucketsRequest",
          "schema": [
            {
              "name": "bucketRefs",
              "kind": "required",
              "type": "array",
              "description": "<p>The buckets to remove, by bucketKey or id. A bucket that still holds lines is refused: move its lines first. The default bucket cannot be removed, and neither can one that has already become an order.</p>",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "modelRef": "#/components/schemas/DeleteLineBucketsRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The buckets after the removal",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Zr7Ejo-uqz1eZq5renkWe",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/quotes/{quoteId}/line-buckets:delete \\\n     --header 'accept: */*' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"bucketRefs\": []\n     }'"
        },
        {
          "id": "lVqQyIOVaPnoAdqqK7bCR",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"*/*\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"bucketRefs\": []\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/cpq/quotes/{quoteId}/line-buckets:delete\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vncz4IGWglVIVkvVf_EvW",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/cpq/quotes/{quoteId}/line-buckets:delete\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"*/*\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"bucketRefs\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "_xQPD0EdUzKyMvf4CnM-a",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/quotes/{quoteId}/line-buckets:delete\"\n\npayload = json.dumps({\n   \"bucketRefs\": []\n})\nheaders = {\n   'accept': '*/*',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Zr7Ejo-uqz1eZq5renkWe"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The buckets after the removal\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}