API References
...
Quotes
Create Quote
1 min
code examples curl location 'https //api nue io/cpq/quotes' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "name" "enterprise deal q1 2025", "opportunityid" "opp 123e4567 e89b 12d3 a456 426614174000", "products" \[ { "custompricingattributes" \[ { "name" "ruby pricingattribute 1 c", "value" "technology partner" } ] } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "name" "enterprise deal q1 2025", "opportunityid" "opp 123e4567 e89b 12d3 a456 426614174000", "products" \[ { "custompricingattributes" \[ { "name" "ruby pricingattribute 1 c", "value" "technology partner" } ] } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api nue io/cpq/quotes", 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/cpq/quotes") 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({ "name" "enterprise deal q1 2025", "opportunityid" "opp 123e4567 e89b 12d3 a456 426614174000", "products" \[ { "custompricingattributes" \[ { "name" "ruby pricingattribute 1 c", "value" "technology partner" } ] } ] }) response = https request(request) puts response read body import requests import json url = "https //api nue io/cpq/quotes" payload = json dumps({ "name" "enterprise deal q1 2025", "opportunityid" "opp 123e4567 e89b 12d3 a456 426614174000", "products" \[ { "custompricingattributes" \[ { "name" "ruby pricingattribute 1 c", "value" "technology partner" } ] } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // quote created successfully { "status" "", "data" { "quote" { "id" "", "name" "", "opportunityid" "", "subscriptionstartdate" "", "subscriptionenddate" "", "subscriptionterm" 0, "listtotal" 0, "subtotal" 0, "totalprice" 0, "discount" 0, "discountamount" 0, "currencyisocode" "" }, "quotelineitems" \[ { "id" "", "parentid" "", "quotelineitem" { "id" "", "productsku" "", "productname" "", "quantity" 0, "listprice" 0, "subscriptionterm" 0, "listtotalprice" 0, "systemdiscount" 0, "systemdiscountamount" 0, "subtotal" 0, "salesprice" 0, "netsalesprice" 0, "discount" 0, "discountamount" 0, "totalprice" 0, "totalamount" 0, "subscriptionstartdate" "", "subscriptionenddate" "", "billingperiod" "", "billingtiming" "", "autorenew" false, "evergreen" false }, "uom" { "name" "", "quantitydimension" "", "termdimension" "" }, "product" { "id" "", "name" "", "sku" "", "revenuemodel" "" }, "productoption" { "id" "", "optiontype" "" }, "appliedpricetags" \[ { "id" "", "name" "", "code" "", "type" "" } ], "childrenlineitems" \[ { "" "" } ] } ] }, "warnings" \[ { "errorcode" "", "errortype" "", "message" "" } ], "errors" \[ { "errorcode" "", "errortype" "", "message" "" } ] }// validation error in the request { "code" 400, "message" "bad request", "details" "required field 'name' is missing" }// authentication failed — missing or invalid api key // internal server error { "code" 400, "message" "bad request", "details" "required field 'name' is missing" }