---
title: Create Change Order
slug: create-change-order
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "H2iD_5zQ4_NapqJnugLTK",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/change-order",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/change-order",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/change-order",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Create Change Order",
    "description": "<p>Create a change order to modify existing subscriptions. Supports various change types including reconfigure, upgrade, downgrade, quantity updates, renewals, cancellations, and more. Operations are processed directly in Salesforce and can create orders or quotes based on your configuration.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "optional",
          "name": "Ruby-Version",
          "type": "string",
          "example": "2.0",
          "description": "API version header for backward compatibility"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "<p>Change order request supporting all change types including reconfigure, upgrade, downgrade, quantity updates, renewals, cancellations, and more</p>",
          "customType": "ChangeOrderRequest",
          "schema": [
            {
              "name": "options",
              "kind": "required",
              "type": "object",
              "description": "",
              "example": "",
              "schema": [
                {
                  "name": "activateOrder",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Whether to activate the order/quote</p>"
                },
                {
                  "name": "proceedOption",
                  "kind": "required",
                  "type": "string<UseExistingQuote | UseExistingOrder | CreateOrder | CreateQuote>",
                  "description": "How to process the change",
                  "enum": [
                    "UseExistingQuote",
                    "UseExistingOrder",
                    "CreateOrder",
                    "CreateQuote"
                  ]
                },
                {
                  "name": "opportunityId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>If CreateQuote or CreateOrder option is chosen, specify the opportunity ID to associate with the newly created quote or order</p>"
                },
                {
                  "name": "containedObjectId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Existing quote/order ID to add changes to</p>"
                }
              ]
            },
            {
              "name": "assetChanges",
              "kind": "required",
              "type": "array",
              "description": "List of changes to apply to assets",
              "modelRef": "#/components/schemas/AssetChangeRequest",
              "customType": "AssetChangeRequest[]",
              "schema": [
                {
                  "name": "changeType",
                  "kind": "required",
                  "type": "string<Reconfigure | UpdateQuantity | Renew | UpdateTerm | CoTerm | Cancel | AdjustPrice | ConvertFreeTrial | Upgrade | Downgrade | Swap | NewProduct | UpdateField>",
                  "description": "Type of change to apply to the asset",
                  "enum": [
                    "Reconfigure",
                    "UpdateQuantity",
                    "Renew",
                    "UpdateTerm",
                    "CoTerm",
                    "Cancel",
                    "AdjustPrice",
                    "ConvertFreeTrial",
                    "Upgrade",
                    "Downgrade",
                    "Swap",
                    "NewProduct",
                    "UpdateField"
                  ]
                },
                {
                  "name": "assetNumber",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Unique identifier for the asset (subscription name). Required for all change types.</p>"
                },
                {
                  "name": "quantity",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Quantity change (delta) for the subscription. Positive to add, negative to reduce. Required for UpdateQuantity. NOT allowed on Upgrade/Downgrade/Swap — sending it is rejected with PRODUCT_QUANTITY_NOT_ALLOWED (UDS quantities are derived; use a separate UpdateQuantity change on the same asset).</p>"
                },
                {
                  "name": "renewalTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "Renewal term length in months. Required for Renew."
                },
                {
                  "name": "term",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>New term length in months. Required for UpdateTerm, optional for ConvertFreeTrial.</p>"
                },
                {
                  "name": "coTermDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Co-termination date. Required for CoTerm.</p>",
                  "format": "date"
                },
                {
                  "name": "cancellationDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "Date to cancel the subscription. Required for Cancel.",
                  "format": "date"
                },
                {
                  "name": "startDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Start date for the change. Required for UpdateQuantity, ConvertFreeTrial, Upgrade, Downgrade, Swap. Optional for Reconfigure, AdjustPrice.</p>",
                  "format": "date"
                },
                {
                  "name": "endDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "End date for the change. Optional for AdjustPrice.",
                  "format": "date"
                },
                {
                  "name": "netSalesPrice",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>New price amount. Optional for AdjustPrice (use either this or discount).</p>"
                },
                {
                  "name": "discount",
                  "kind": "optional",
                  "type": "object",
                  "description": "<p>Discount configuration. Optional for AdjustPrice (use either this or netSalesPrice).</p>",
                  "example": "",
                  "schema": [
                    {
                      "name": "discountPercentage",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Discount percentage (e.g., 20 for 20%)</p>"
                    },
                    {
                      "name": "applyToChildren",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "Whether to apply discount to child assets"
                    }
                  ]
                },
                {
                  "name": "targetPriceBookEntryId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Price book entry ID for the target product. Required for Upgrade, Downgrade, Swap.</p>"
                },
                {
                  "name": "samePriceSwap",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Keep same price during product change. Optional for Upgrade, Downgrade, Swap.</p>"
                },
                {
                  "name": "priceTags",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Price tag CODES (array of strings) to apply. Optional for Upgrade, Downgrade, Swap.</p>",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "switchToEvergreen",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Switch to evergreen subscription. Optional for Renew, UpdateTerm, ConvertFreeTrial.</p>"
                },
                {
                  "name": "coTermToBundleSubscription",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Co-term to bundle subscription. Optional for ConvertFreeTrial.</p>"
                },
                {
                  "name": "overrideTrialEnd",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Override trial end date. Optional for ConvertFreeTrial."
                },
                {
                  "name": "trueUpPrice",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>When set on an AdjustPrice change, recomputes the price to the correct quantity tier for the current value of the subscription's quantity tier attribute. Applies to the targeted subscription only; to true up a bundle over REST, send a separate trueUpPrice AdjustPrice for the parent and each child subscription. Optional; only applies to AdjustPrice changes.</p>"
                },
                {
                  "name": "addOnChanges",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Add-on changes for reconfiguration. Required for Reconfigure.</p>",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "changeType",
                      "kind": "required",
                      "type": "string<NewProduct | UpdateQuantity | Cancel>",
                      "description": "<p>Type of add-on change</p>",
                      "enum": [
                        "NewProduct",
                        "UpdateQuantity",
                        "Cancel"
                      ]
                    },
                    {
                      "name": "productOptionId",
                      "kind": "optional",
                      "type": "string",
                      "description": "Product option ID. Required for NewProduct."
                    },
                    {
                      "name": "priceBookEntryId",
                      "kind": "optional",
                      "type": "string",
                      "description": "Price book entry ID. Optional for NewProduct."
                    },
                    {
                      "name": "productOptionQuantity",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Add-on quantity. Required for NewProduct.</p>"
                    },
                    {
                      "name": "productOptionQuantityChange",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Quantity change amount. Required for UpdateQuantity add-ons.</p>"
                    },
                    {
                      "name": "startDate",
                      "kind": "optional",
                      "type": "string<date>",
                      "description": "<p>Effective date for the add-on change. Optional for all add-on changes.</p>",
                      "format": "date"
                    },
                    {
                      "name": "term",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Term in months for the add-on. Optional for NewProduct.</p>"
                    },
                    {
                      "name": "cancellationDate",
                      "kind": "optional",
                      "type": "string<date>",
                      "description": "<p>Cancellation date. Required for Cancel add-ons.</p>",
                      "format": "date"
                    },
                    {
                      "name": "assetNumber",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Asset number of the add-on to modify. Required for UpdateQuantity and Cancel add-ons.</p>"
                    }
                  ]
                },
                {
                  "name": "fieldsToUpdate",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Fields to update on the subscription. Required for UpdateField. Each entry sets one field by API name; values are strings and are coerced to the field's type on the Salesforce side.</p>",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "fieldApiName",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>The API name of the field to update (e.g. \"Description\").</p>"
                    },
                    {
                      "name": "newValue",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>The new value to set, as a string.</p>"
                    }
                  ]
                },
                {
                  "name": "addOns",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Target bundle configuration for an Upgrade/Downgrade/Swap when the target product is a bundle. Required when the target bundle's feature/option constraints are not satisfiable by defaults (otherwise the request is rejected with FEATURE_OPTION_COUNT_OUT_OF_RANGE). Each entry identifies its product exactly one way (priceBookEntryId XOR productSku/productName) and uses productOptionId to target the bundle slot. quantity, discount, netSalesPrice, billingPeriod, billingTiming, endDate and coTermAsset are not allowed on a UDS add-on. Recursive for nested bundles. Omit to use the server default-config resolver.</p>",
                  "modelRef": "#/components/schemas/AddQuoteProductRequest",
                  "customType": "AddQuoteProductRequest[]",
                  "schema": [
                    {
                      "name": "productSku",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>The product SKU (StockKeepingUnit). Exactly one of <code>productSku</code> or <code>productName</code> must be supplied — passing both, or neither, returns a <code>PRODUCT_SKU_AND_NAME_EXCLUSIVE</code> validation error.</p>",
                      "example": "NUE_PLATFORM"
                    },
                    {
                      "name": "productName",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>The product name. Alternative to <code>productSku</code>. The first matching active product is selected; if multiple products share the name an <code>AMBIGUOUS_PRODUCT_NAME</code> error is returned and you should use <code>productSku</code> instead.</p>",
                      "example": "Nue Platform"
                    },
                    {
                      "name": "priceBookEntryId",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Specific Price Book Entry ID. Narrows the candidate-PBE list to this entry. The PBE must still satisfy the order's currency and pricing-attribute conditions — if it does not, the API returns <code>PRICEBOOK_ENTRY_MISMATCH</code>.</p>",
                      "example": "01uxx000000ABCDEF"
                    },
                    {
                      "name": "quantity",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Number of units. Required for top-level products. For add-ons, defaults to the bundle option's <code>DefaultQuantity</code>.</p>",
                      "example": 10,
                      "minimum": 0
                    },
                    {
                      "name": "uom",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Unit of Measure name (must match an existing UOM, e.g. <code>User/Month</code>, <code>Hour</code>, <code>Each</code>). For top-level products, supply at least one of <code>priceBookEntryId</code>, <code>uom</code>, or <code>customPricingAttributes</code>.</p>",
                      "example": "User/Month"
                    },
                    {
                      "name": "startDate",
                      "kind": "optional",
                      "type": "string<date>",
                      "description": "<p>Per-product start date override. Defaults to the quote header's start date.</p>",
                      "example": "2025-01-01",
                      "format": "date"
                    },
                    {
                      "name": "endDate",
                      "kind": "optional",
                      "type": "string<date>",
                      "description": "<p>Per-product end date override. If <code>subscriptionTerm</code> is provided, the end date is calculated from <code>startDate</code> + <code>subscriptionTerm</code>.</p>",
                      "example": "2026-01-01",
                      "format": "date"
                    },
                    {
                      "name": "subscriptionTerm",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Per-product subscription term override. Must be > 0. Defaults to the quote header's term.</p>",
                      "example": 12,
                      "minimum": 0
                    },
                    {
                      "name": "subscriptionTermDimension",
                      "kind": "optional",
                      "type": "string<Month | Year>",
                      "description": "Term dimension for the subscription term.",
                      "example": "Month",
                      "enum": [
                        "Month",
                        "Year"
                      ]
                    },
                    {
                      "name": "autoRenew",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "<p>Whether this product line auto-renews. Defaults to the quote-level or product-level setting.</p>",
                      "example": true
                    },
                    {
                      "name": "evergreen",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "<p>Whether this is an evergreen subscription (no fixed term). Cannot be combined with <code>subscriptionTerm</code> or <code>endDate</code>.</p>",
                      "example": false
                    },
                    {
                      "name": "billingPeriod",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Billing period override. Per-line, both label (<code>Monthly</code>) and API value (<code>Month</code>) are accepted. Top-level header <code>billingPeriod</code> requires the API value.</p>",
                      "example": "Month"
                    },
                    {
                      "name": "billingTiming",
                      "kind": "optional",
                      "type": "string<In Advance | In Arrears>",
                      "description": "<p>Billing timing override — whether billed before or after service delivery.</p>",
                      "example": "In Advance",
                      "enum": [
                        "In Advance",
                        "In Arrears"
                      ]
                    },
                    {
                      "name": "renewalTerm",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Renewal term in months. Must be > 0.</p>",
                      "example": 12,
                      "minimum": 0
                    },
                    {
                      "name": "discount",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Discretionary discount percentage (0-100). Overrides header-level discount for this product. If both <code>discount</code> and <code>discountAmount</code> are set, <code>discount</code> takes precedence.</p>",
                      "example": 15.5,
                      "minimum": 0,
                      "maximum": 100
                    },
                    {
                      "name": "discountAmount",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Discretionary discount amount (currency). Ignored if <code>discount</code> is also provided.</p>",
                      "example": 100,
                      "minimum": 0
                    },
                    {
                      "name": "priceTags",
                      "kind": "optional",
                      "type": "array",
                      "description": "Price or discount tags to apply to this product.",
                      "modelRef": "#/components/schemas/PriceTagInput",
                      "customType": "PriceTagInput[]",
                      "schema": [
                        {
                          "name": "code",
                          "kind": "optional",
                          "type": "string",
                          "description": "The price tag code.",
                          "example": "REGR_DISC_QTY_TIERED"
                        },
                        {
                          "name": "id",
                          "kind": "optional",
                          "type": "string",
                          "description": "The price tag ID.",
                          "example": "a0dcU000005sZRrQAM"
                        }
                      ]
                    },
                    {
                      "name": "customPricingAttributes",
                      "kind": "optional",
                      "type": "array",
                      "description": "<p>Custom Price Book Entry field values used to disambiguate multi-attribute pricing. Each entry's <code>name</code> must be the <strong>full Salesforce field API name</strong> including the namespace prefix and <code>__c</code> suffix (for example <code>Ruby__PricingAttribute_3__c</code>). Multiple attributes are AND'd together when filtering candidate PBEs.</p>",
                      "modelRef": "#/components/schemas/CustomPricingAttribute",
                      "customType": "CustomPricingAttribute[]",
                      "schema": [
                        {
                          "name": "name",
                          "kind": "required",
                          "type": "string",
                          "description": "<p>Full Salesforce field API name on the PriceBookEntry, including the package namespace prefix and <code>__c</code> suffix. Examples: <code>Ruby__PricingAttribute_3__c</code>, <code>Ruby__Segment__c</code>. Bare names without namespace or <code>__c</code> are rejected with <code>Invalid field &#x3C;name> for PricebookEntry</code>.</p>",
                          "example": "Ruby__PricingAttribute_3__c"
                        },
                        {
                          "name": "value",
                          "kind": "required",
                          "type": "string",
                          "description": "The value to match against the PriceBookEntry field. Compared as a string.",
                          "example": "New Business"
                        }
                      ]
                    },
                    {
                      "name": "addOns",
                      "kind": "optional",
                      "type": "array",
                      "description": "<p>Optional add-on products for bundles. Each add-on is itself a product request object.</p>",
                      "modelRef": "#/components/schemas/AddQuoteProductRequest",
                      "customType": "AddQuoteProductRequest[]",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Circular-Reference"
                        }
                      ]
                    },
                    {
                      "name": "productOptionId",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>For add-on lines, targets a specific bundle option slot (RIM-20981). When set, productSku/productName become optional.</p>"
                    },
                    {
                      "name": "netSalesPrice",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Explicit unit net sales price; back-calculates the discount. Mutually exclusive with discount and discountAmount.</p>"
                    },
                    {
                      "name": "paymentTerm",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Per-line payment term override, e.g. 'Net 30'.</p>"
                    },
                    {
                      "name": "coTermAsset",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Change-order only. Co-terminate this new line with the named Salesforce subscription number.</p>"
                    },
                    {
                      "name": "parentLineId",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Update API only. Adds this product as an option child under the existing bundle line with this id, resolved against that bundle's live option config. May target the root bundle line or a nested sub-bundle line. Omit for a top-level add.</p>",
                      "example": "0QLRu00000AAvDcIAL"
                    },
                    {
                      "name": "customFields",
                      "kind": "optional",
                      "type": "map",
                      "description": "<p>Line-level custom field name/value pairs applied directly onto the created line item. Keys are Salesforce API names on the line object (QuoteLineItem or OrderProduct); an unknown field name is rejected. Supported on /cpq/quotes, /cpq/orders, and the addLineItems action of the </p><div></div> endpoints.<p></p>",
                      "example": "{\"CostCenter__c\":\"CC-1042\",\"Ruby__IncludedUnits__c\":25}",
                      "customType": "map<string, string>",
                      "schema": []
                    },
                    {
                      "name": "rampValues",
                      "kind": "optional",
                      "type": "array",
                      "description": "<p>Per-ramp Line Attribute values for a ramped line. Each entry sets custom field values on one ramp line, addressed by rampLineIndex. Ramp lines not named inherit the line-level value, then the Pricebook Entry default. Supported on /cpq/quotes and /cpq/orders.</p>",
                      "modelRef": "#/components/schemas/RampValueInput",
                      "customType": "RampValueInput[]",
                      "schema": [
                        {
                          "name": "rampLineIndex",
                          "kind": "optional",
                          "type": "integer",
                          "description": "<p>Which ramp line to apply the values to, 1-based in schedule order.</p>",
                          "example": 1
                        },
                        {
                          "name": "startDate",
                          "kind": "optional",
                          "type": "string<date>",
                          "description": "<p>The ramp line's start date, accepted as a readable alias for rampLineIndex. Ramp line dates are derived by the pricing engine, so this is not the addressing key; when both are given they must agree.</p>",
                          "example": "2026-01-01",
                          "format": "date"
                        },
                        {
                          "name": "fieldValues",
                          "kind": "optional",
                          "type": "map",
                          "description": "<p>Field name/value pairs applied to this ramp line only, overriding what it would otherwise inherit from its parent line.</p>",
                          "example": "{\"Overage_Rate__c\":3}",
                          "customType": "map<string, string>",
                          "schema": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "transformations",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Ambiguity pins for bundle Upgrade/Downgrade/Swap: when a source subscription (bundle child) maps to more than one candidate slot in the target, each pin resolves one source. Identify the candidate exactly one way: explicit (targetProductOptionId + targetPriceBookEntryId together) XOR by-values (uom / customPricingAttributes / billingTiming). Mixing the two is rejected with TRANSFORMATION_IDENTITY_CONFLICT.</p>",
                  "modelRef": "#/components/schemas/Transformation",
                  "customType": "Transformation[]",
                  "schema": [
                    {
                      "name": "sourceAssetNumber",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>The source subscription (SUB-xxxx) this pin resolves.</p>"
                    },
                    {
                      "name": "targetProductOptionId",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Explicit style: the target bundle option slot. Send together with targetPriceBookEntryId.</p>"
                    },
                    {
                      "name": "targetPriceBookEntryId",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Explicit style: target price book entry. XOR with the by-values fields.</p>"
                    },
                    {
                      "name": "uom",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>By-values style: unit of measure of the target candidate.</p>"
                    },
                    {
                      "name": "customPricingAttributes",
                      "kind": "optional",
                      "type": "array",
                      "description": "<p>By-values style: pricing attributes identifying the target candidate.</p>",
                      "modelRef": "#/components/schemas/CustomPricingAttribute",
                      "customType": "CustomPricingAttribute[]",
                      "schema": [
                        {
                          "name": "name",
                          "kind": "required",
                          "type": "string",
                          "description": "<p>Full Salesforce field API name on the PriceBookEntry, including the package namespace prefix and <code>__c</code> suffix. Examples: <code>Ruby__PricingAttribute_3__c</code>, <code>Ruby__Segment__c</code>. Bare names without namespace or <code>__c</code> are rejected with <code>Invalid field &#x3C;name> for PricebookEntry</code>.</p>",
                          "example": "Ruby__PricingAttribute_3__c"
                        },
                        {
                          "name": "value",
                          "kind": "required",
                          "type": "string",
                          "description": "The value to match against the PriceBookEntry field. Compared as a string.",
                          "example": "New Business"
                        }
                      ]
                    },
                    {
                      "name": "billingTiming",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>By-values style: billing timing of the target candidate.</p>"
                    }
                  ]
                }
              ]
            },
            {
              "name": "products",
              "kind": "optional",
              "type": "array",
              "description": "<p>Optional list of brand-new products to add as part of this change order (added in RIM-20008). Uses the same product shape as CreateQuoteRequest.products and is priced through the same pricing pipeline. Additive to assetChanges, which remains required.</p>",
              "modelRef": "#/components/schemas/AddQuoteProductRequest",
              "customType": "AddQuoteProductRequest[]",
              "schema": [
                {
                  "name": "productSku",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>The product SKU (StockKeepingUnit). Exactly one of <code>productSku</code> or <code>productName</code> must be supplied — passing both, or neither, returns a <code>PRODUCT_SKU_AND_NAME_EXCLUSIVE</code> validation error.</p>",
                  "example": "NUE_PLATFORM"
                },
                {
                  "name": "productName",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>The product name. Alternative to <code>productSku</code>. The first matching active product is selected; if multiple products share the name an <code>AMBIGUOUS_PRODUCT_NAME</code> error is returned and you should use <code>productSku</code> instead.</p>",
                  "example": "Nue Platform"
                },
                {
                  "name": "priceBookEntryId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Specific Price Book Entry ID. Narrows the candidate-PBE list to this entry. The PBE must still satisfy the order's currency and pricing-attribute conditions — if it does not, the API returns <code>PRICEBOOK_ENTRY_MISMATCH</code>.</p>",
                  "example": "01uxx000000ABCDEF"
                },
                {
                  "name": "quantity",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Number of units. Required for top-level products. For add-ons, defaults to the bundle option's <code>DefaultQuantity</code>.</p>",
                  "example": 10,
                  "minimum": 0
                },
                {
                  "name": "uom",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Unit of Measure name (must match an existing UOM, e.g. <code>User/Month</code>, <code>Hour</code>, <code>Each</code>). For top-level products, supply at least one of <code>priceBookEntryId</code>, <code>uom</code>, or <code>customPricingAttributes</code>.</p>",
                  "example": "User/Month"
                },
                {
                  "name": "startDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Per-product start date override. Defaults to the quote header's start date.</p>",
                  "example": "2025-01-01",
                  "format": "date"
                },
                {
                  "name": "endDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Per-product end date override. If <code>subscriptionTerm</code> is provided, the end date is calculated from <code>startDate</code> + <code>subscriptionTerm</code>.</p>",
                  "example": "2026-01-01",
                  "format": "date"
                },
                {
                  "name": "subscriptionTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Per-product subscription term override. Must be > 0. Defaults to the quote header's term.</p>",
                  "example": 12,
                  "minimum": 0
                },
                {
                  "name": "subscriptionTermDimension",
                  "kind": "optional",
                  "type": "string<Month | Year>",
                  "description": "Term dimension for the subscription term.",
                  "example": "Month",
                  "enum": [
                    "Month",
                    "Year"
                  ]
                },
                {
                  "name": "autoRenew",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Whether this product line auto-renews. Defaults to the quote-level or product-level setting.</p>",
                  "example": true
                },
                {
                  "name": "evergreen",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Whether this is an evergreen subscription (no fixed term). Cannot be combined with <code>subscriptionTerm</code> or <code>endDate</code>.</p>",
                  "example": false
                },
                {
                  "name": "billingPeriod",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Billing period override. Per-line, both label (<code>Monthly</code>) and API value (<code>Month</code>) are accepted. Top-level header <code>billingPeriod</code> requires the API value.</p>",
                  "example": "Month"
                },
                {
                  "name": "billingTiming",
                  "kind": "optional",
                  "type": "string<In Advance | In Arrears>",
                  "description": "<p>Billing timing override — whether billed before or after service delivery.</p>",
                  "example": "In Advance",
                  "enum": [
                    "In Advance",
                    "In Arrears"
                  ]
                },
                {
                  "name": "renewalTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Renewal term in months. Must be > 0.</p>",
                  "example": 12,
                  "minimum": 0
                },
                {
                  "name": "discount",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Discretionary discount percentage (0-100). Overrides header-level discount for this product. If both <code>discount</code> and <code>discountAmount</code> are set, <code>discount</code> takes precedence.</p>",
                  "example": 15.5,
                  "minimum": 0,
                  "maximum": 100
                },
                {
                  "name": "discountAmount",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Discretionary discount amount (currency). Ignored if <code>discount</code> is also provided.</p>",
                  "example": 100,
                  "minimum": 0
                },
                {
                  "name": "priceTags",
                  "kind": "optional",
                  "type": "array",
                  "description": "Price or discount tags to apply to this product.",
                  "modelRef": "#/components/schemas/PriceTagInput",
                  "customType": "PriceTagInput[]",
                  "schema": [
                    {
                      "name": "code",
                      "kind": "optional",
                      "type": "string",
                      "description": "The price tag code.",
                      "example": "REGR_DISC_QTY_TIERED"
                    },
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "description": "The price tag ID.",
                      "example": "a0dcU000005sZRrQAM"
                    }
                  ]
                },
                {
                  "name": "customPricingAttributes",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Custom Price Book Entry field values used to disambiguate multi-attribute pricing. Each entry's <code>name</code> must be the <strong>full Salesforce field API name</strong> including the namespace prefix and <code>__c</code> suffix (for example <code>Ruby__PricingAttribute_3__c</code>). Multiple attributes are AND'd together when filtering candidate PBEs.</p>",
                  "modelRef": "#/components/schemas/CustomPricingAttribute",
                  "customType": "CustomPricingAttribute[]",
                  "schema": [
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Full Salesforce field API name on the PriceBookEntry, including the package namespace prefix and <code>__c</code> suffix. Examples: <code>Ruby__PricingAttribute_3__c</code>, <code>Ruby__Segment__c</code>. Bare names without namespace or <code>__c</code> are rejected with <code>Invalid field &#x3C;name> for PricebookEntry</code>.</p>",
                      "example": "Ruby__PricingAttribute_3__c"
                    },
                    {
                      "name": "value",
                      "kind": "required",
                      "type": "string",
                      "description": "The value to match against the PriceBookEntry field. Compared as a string.",
                      "example": "New Business"
                    }
                  ]
                },
                {
                  "name": "addOns",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Optional add-on products for bundles. Each add-on is itself a product request object.</p>",
                  "modelRef": "#/components/schemas/AddQuoteProductRequest",
                  "customType": "AddQuoteProductRequest[]",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Circular-Reference"
                    }
                  ]
                },
                {
                  "name": "productOptionId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>For add-on lines, targets a specific bundle option slot (RIM-20981). When set, productSku/productName become optional.</p>"
                },
                {
                  "name": "netSalesPrice",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Explicit unit net sales price; back-calculates the discount. Mutually exclusive with discount and discountAmount.</p>"
                },
                {
                  "name": "paymentTerm",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Per-line payment term override, e.g. 'Net 30'.</p>"
                },
                {
                  "name": "coTermAsset",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Change-order only. Co-terminate this new line with the named Salesforce subscription number.</p>"
                },
                {
                  "name": "parentLineId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Update API only. Adds this product as an option child under the existing bundle line with this id, resolved against that bundle's live option config. May target the root bundle line or a nested sub-bundle line. Omit for a top-level add.</p>",
                  "example": "0QLRu00000AAvDcIAL"
                },
                {
                  "name": "customFields",
                  "kind": "optional",
                  "type": "map",
                  "description": "<p>Line-level custom field name/value pairs applied directly onto the created line item. Keys are Salesforce API names on the line object (QuoteLineItem or OrderProduct); an unknown field name is rejected. Supported on /cpq/quotes, /cpq/orders, and the addLineItems action of the </p><div></div> endpoints.<p></p>",
                  "example": "{\"CostCenter__c\":\"CC-1042\",\"Ruby__IncludedUnits__c\":25}",
                  "customType": "map<string, string>",
                  "schema": []
                },
                {
                  "name": "rampValues",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Per-ramp Line Attribute values for a ramped line. Each entry sets custom field values on one ramp line, addressed by rampLineIndex. Ramp lines not named inherit the line-level value, then the Pricebook Entry default. Supported on /cpq/quotes and /cpq/orders.</p>",
                  "modelRef": "#/components/schemas/RampValueInput",
                  "customType": "RampValueInput[]",
                  "schema": [
                    {
                      "name": "rampLineIndex",
                      "kind": "optional",
                      "type": "integer",
                      "description": "<p>Which ramp line to apply the values to, 1-based in schedule order.</p>",
                      "example": 1
                    },
                    {
                      "name": "startDate",
                      "kind": "optional",
                      "type": "string<date>",
                      "description": "<p>The ramp line's start date, accepted as a readable alias for rampLineIndex. Ramp line dates are derived by the pricing engine, so this is not the addressing key; when both are given they must agree.</p>",
                      "example": "2026-01-01",
                      "format": "date"
                    },
                    {
                      "name": "fieldValues",
                      "kind": "optional",
                      "type": "map",
                      "description": "<p>Field name/value pairs applied to this ramp line only, overriding what it would otherwise inherit from its parent line.</p>",
                      "example": "{\"Overage_Rate__c\":3}",
                      "customType": "map<string, string>",
                      "schema": []
                    }
                  ]
                }
              ]
            },
            {
              "name": "taxRates",
              "kind": "optional",
              "type": "array",
              "description": "<p>Optional per-product tax-rate overrides applied while pricing the change (not merely accepted and ignored).</p>",
              "modelRef": "#/components/schemas/ProductTaxRate",
              "customType": "ProductTaxRate[]",
              "schema": [
                {
                  "name": "productSku",
                  "kind": "required",
                  "type": "string",
                  "description": "<p>The product (StockKeepingUnit) to apply the rate to.</p>"
                },
                {
                  "name": "taxPercentage",
                  "kind": "required",
                  "type": "number",
                  "description": "<p>Tax rate as a percentage, e.g. 8.25 for 8.25%.</p>",
                  "example": 8.25
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/ChangeOrderRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Change order created successfully",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response from change order execution containing all created and modified objects",
            "customType": "ChangeOrderResponse",
            "schema": [
              {
                "name": "headerObjectIds",
                "kind": "required",
                "type": "array",
                "description": "<p>List of primary object IDs created or modified (orders, quotes, etc.)</p>",
                "example": "[\"801xx000003ABCD\",\"0Q04x000002DEF1\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "<p>Processing messages, warnings, or notifications from the change order execution</p>",
                "example": "[\"Asset SUB-086067 quantity updated from 5 to 10\",\"Prorated charges calculated\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "order",
                "kind": "optional",
                "type": "map",
                "description": "<p>Order object created or modified by the change (if proceedOption was CreateOrder or UseExistingOrder)</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "orderProducts",
                "kind": "optional",
                "type": "array",
                "description": "<p>Order product records with hierarchical parent-child relationships</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "subscriptions",
                "kind": "optional",
                "type": "array",
                "description": "Subscription records created or modified by the change order",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "assets",
                "kind": "optional",
                "type": "array",
                "description": "<p>Asset records representing the customer's updated subscription states with new quantities, prices, or configurations</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "entitlements",
                "kind": "optional",
                "type": "array",
                "description": "Entitlement records updated to reflect new access rights and usage limits",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "invoices",
                "kind": "optional",
                "type": "array",
                "description": "<p>Salesforce invoice records if generateInvoice option was enabled (legacy versions only)</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "quotes",
                "kind": "optional",
                "type": "array",
                "description": "Quote records created if proceedOption was CreateQuote or UseExistingQuote",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ChangeOrderResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "BadRequestError",
            "schema": [
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "<p>Machine-readable code for the failure.</p>"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable description.</p>"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "<p>Present for field-level validation problems; one entry per offending field.</p>",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "path",
                "kind": "optional",
                "type": "string",
                "description": "<p>The input at fault, e.g. assetChanges[0].quantity.</p>"
              },
              {
                "name": "relatedPaths",
                "kind": "optional",
                "type": "array",
                "description": "Any other inputs involved in the same problem.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "<p>Legacy/alternate shape returned for some upstream failures — present but incomplete on its own.</p>"
              }
            ],
            "modelRef": "#/components/schemas/BadRequestError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "<p>Resolution required — a bundle Upgrade/Downgrade/Swap still has an unresolved one-to-many source→target tie. Resolve by adding transformations pins (see the </p><div></div> endpoint) and retry.<p></p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"errorCode\":\"RESOLUTION_REQUIRED\",\"message\":\"Several target options match these sources — choose one per source.\",\"path\":\"assetChanges[0].assetNumber[SUB-000868]\",\"ambiguities\":[{\"sourceAssetNumber\":\"SUB-000868\",\"sourceProductName\":\"Growth Bundle\",\"candidates\":[{\"targetProductOptionId\":\"a1B...\",\"targetPriceBookEntryId\":\"01u...\",\"targetProductName\":\"Scale Bundle\",\"changeType\":\"Upgrade\",\"recommended\":true,\"recommendationReason\":\"Closest tier match\"}]}]}",
            "description": "",
            "customType": "ResolutionRequiredError",
            "schema": [
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "RESOLUTION_REQUIRED"
              },
              {
                "name": "path",
                "kind": "optional",
                "type": "string",
                "description": "The unresolved source asset."
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "ambiguities",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/Ambiguity",
                "customType": "Ambiguity[]",
                "schema": [
                  {
                    "name": "sourceAssetNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "sourceProductName",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "candidates",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/Candidate",
                    "customType": "Candidate[]",
                    "schema": [
                      {
                        "name": "targetProductOptionId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "targetPriceBookEntryId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "targetProductName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "uom",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "customPricingAttributes",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "listPrice",
                        "kind": "optional",
                        "type": "number",
                        "description": ""
                      },
                      {
                        "name": "priceModel",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "currencyIsoCode",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "billingTiming",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "changeType",
                        "kind": "optional",
                        "type": "string<Upgrade | Downgrade | Swap>",
                        "description": "<p>Per-candidate transformation direction (distinct from the operation-level changeType).</p>",
                        "enum": [
                          "Upgrade",
                          "Downgrade",
                          "Swap"
                        ]
                      },
                      {
                        "name": "targetKind",
                        "kind": "optional",
                        "type": "string<BUNDLE | PRODUCT>",
                        "description": "",
                        "enum": [
                          "BUNDLE",
                          "PRODUCT"
                        ]
                      },
                      {
                        "name": "recommended",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "recommendationReason",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "relatedPaths",
                "kind": "optional",
                "type": "array",
                "description": "Other changes involved in the same conflict.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ResolutionRequiredError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "ezXS-ATAbYsi9ZfGScP_s",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/change-order \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"options\": {\n     \"proceedOption\": \"\"\n     },\n     \"assetChanges\": [\n     {\n     \"changeType\": \"\",\n     \"addOnChanges\": [\n     {\n     \"changeType\": \"\"\n     }\n     ],\n     \"addOns\": [\n     {\n     \"customPricingAttributes\": [\n     {\n     \"name\": \"Ruby__PricingAttribute_3__c\",\n     \"value\": \"New Business\"\n     }\n     ]\n     }\n     ],\n     \"transformations\": [\n     {\n     \"sourceAssetNumber\": \"\",\n     \"customPricingAttributes\": [\n     {\n     \"name\": \"Ruby__PricingAttribute_3__c\",\n     \"value\": \"New Business\"\n     }\n     ]\n     }\n     ]\n     }\n     ],\n     \"products\": [\n     {\n     \"customPricingAttributes\": [\n     {\n     \"name\": \"Ruby__PricingAttribute_3__c\",\n     \"value\": \"New Business\"\n     }\n     ]\n     }\n     ],\n     \"taxRates\": [\n     {\n     \"productSku\": \"\",\n     \"taxPercentage\": 8.25\n     }\n     ]\n     }'"
        },
        {
          "id": "P0ApMWIxT-fjFyNBhHFum",
          "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   \"options\": {\n      \"proceedOption\": \"\"\n   },\n   \"assetChanges\": [\n      {\n         \"changeType\": \"\",\n         \"addOnChanges\": [\n            {\n               \"changeType\": \"\"\n            }\n         ],\n         \"addOns\": [\n            {\n               \"customPricingAttributes\": [\n                  {\n                     \"name\": \"Ruby__PricingAttribute_3__c\",\n                     \"value\": \"New Business\"\n                  }\n               ]\n            }\n         ],\n         \"transformations\": [\n            {\n               \"sourceAssetNumber\": \"\",\n               \"customPricingAttributes\": [\n                  {\n                     \"name\": \"Ruby__PricingAttribute_3__c\",\n                     \"value\": \"New Business\"\n                  }\n               ]\n            }\n         ]\n      }\n   ],\n   \"products\": [\n      {\n         \"customPricingAttributes\": [\n            {\n               \"name\": \"Ruby__PricingAttribute_3__c\",\n               \"value\": \"New Business\"\n            }\n         ]\n      }\n   ],\n   \"taxRates\": [\n      {\n         \"productSku\": \"\",\n         \"taxPercentage\": 8.25\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/change-order\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "kMCAKkr12gPqRRETabnXp",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/cpq/change-order\")\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   \"options\": {\n      \"proceedOption\": \"\"\n   },\n   \"assetChanges\": [\n      {\n         \"changeType\": \"\",\n         \"addOnChanges\": [\n            {\n               \"changeType\": \"\"\n            }\n         ],\n         \"addOns\": [\n            {\n               \"customPricingAttributes\": [\n                  {\n                     \"name\": \"Ruby__PricingAttribute_3__c\",\n                     \"value\": \"New Business\"\n                  }\n               ]\n            }\n         ],\n         \"transformations\": [\n            {\n               \"sourceAssetNumber\": \"\",\n               \"customPricingAttributes\": [\n                  {\n                     \"name\": \"Ruby__PricingAttribute_3__c\",\n                     \"value\": \"New Business\"\n                  }\n               ]\n            }\n         ]\n      }\n   ],\n   \"products\": [\n      {\n         \"customPricingAttributes\": [\n            {\n               \"name\": \"Ruby__PricingAttribute_3__c\",\n               \"value\": \"New Business\"\n            }\n         ]\n      }\n   ],\n   \"taxRates\": [\n      {\n         \"productSku\": \"\",\n         \"taxPercentage\": 8.25\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "vkzY5AnbvScIYdvjihum7",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/change-order\"\n\npayload = json.dumps({\n   \"options\": {\n      \"proceedOption\": \"\"\n   },\n   \"assetChanges\": [\n      {\n         \"changeType\": \"\",\n         \"addOnChanges\": [\n            {\n               \"changeType\": \"\"\n            }\n         ],\n         \"addOns\": [\n            {\n               \"customPricingAttributes\": [\n                  {\n                     \"name\": \"Ruby__PricingAttribute_3__c\",\n                     \"value\": \"New Business\"\n                  }\n               ]\n            }\n         ],\n         \"transformations\": [\n            {\n               \"sourceAssetNumber\": \"\",\n               \"customPricingAttributes\": [\n                  {\n                     \"name\": \"Ruby__PricingAttribute_3__c\",\n                     \"value\": \"New Business\"\n                  }\n               ]\n            }\n         ]\n      }\n   ],\n   \"products\": [\n      {\n         \"customPricingAttributes\": [\n            {\n               \"name\": \"Ruby__PricingAttribute_3__c\",\n               \"value\": \"New Business\"\n            }\n         ]\n      }\n   ],\n   \"taxRates\": [\n      {\n         \"productSku\": \"\",\n         \"taxPercentage\": 8.25\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": "ezXS-ATAbYsi9ZfGScP_s"
    },
    "results": {
      "languages": [
        {
          "id": "lgmpNE5jvVIEcimVJFaG9",
          "language": "200",
          "code": "// Change order created successfully\n{\n  \"headerObjectIds\": [\n    \"\"\n  ],\n  \"messages\": [\n    \"\"\n  ],\n  \"order\": \"\",\n  \"orderProducts\": [\n    {}\n  ],\n  \"subscriptions\": [\n    {}\n  ],\n  \"assets\": [\n    {}\n  ],\n  \"entitlements\": [\n    {}\n  ],\n  \"invoices\": [\n    {}\n  ],\n  \"quotes\": [\n    {}\n  ]\n}"
        },
        {
          "id": "CBDr4u2_728K34G-RYsMz",
          "language": "400",
          "code": "// Bad Request\n{\n  \"errorCode\": \"\",\n  \"message\": \"\",\n  \"errors\": [\n    \"\"\n  ],\n  \"path\": \"\",\n  \"relatedPaths\": [\n    \"\"\n  ],\n  \"error\": \"\"\n}"
        },
        {
          "id": "mkQuHSgV_2N1Dn93zsVir",
          "language": "409",
          "code": "// Resolution required — a bundle Upgrade/Downgrade/Swap still has an unresolved one-to-many source→target tie. Resolve by adding transformations pins (see the  endpoint) and retry.\n{\n  \"errorCode\": \"RESOLUTION_REQUIRED\",\n  \"path\": \"\",\n  \"message\": \"\",\n  \"ambiguities\": [\n    {\n      \"sourceAssetNumber\": \"\",\n      \"sourceProductName\": \"\",\n      \"candidates\": [\n        {\n          \"targetProductOptionId\": \"\",\n          \"targetPriceBookEntryId\": \"\",\n          \"targetProductName\": \"\",\n          \"uom\": \"\",\n          \"customPricingAttributes\": [\n            {}\n          ],\n          \"listPrice\": 0,\n          \"priceModel\": \"\",\n          \"currencyIsoCode\": \"\",\n          \"billingTiming\": \"\",\n          \"changeType\": \"\",\n          \"targetKind\": \"\",\n          \"recommended\": false,\n          \"recommendationReason\": \"\"\n        }\n      ]\n    }\n  ],\n  \"relatedPaths\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "lgmpNE5jvVIEcimVJFaG9"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}