Create Draft Change Order
1 min
code examples curl request post \\ \ url https //api nue io/change orders \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "products" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "productoptionquantity" "" } ] } ], "assetchanges" \[ { "changetype" "", "assetnumber" "", "addons" \[ { "productoptionid" "", "reconfigureeffectivedate" "", "productoptionquantity" "" } ] } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "products" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "productoptionquantity" "" } ] } ], "assetchanges" \[ { "changetype" "", "assetnumber" "", "addons" \[ { "productoptionid" "", "reconfigureeffectivedate" "", "productoptionquantity" "" } ] } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api nue io/change orders", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api nue io/change orders") 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({ "products" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "productoptionquantity" "" } ] } ], "assetchanges" \[ { "changetype" "", "assetnumber" "", "addons" \[ { "productoptionid" "", "reconfigureeffectivedate" "", "productoptionquantity" "" } ] } ] }) response = https request(request) puts response read body import requests import json url = "https //api nue io/change orders" payload = json dumps({ "products" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "productoptionquantity" "" } ] } ], "assetchanges" \[ { "changetype" "", "assetnumber" "", "addons" \[ { "productoptionid" "", "reconfigureeffectivedate" "", "productoptionquantity" "" } ] } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // change order draft/preview created successfully { "status" "", "data" { "assets" \[ { "assetcompositeid" "", "assetlevel" 0, "assetnumber" "", "assetprovidedbyid" "", "assetservicedbyid" "", "assetversion" 0, "billingperiod" "", "billingtiming" "", "cancellationdate" "", "contactid" "", "createdbyid" "", "createddate" "", "customerid" "", "description" "", "entityid" "", "externalid" "", "externalname" "", "id" "", "installdate" "", "internalasset" false, "iscompetitorproduct" false, "lastmodifiedbyid" "", "lastmodifieddate" "", "lastversionedassetid" "", "listprice" 0, "locationid" "", "name" "", "orderproductid" "", "originalassetid" "", "parentassetobject" "", "parentid" "", "price" 0, "pricebookentryid" "", "pricebookid" "", "productcode" "", "productdescription" "", "productfamily" "", "productid" "", "purchasedate" "", "quantity" 0, "reconfigureeffectivedate" "", "rootid" "", "salesprice" 0, "serialnumber" "", "sku" "", "startdate" "", "status" "", "statusreason" "", "taxamount" 0, "tcv" 0, "totalacv" 0, "totalamount" 0, "totalprice" 0, "totaltcv" 0, "uniqueidentifier" "", "uomid" "", "usageenddate" "", "product" "" } ], "entitlements" \[ { "billingperiod" "", "billingtiming" "", "cancellationdate" "", "createdbyid" "", "createddate" "", "customerid" "", "enddate" "", "entitlementcompositeid" "", "entitlementlevel" 0, "entitlementnumber" "", "entitlementversion" 0, "externalid" "", "externalname" "", "id" "", "isdeleted" false, "lastmodifiedbyid" "", "lastmodifieddate" "", "lastversionedentitlementid" "", "listprice" 0, "name" "", "netsalesprice" 0, "ordernumber" "", "orderondate" "", "orderproductid" "", "originalentitlementid" "", "originalentitlementnumber" "", "parententitlementobject" "", "parentid" "", "pricebookentryid" "", "pricebookid" "", "product" "", "productid" "", "productname" "", "quantity" 0, "quantitydimension" "", "reconfigureeffectivedate" "", "rootid" "", "salesprice" 0, "startdate" "", "status" "", "taxamount" 0, "tcv" 0, "termdimension" "", "totalacv" 0, "totalamount" 0, "totalprice" 0, "totaltcv" 0, "uomid" "" } ], "order" { "customerid" "", "discountamount" 0, "discountpercentage" 0, "effectivedate" "", "id" "", "listtotal" 0, "name" "", "pricebookid" "", "status" "", "subtotal" 0, "systemdiscount" 0, "systemdiscountamount" 0, "taxamount" 0, "totalamount" 0, "totalprice" 0 }, "orderproducts" \[ { "actualquantity" 0, "billingtiming" "", "carveseligible" false, "customerid" "", "deltaacv" 0, "deltaarr" 0, "deltacmrr" 0, "deltatcv" 0, "discount" 0, "discountamount" 0, "evergreen" false, "id" "", "linetype" "", "listprice" 0, "listtotalprice" 0, "name" "", "netsalesprice" 0, "orderid" "", "pricebookentryid" "", "productid" "", "quantity" 0, "rootid" "", "salesprice" 0, "sortorder" 0, "status" "", "subscriptionenddate" "", "subscriptionstartdate" "", "subscriptionterm" 0, "subtotal" 0, "systemdiscount" 0, "systemdiscountamount" 0, "taxamount" 0, "totalamount" 0, "totalprice" 0, "uomid" "" } ], "previews" \[ {} ], "warnings" \[ {} ] } }// bad request the request was malformed or contained invalid parameters // unauthorized authentication information is missing or invalid