API References
...
Orders
Create Draft Order
1 min
code examples curl location 'https //api nue io/orders' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "customer" { "id" "" }, "effectivedate" "", "orderproducts" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "addons" \[ { "productoptionid" "" } ] } ] } ], "options" {}, "billtocontact" { "id" "" } }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "customer" { "id" "" }, "effectivedate" "", "orderproducts" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "addons" \[ { "productoptionid" "" } ] } ] } ], "options" {}, "billtocontact" { "id" "" } }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api nue io/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/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({ "customer" { "id" "" }, "effectivedate" "", "orderproducts" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "addons" \[ { "productoptionid" "" } ] } ] } ], "options" {}, "billtocontact" { "id" "" } }) response = https request(request) puts response read body import requests import json url = "https //api nue io/orders" payload = json dumps({ "customer" { "id" "" }, "effectivedate" "", "orderproducts" \[ { "pricebookentryid" "", "quantity" "", "subscriptionstartdate" "", "addons" \[ { "productoptionid" "", "addons" \[ { "productoptionid" "" } ] } ] } ], "options" {}, "billtocontact" { "id" "" } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // order preview created successfully { "status" "", "data" { "assets" \[ {} ], "entitlements" \[ {} ], "order" { "activatedbyid" "", "activateddate" "", "billcycleday" "", "billtocontactid" "", "billingaccountid" "", "billingaddress" "", "billingperiod" "", "cancellationdate" "", "customerid" "", "description" "", "discount" 0, "discountamount" 0, "enddate" "", "entityusecode" "", "id" "", "isshippingaddresssameasbilling" false, "listtotal" 0, "name" "", "ordernumber" "", "orderstartdate" "", "paymentmethod" "", "podate" "", "ponumber" "", "pricebookid" "", "shiptocontactid" "", "shippingaddress" "", "status" "", "subtotal" 0, "systemdiscount" 0, "systemdiscountamount" 0, "tax" 0, "totalamount" 0, "totalprice" 0 }, "orderproducts" \[ { "actualquantity" 0, "autorenew" false, "billcycleday" "", "billcyclestartmonth" "", "billingperiod" "", "billingtiming" "", "cancellationdate" "", "carveseligible" false, "carvesliabilitysegment" "", "carvesrevenuesegment" "", "contractliabilitysegment" "", "contractrevenuesegment" "", "customerid" "", "defaultrenewalterm" 0, "deltaacv" 0, "deltaarr" 0, "deltacmrr" 0, "deltatcv" 0, "description" "", "discount" 0, "discountamount" 0, "entityid" "", "entityusecode" "", "evergreen" false, "id" "", "linetype" "", "listprice" 0, "listtotalprice" 0, "name" "", "netsalesprice" 0, "orderid" "", "parentorderproductid" "", "pricebookentryid" "", "productid" "", "productname" "", "quantity" 0, "rootorderproductid" "", "salesprice" 0, "sku" "", "sortorder" 0, "status" "", "subscriptionenddate" "", "subscriptionstartdate" "", "subscriptionterm" 0, "subtotal" 0, "systemdiscount" 0, "systemdiscountamount" 0, "tax" 0, "totalamount" 0, "totalprice" 0, "uom" "", "uomid" "" } ], "previewinvoices" \[ { "accountex" "", "accountid" "", "accountingstatus" "", "amount" 0, "amountwithouttax" 0, "balance" 0, "duedate" "", "enddate" "", "groupkey" { "billingaccount" "" }, "invoicedate" "", "items" \[ { "accountid" "", "groupkey" { "billingaccount" "" }, "recordtype" "", "productid" "", "productname" "", "assetid" "", "assetnumber" "", "assettype" "", "uomid" "", "transactiondate" "", "transactionamount" 0, "transactionquantity" 0, "shippingandhandling" 0, "taxamount" 0, "netsalesprice" 0, "startdate" "", "enddate" "", "billingtiming" "", "status" "", "taxstatus" "" } ], "paymentmethods" \[ "" ], "recordtype" "", "shippingandhandling" 0, "startdate" "", "status" "", "taxamount" 0, "taxstatus" "" } ], "subscriptions" \[ {} ] }, "warnings" \[ { "code" "", "message" "" } ] }// bad request due to invalid input parameters { "status" "", "errortype" "", "errorcode" "", "message" "" }