Create Change Order
1 min
POST
https://api.nue.io/cpq/change-order
Header Parameters
- Ruby-VersionstringExampleDescription
Body Parameters
- bodyChangeOrderRequestrequiredExamplesCreate Order (proceedOption=CreateOrder) - modify a subscription and add a new product line in one change order:
{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "UpdateQuantity", "assetNumber": "SUB-086067", "quantity": 25, "startDate": "2024-01-01" } ], "products": [ { "productSku": "SKU-ADDON-01", "quantity": 5, "subscriptionTerm": 12, "subscriptionTermDimension": "Months" } ] }Create Quote (proceedOption=CreateQuote) - create a reviewable change quote, optionally tied to an opportunity:{ "options": { "activateOrder": false, "proceedOption": "CreateQuote", "opportunityId": "006Ru00000K5bY9IAJ" }, "assetChanges": [ { "changeType": "Upgrade", "assetNumber": "SUB-086067", "targetPriceBookEntryId": "01uRu000004SyY8IAK", "startDate": "2024-01-15" } ], "products": [ { "productSku": "SKU-ADDON-01", "quantity": 5, "subscriptionTerm": 12, "subscriptionTermDimension": "Months" } ] }Reconfigure - Add New Products to Bundle:{ "options": { "activateOrder": false, "proceedOption": "CreateQuote", "opportunityId": "006Ru00000K5bY9IAJ" }, "assetChanges": [ { "changeType": "Reconfigure", "assetNumber": "SUB-086067", "startDate": "2025-09-19", "addOnChanges": [ { "changeType": "NewProduct", "productOptionId": "a8fRu0000002bOmIAI", "priceBookEntryId": "01uRu000004SyY7IAK", "productOptionQuantity": 1 } ] } ] }Update Quantity:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "UpdateQuantity", "assetNumber": "SUB-086067", "quantity": 15, "startDate": "2025-09-19", "endDate": "2025-12-31" } ] }Renew with Specific Term:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Renew", "assetNumber": "SUB-086067", "renewalTerm": 12, "switchToEvergreen": false } ] }Convert to Evergreen:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Renew", "assetNumber": "SUB-086067", "switchToEvergreen": true } ] }Cancel Subscription:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Cancel", "assetNumber": "SUB-086067", "cancellationDate": "2025-12-31" } ] }Adjust Price - Set New Amount:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "AdjustPrice", "assetNumber": "SUB-086067", "netSalesPrice": 1200, "startDate": "2025-09-19", "endDate": "2025-12-31" } ] }Adjust Price - Apply Discount:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "AdjustPrice", "assetNumber": "SUB-086067", "startDate": "2025-09-19", "discount": { "discountPercentage": 20, "applyToChildren": true } } ] }Upgrade to Higher Tier:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Upgrade", "assetNumber": "SUB-086067", "targetPriceBookEntryId": "01uRu000004SyY8IAK", "startDate": "2025-09-19", "samePriceSwap": false, "priceTags": [ "ENTERPRISE_TIER" ] } ] }Downgrade to Lower Tier:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Downgrade", "assetNumber": "SUB-086067", "targetPriceBookEntryId": "01uRu000004SyY6IAK", "startDate": "2025-09-19", "samePriceSwap": false } ] }Swap to Different Product:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Swap", "assetNumber": "SUB-086067", "targetPriceBookEntryId": "01uRu000004SyY9IAK", "startDate": "2025-09-19", "samePriceSwap": true } ] }Update Subscription Term:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "UpdateTerm", "assetNumber": "SUB-086067", "term": 24, "switchToEvergreen": false } ] }Co-term Subscription:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "CoTerm", "assetNumber": "SUB-086067", "coTermDate": "2025-12-31" } ] }Convert Free Trial to Paid:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "ConvertFreeTrial", "assetNumber": "SUB-086067", "startDate": "2025-09-19", "term": 12, "switchToEvergreen": false, "coTermToBundleSubscription": false, "overrideTrialEnd": true } ] }New Product (Cross-Sell):{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Cancel", "assetNumber": "SUB-000192", "cancellationDate": "2025-02-15" }, { "changeType": "NewProduct", "priceBookEntryId": "01uRu000004SyY8IAK", "startDate": "2025-02-15", "quantity": 3, "term": 12 } ] }New Product with Bundle Add-Ons:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Cancel", "assetNumber": "SUB-000192", "cancellationDate": "2025-02-15" }, { "changeType": "NewProduct", "priceBookEntryId": "01uRu000004SyY8IAK", "startDate": "2025-02-15", "quantity": 3, "term": 12, "addOns": [ { "changeType": "NewProduct", "productOptionId": "a0jRu0000002bOmIAI", "productOptionQuantity": 3 }, { "changeType": "NewProduct", "productOptionId": "a0jRu0000002bOnIAI", "priceBookEntryId": "01uRu000004SyY7IAK", "productOptionQuantity": 10 } ] } ] }New Product Co-Termed:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Cancel", "assetNumber": "SUB-000192", "cancellationDate": "2025-02-15" }, { "changeType": "NewProduct", "priceBookEntryId": "01uRu000004SyY8IAK", "startDate": "2025-02-15", "quantity": 5, "coTermAsset": "SUB-000200" } ] }Multiple Changes in Single Request:{ "options": { "activateOrder": true, "proceedOption": "CreateOrder" }, "assetChanges": [ { "changeType": "Reconfigure", "assetNumber": "SUB-086067", "startDate": "2025-09-19", "addOnChanges": [ { "changeType": "NewProduct", "productOptionId": "a8fRu0000002bOmIAI", "priceBookEntryId": "01uRu000004SyY7IAK", "productOptionQuantity": 2, "startDate": "2025-09-19", "term": 12 }, { "changeType": "UpdateQuantity", "assetNumber": "SUB-086068", "productOptionQuantityChange": 5, "startDate": "2025-09-19" }, { "changeType": "Cancel", "assetNumber": "SUB-086069", "cancellationDate": "2025-12-31" } ] }, { "changeType": "UpdateQuantity", "assetNumber": "SUB-086070", "quantity": 10, "startDate": "2025-09-19" } ] }Description- optionsobjectrequired
- activateOrderbooleanDescription
- proceedOptionstring<UseExistingQuote | UseExistingOrder | CreateOrder | CreateQuote>requiredDescriptionAllowedUseExistingQuoteUseExistingOrderCreateOrderCreateQuote
- opportunityIdstringDescription
- containedObjectIdstringDescription
- assetChangesAssetChangeRequest[]requiredDescription
- changeTypestring<Reconfigure | UpdateQuantity | Renew | UpdateTerm | CoTerm | Cancel | AdjustPrice | ConvertFreeTrial | Upgrade | Downgrade | Swap | NewProduct | UpdateField>requiredDescriptionAllowedReconfigureUpdateQuantityRenewUpdateTermCoTermCancelAdjustPriceConvertFreeTrialUpgradeDowngradeSwapNewProductUpdateField
- assetNumberstringDescription
- quantitynumberDescription
- renewalTermnumberDescription
- termnumberDescription
- coTermDatestring<date>DescriptionFormatdate
- cancellationDatestring<date>DescriptionFormatdate
- startDatestring<date>DescriptionFormatdate
- endDatestring<date>DescriptionFormatdate
- netSalesPricenumberDescription
- discountobjectDescription
- discountPercentagenumberDescription
- applyToChildrenbooleanDescription
- targetPriceBookEntryIdstringDescription
- samePriceSwapbooleanDescription
- priceTagsstring[]Description
- switchToEvergreenbooleanDescription
- coTermToBundleSubscriptionbooleanDescription
- overrideTrialEndbooleanDescription
- trueUpPricebooleanDescription
- addOnChangesobject[]Description
- changeTypestring<NewProduct | UpdateQuantity | Cancel>requiredDescriptionAllowedNewProductUpdateQuantityCancel
- productOptionIdstringDescription
- priceBookEntryIdstringDescription
- productOptionQuantitynumberDescription
- productOptionQuantityChangenumberDescription
- startDatestring<date>DescriptionFormatdate
- termnumberDescription
- cancellationDatestring<date>DescriptionFormatdate
- assetNumberstringDescription
- fieldsToUpdateobject[]Description
- fieldApiNamestringDescription
- newValuestringDescription
- addOnsAddQuoteProductRequest[]Description
- productSkustringExampleDescription
- productNamestringExampleDescription
- priceBookEntryIdstringExampleDescription
- quantitynumberExampleDescriptionMinimum0
- uomstringExampleDescription
- startDatestring<date>ExampleDescriptionFormatdate
- endDatestring<date>ExampleDescriptionFormatdate
- subscriptionTermnumberExampleDescriptionMinimum0
- subscriptionTermDimensionstring<Month | Year>ExampleDescriptionAllowedMonthYear
- autoRenewbooleanExampleDescription
- evergreenbooleanDescription
- billingPeriodstringExampleDescription
- billingTimingstring<In Advance | In Arrears>ExampleDescriptionAllowedIn AdvanceIn Arrears
- renewalTermnumberExampleDescriptionMinimum0
- discountnumberExampleDescriptionMinimum0Maximum100
- discountAmountnumberExampleDescriptionMinimum0
- priceTagsPriceTagInput[]Description
- codestringExampleDescription
- idstringExampleDescription
- customPricingAttributesCustomPricingAttribute[]Description
- namestringrequiredExampleDescription
- valuestringrequiredExampleDescription
- addOnsAddQuoteProductRequest[]Description
- Circular-Reference
- productOptionIdstringDescription
- netSalesPricenumberDescription
- paymentTermstringDescription
- coTermAssetstringDescription
- parentLineIdstringExampleDescription
- customFieldsmap<string, string>Example
{ "CostCenter__c": "CC-1042", "Ruby__IncludedUnits__c": 25 }Description - rampValuesRampValueInput[]Description
- rampLineIndexintegerExampleDescription
- startDatestring<date>ExampleDescriptionFormatdate
- fieldValuesmap<string, string>Example
{ "Overage_Rate__c": 3 }Description
- transformationsTransformation[]Description
- sourceAssetNumberstringrequiredDescription
- targetProductOptionIdstringDescription
- targetPriceBookEntryIdstringDescription
- uomstringDescription
- customPricingAttributesCustomPricingAttribute[]Description
- namestringrequiredExampleDescription
- valuestringrequiredExampleDescription
- billingTimingstringDescription
- productsAddQuoteProductRequest[]Description
- productSkustringExampleDescription
- productNamestringExampleDescription
- priceBookEntryIdstringExampleDescription
- quantitynumberExampleDescriptionMinimum0
- uomstringExampleDescription
- startDatestring<date>ExampleDescriptionFormatdate
- endDatestring<date>ExampleDescriptionFormatdate
- subscriptionTermnumberExampleDescriptionMinimum0
- subscriptionTermDimensionstring<Month | Year>ExampleDescriptionAllowedMonthYear
- autoRenewbooleanExampleDescription
- evergreenbooleanDescription
- billingPeriodstringExampleDescription
- billingTimingstring<In Advance | In Arrears>ExampleDescriptionAllowedIn AdvanceIn Arrears
- renewalTermnumberExampleDescriptionMinimum0
- discountnumberExampleDescriptionMinimum0Maximum100
- discountAmountnumberExampleDescriptionMinimum0
- priceTagsPriceTagInput[]Description
- codestringExampleDescription
- idstringExampleDescription
- customPricingAttributesCustomPricingAttribute[]Description
- namestringrequiredExampleDescription
- valuestringrequiredExampleDescription
- addOnsAddQuoteProductRequest[]Description
- Circular-Reference
- productOptionIdstringDescription
- netSalesPricenumberDescription
- paymentTermstringDescription
- coTermAssetstringDescription
- parentLineIdstringExampleDescription
- customFieldsmap<string, string>Example
{ "CostCenter__c": "CC-1042", "Ruby__IncludedUnits__c": 25 }Description - rampValuesRampValueInput[]Description
- rampLineIndexintegerExampleDescription
- startDatestring<date>ExampleDescriptionFormatdate
- fieldValuesmap<string, string>Example
{ "Overage_Rate__c": 3 }Description
- taxRatesProductTaxRate[]Description
- productSkustringrequiredDescription
- taxPercentagenumberrequiredExampleDescription
Responses
200
- ChangeOrderResponseDescription
- headerObjectIdsstring[]requiredExample
[ "801xx000003ABCD", "0Q04x000002DEF1" ]
Description - messagesstring[]Example
[ "Asset SUB-086067 quantity updated from 5 to 10", "Prorated charges calculated" ]
Description - ordermap<string, string>Description
- orderProductsobject[]Description
- subscriptionsobject[]Description
- assetsobject[]Description
- entitlementsobject[]Description
- invoicesobject[]Description
- quotesobject[]Description
400
- BadRequestError
- errorCodestringDescription
- messagestringDescription
- errorsstring[]Description
- pathstringDescription
- relatedPathsstring[]Description
- errorstringDescription
409
- ResolutionRequiredErrorExample
{ "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" } ] } ] }- errorCodestringExample
- pathstringDescription
- messagestring
- ambiguitiesAmbiguity[]
- sourceAssetNumberstring
- sourceProductNamestring
- candidatesCandidate[]
- targetProductOptionIdstring
- targetPriceBookEntryIdstring
- targetProductNamestring
- uomstring
- customPricingAttributesobject[]
- listPricenumber
- priceModelstring
- currencyIsoCodestring
- billingTimingstring
- changeTypestring<Upgrade | Downgrade | Swap>DescriptionAllowedUpgradeDowngradeSwap
- targetKindstring<BUNDLE | PRODUCT>AllowedBUNDLEPRODUCT
- recommendedboolean
- recommendationReasonstring
- relatedPathsstring[]Description
curl
curl --request POST \
--url https://api.nue.io/cpq/change-order \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"options": {
"proceedOption": ""
},
"assetChanges": [
{
"changeType": "",
"addOnChanges": [
{
"changeType": ""
}
],
"addOns": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"transformations": [
{
"sourceAssetNumber": "",
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
}
],
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"taxRates": [
{
"productSku": "",
"taxPercentage": 8.25
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"options": {
"proceedOption": ""
},
"assetChanges": [
{
"changeType": "",
"addOnChanges": [
{
"changeType": ""
}
],
"addOns": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"transformations": [
{
"sourceAssetNumber": "",
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
}
],
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"taxRates": [
{
"productSku": "",
"taxPercentage": 8.25
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/cpq/change-order", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.nue.io/cpq/change-order")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"options": {
"proceedOption": ""
},
"assetChanges": [
{
"changeType": "",
"addOnChanges": [
{
"changeType": ""
}
],
"addOns": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"transformations": [
{
"sourceAssetNumber": "",
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
}
],
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"taxRates": [
{
"productSku": "",
"taxPercentage": 8.25
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/cpq/change-order"
payload = json.dumps({
"options": {
"proceedOption": ""
},
"assetChanges": [
{
"changeType": "",
"addOnChanges": [
{
"changeType": ""
}
],
"addOns": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"transformations": [
{
"sourceAssetNumber": "",
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
}
],
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
],
"taxRates": [
{
"productSku": "",
"taxPercentage": 8.25
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Change order created successfully
{
"headerObjectIds": [
""
],
"messages": [
""
],
"order": "",
"orderProducts": [
{}
],
"subscriptions": [
{}
],
"assets": [
{}
],
"entitlements": [
{}
],
"invoices": [
{}
],
"quotes": [
{}
]
}400
// Bad Request
{
"errorCode": "",
"message": "",
"errors": [
""
],
"path": "",
"relatedPaths": [
""
],
"error": ""
}409
// 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.
{
"errorCode": "RESOLUTION_REQUIRED",
"path": "",
"message": "",
"ambiguities": [
{
"sourceAssetNumber": "",
"sourceProductName": "",
"candidates": [
{
"targetProductOptionId": "",
"targetPriceBookEntryId": "",
"targetProductName": "",
"uom": "",
"customPricingAttributes": [
{}
],
"listPrice": 0,
"priceModel": "",
"currencyIsoCode": "",
"billingTiming": "",
"changeType": "",
"targetKind": "",
"recommended": false,
"recommendationReason": ""
}
]
}
],
"relatedPaths": [
""
]
}