---
title: Update Order
slug: update-order
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "SaqOftFuJCkFZ2Z2ZrxGk",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/orders/{orderId}:update",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/orders/{orderId}:update",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/orders/{orderId}:update",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Update Order",
    "description": "<p>Applies one or more <strong>actions</strong> to an existing order, then re-runs the same pricing and tax cascade the Nue Line Editor runs internally.</p>\n<p><strong>Action-oriented, not payload-oriented.</strong> You do not send the order you want; you send an ordered list of actions naming what to do. Fields you omit are untouched, and lines you omit are untouched — a line is deleted only when you name it in a <code>deleteLineItems</code> action. This is what separates this endpoint from <code>PATCH /api/objects/Order/{id}</code>, which writes the field you send and recalculates nothing, with one exception: a body that carries <code>partnerPayoutPercentage</code> or <code>partnerPayoutAmount</code> is re-priced.</p>\n<p><strong>The six actions:</strong> <code>updateHeaderFields</code>, <code>updateLineItems</code>, <code>deleteLineItems</code>, <code>addLineItems</code>, <code>replacePriceTags</code>, <code>removePriceTags</code>.</p>\n<p><strong>Key behaviors:</strong></p>\n<ul>\n<li>Actions are re-ordered server-side into a canonical sequence of stages (header fields → deletes → price-tag actions → line updates → adds). The sort is stable within a stage, so same-stage actions keep your submitted order</li>\n<li><code>removePriceTags</code> and <code>replacePriceTags</code> share a stage and their <code>target</code> line ids are not covered by the conflict check, so two overlapping tag actions run in submitted order and the result depends on it — order them deliberately or split the request</li>\n<li><code>updateHeaderFields</code> may appear at most once, and each line may be targeted at most once — both violations return <code>CONFLICTING_ACTIONS</code></li>\n<li><code>partnerPayoutPercentage</code> and <code>partnerPayoutAmount</code> in <code>updateHeaderFields</code> are mutually exclusive: send one and the other is derived (both returns <code>PARTNER_PAYOUT_MUTUALLY_EXCLUSIVE</code>). They always re-price, so <code>recalc</code> of <code>TAX_ONLY</code> or <code>NONE</code> returns <code>RECALC_MODE_NOT_SUPPORTED</code>, and an out-of-range value returns <code>INVALID_PARTNER_PAYOUT_RANGE</code>. On an order, sending a partner field together with a <code>status</code> change returns <code>CONFLICTING_ACTIONS</code>; update the payout first, then the status.</li>\n<li><code>isCommit: false</code> runs the full cascade in memory and returns the same shape without persisting anything</li>\n<li><code>recalc</code> selects which callouts run: <code>AUTO</code> (default), <code>PRICING_ONLY</code>, <code>TAX_ONLY</code>, <code>NONE</code> — case-sensitive</li>\n<li><code>fieldValues</code> keys are <strong>Nue field names</strong> (camelCase, e.g. <code>quantity</code>, <code>subscriptionTerm</code>, <code>paymentTerm</code>) validated against the Order / OrderProduct describe; custom fields use their Salesforce API name. Salesforce field API names such as <code>SubscriptionTerm__c</code> are for the Apex global method, not for REST</li>\n<li>Engine-calculated fields (totals, tax, ACV/TCV, delta metrics, list and sales prices) are rejected with <code>FIELD_NOT_UPDATABLE</code></li>\n<li>Summary, split, ramp, and subscription-context lines are not editable; required and bundled bundle children cannot be removed on their own</li>\n<li>The whole update is one transaction: a pricing failure rolls everything back</li>\n<li>The order must be in <code>Draft</code> status — anything else returns <code>ORDER_NOT_DRAFT</code></li>\n</ul>\n<p>Activated orders and live subscriptions are out of scope — use the Change Order endpoint instead.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "orderId",
          "type": "string",
          "description": "The id of the order to update."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "<p>Action-oriented update request. You send an ordered list of actions describing what to do, not the desired order document. Fields and lines you do not name are left untouched.</p>",
          "customType": "UpdateOrderRequest",
          "schema": [
            {
              "name": "isCommit",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>true (or omitted) persists the result. false runs the full pricing and tax cascade in memory and persists nothing. Must be a boolean.</p>",
              "example": true,
              "default": true
            },
            {
              "name": "recalc",
              "kind": "optional",
              "type": "string<AUTO | PRICING_ONLY | TAX_ONLY | NONE>",
              "description": "<p>Recalculation mode. Case-sensitive. AUTO derives what to recompute from which fields changed.</p>",
              "example": "AUTO",
              "default": "AUTO",
              "enum": [
                "AUTO",
                "PRICING_ONLY",
                "TAX_ONLY",
                "NONE"
              ]
            },
            {
              "name": "expectedLastModified",
              "kind": "optional",
              "type": "string<date-time>",
              "description": "<p>Optimistic-concurrency guard. When set, the update fails with ORDER_MODIFIED unless it matches the record's current last-modified timestamp.</p>",
              "format": "date-time"
            },
            {
              "name": "actions",
              "kind": "required",
              "type": "array",
              "description": "<p>Ordered list of actions. The server re-orders them into canonical stages (header fields, deletes, price-tag actions, line updates, adds) before executing. The sort is stable within a stage, so same-stage actions keep your submitted order — which matters only for removePriceTags/replacePriceTags, the one pair that shares a stage and is not covered by the per-line conflict check.</p>",
              "modelRef": "#/components/schemas/UpdateAction",
              "customType": "UpdateAction[]",
              "schema": [
                {
                  "name": "action",
                  "kind": "required",
                  "type": "string<updateHeaderFields | updateLineItems | deleteLineItems | addLineItems | replacePriceTags | removePriceTags>",
                  "description": "The operation to perform.",
                  "enum": [
                    "updateHeaderFields",
                    "updateLineItems",
                    "deleteLineItems",
                    "addLineItems",
                    "replacePriceTags",
                    "removePriceTags"
                  ]
                },
                {
                  "name": "payload",
                  "kind": "optional",
                  "type": "map",
                  "description": "<p>Action-specific payload.</p>\n<ul>\n<li><code>updateHeaderFields</code> -> <code>{ fieldValues: { &#x3C;nueFieldName>: value } }</code></li>\n<li><code>updateLineItems</code> -> <code>{ lineItems: [ { lineItemId, fieldValues } ] }</code></li>\n<li><code>deleteLineItems</code> -> <code>{ lineItemIds: [ id ] }</code></li>\n<li><code>addLineItems</code> -> <code>{ products: [ AddQuoteProductRequest ] }</code></li>\n<li><code>replacePriceTags</code> -> <code>{ priceTags: [ { &#x3C;oldIdOrCode>: &#x3C;newIdOrCode> } ], target?, includeChildren? }</code></li>\n<li><code>removePriceTags</code> -> <code>{ priceTags: [ &#x3C;idOrCode> ], target?, includeChildren? }</code></li>\n</ul>",
                  "example": "",
                  "customType": "map<string, string>",
                  "schema": []
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/UpdateOrderRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>The order was updated (or, with isCommit=false, previewed) successfully.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "The recalculated order after the update.",
            "customType": "UpdateOrderResponse",
            "schema": [
              {
                "name": "order",
                "kind": "optional",
                "type": "map",
                "description": "<p>The order header with recalculated pricing, metrics, and tax.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "orderProducts",
                "kind": "optional",
                "type": "array",
                "description": "<p>Every order product after the update, with hierarchy.</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>Non-blocking advisories returned alongside a successful update.</p>",
                "modelRef": "#/components/schemas/Message",
                "customType": "Message[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Severity level: Error, Warning, or FATAL.</p>"
                  },
                  {
                    "name": "errorType",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Specific error or warning code (e.g., PRODUCT_SKU_OR_NAME_REQUIRED, DUPLICATE_PRICE_TAG).</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable description.</p>"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/UpdateOrderResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Invalid request — unknown action, conflicting actions, invalid or non-updatable field, non-editable line, failed business rule, or a stale expectedLastModified.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Error envelope returned by the CPQ REST endpoints, including Update Quote, Update Order, and PATCH /api/objects/{Quote,Order}/{id}. <code>errorDetails</code> is omitted when empty.</p>",
            "customType": "ApiErrorResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code.",
                "example": 400
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Short error title.",
                "example": "Failed to update quote"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable message. For a single failure it matches the first errorDetails entry.</p>"
              },
              {
                "name": "errorDetails",
                "kind": "optional",
                "type": "array",
                "description": "<p>One entry per failure, each with a semantic errorCode.</p>",
                "modelRef": "#/components/schemas/ErrorDetail",
                "customType": "ErrorDetail[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Semantic error code.",
                    "example": "QUOTE_NOT_FOUND"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message.</p>"
                  },
                  {
                    "name": "path",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Where in the request the error is about, when it is about one place, for example body.buckets[2]. Absent when the error is about the call as a whole.</p>",
                    "example": "body.buckets[2].allocations[0]"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApiErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error. Nothing was committed.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Error envelope returned by the CPQ REST endpoints, including Update Quote, Update Order, and PATCH /api/objects/{Quote,Order}/{id}. <code>errorDetails</code> is omitted when empty.</p>",
            "customType": "ApiErrorResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code.",
                "example": 400
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Short error title.",
                "example": "Failed to update quote"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable message. For a single failure it matches the first errorDetails entry.</p>"
              },
              {
                "name": "errorDetails",
                "kind": "optional",
                "type": "array",
                "description": "<p>One entry per failure, each with a semantic errorCode.</p>",
                "modelRef": "#/components/schemas/ErrorDetail",
                "customType": "ErrorDetail[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Semantic error code.",
                    "example": "QUOTE_NOT_FOUND"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message.</p>"
                  },
                  {
                    "name": "path",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Where in the request the error is about, when it is about one place, for example body.buckets[2]. Absent when the error is about the call as a whole.</p>",
                    "example": "body.buckets[2].allocations[0]"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApiErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/orders/{orderId}:update \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"isCommit\": true,\n     \"recalc\": \"AUTO\",\n     \"actions\": [\n     {\n     \"action\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "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   \"isCommit\": true,\n   \"recalc\": \"AUTO\",\n   \"actions\": [\n      {\n         \"action\": \"\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/cpq/orders/{orderId}:update\", 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(\"https://api.nue.io/cpq/orders/{orderId}:update\")\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   \"isCommit\": true,\n   \"recalc\": \"AUTO\",\n   \"actions\": [\n      {\n         \"action\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/orders/{orderId}:update\"\n\npayload = json.dumps({\n   \"isCommit\": True,\n   \"recalc\": \"AUTO\",\n   \"actions\": [\n      {\n         \"action\": \"\"\n      }\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"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The order was updated (or, with isCommit=false, previewed) successfully.\n{\n  \"order\": \"\",\n  \"orderProducts\": [\n    {}\n  ],\n  \"warnings\": [\n    {\n      \"errorCode\": \"\",\n      \"errorType\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid request — unknown action, conflicting actions, invalid or non-updatable field, non-editable line, failed business rule, or a stale expectedLastModified.\n{\n  \"status\": 400,\n  \"error\": \"Failed to update quote\",\n  \"message\": \"\",\n  \"errorDetails\": [\n    {\n      \"errorCode\": \"QUOTE_NOT_FOUND\",\n      \"message\": \"\",\n      \"path\": \"body.buckets[2].allocations[0]\"\n    }\n  ]\n}"
        },
        {
          "id": "response-2-500",
          "language": "500",
          "code": "// Internal server error. Nothing was committed.\n{\n  \"status\": 400,\n  \"error\": \"Failed to update quote\",\n  \"message\": \"\",\n  \"errorDetails\": [\n    {\n      \"errorCode\": \"QUOTE_NOT_FOUND\",\n      \"message\": \"\",\n      \"path\": \"body.buckets[2].allocations[0]\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}