Amberflo API
Defining Quotes
Create or update a quote
1min
code examples curl location 'https //app amberflo io/payments/pricing/amberflo/customer quote' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "id" "", "owners" \[ { "id" "", "name" "" } ], "opportunityid" "", "opportunityname" "", "customerid" "", "contractgenerator" "", "approverlist" \[ { "id" "", "name" "" } ], "intervalusages" \[ { "timerange" {}, "meterusages" \[ { "meterapiname" "", "dimensionkeys" "", "variantusages" \[ { "dimensionvalues" "", "usagevalue" "", "usagefrequency" "" } ] } ], "promotions" \[ { "existingpromotionid" "", "inlinepromotion" "" } ] } ], "intervalquotes" \[ { "itemquotes" \[ { "itemquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "intervalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "totalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "id" "", "owners" \[ { "id" "", "name" "" } ], "opportunityid" "", "opportunityname" "", "customerid" "", "contractgenerator" "", "approverlist" \[ { "id" "", "name" "" } ], "intervalusages" \[ { "timerange" {}, "meterusages" \[ { "meterapiname" "", "dimensionkeys" "", "variantusages" \[ { "dimensionvalues" "", "usagevalue" "", "usagefrequency" "" } ] } ], "promotions" \[ { "existingpromotionid" "", "inlinepromotion" "" } ] } ], "intervalquotes" \[ { "itemquotes" \[ { "itemquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "intervalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "totalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //app amberflo io/payments/pricing/amberflo/customer quote", 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 //app amberflo io/payments/pricing/amberflo/customer quote") 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({ "id" "", "owners" \[ { "id" "", "name" "" } ], "opportunityid" "", "opportunityname" "", "customerid" "", "contractgenerator" "", "approverlist" \[ { "id" "", "name" "" } ], "intervalusages" \[ { "timerange" {}, "meterusages" \[ { "meterapiname" "", "dimensionkeys" "", "variantusages" \[ { "dimensionvalues" "", "usagevalue" "", "usagefrequency" "" } ] } ], "promotions" \[ { "existingpromotionid" "", "inlinepromotion" "" } ] } ], "intervalquotes" \[ { "itemquotes" \[ { "itemquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "intervalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "totalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } }) response = https request(request) puts response read body import requests import json url = "https //app amberflo io/payments/pricing/amberflo/customer quote" payload = json dumps({ "id" "", "owners" \[ { "id" "", "name" "" } ], "opportunityid" "", "opportunityname" "", "customerid" "", "contractgenerator" "", "approverlist" \[ { "id" "", "name" "" } ], "intervalusages" \[ { "timerange" {}, "meterusages" \[ { "meterapiname" "", "dimensionkeys" "", "variantusages" \[ { "dimensionvalues" "", "usagevalue" "", "usagefrequency" "" } ] } ], "promotions" \[ { "existingpromotionid" "", "inlinepromotion" "" } ] } ], "intervalquotes" \[ { "itemquotes" \[ { "itemquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "intervalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } } ], "totalquote" { "quotedusagecostbeforediscount" "", "quotedusagecostdiscount" "", "quotedusagecostafterdiscount" "", "quotedfixedcostbeforediscount" "", "quotedfixedcostdiscount" "", "quotedfixedcostafterdiscount" "", "quotedcostbeforediscount" "", "quotedcostdiscount" "", "quotedcostafterdiscount" "", "totalmeterunits" "" } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful request { "id" "", "owners" \[ { "id" "", "name" "" } ], "opportunityid" "", "opportunityname" "", "customerid" "", "contractgenerator" {}, "description" "", "approverlist" \[ { "id" "", "name" "", "approved" false } ], "intervalusages" \[ { "timerange" { "starttimeinseconds" "", "endtimeinseconds" "" }, "meterusages" \[ { "meterapiname" "", "dimensionkeys" \[ "" ], "variantusages" \[ { "dimensionvalues" \[ "" ], "usagevalue" 0, "usagefrequency" "" } ] } ], "promotions" \[ { "existingpromotionid" "", "inlinepromotion" {} } ] } ], "intervalquotes" \[ { "itemquotes" \[ { "itemquote" { "quotedusagecostbeforediscount" 0, "quotedusagecostdiscount" 0, "quotedusagecostafterdiscount" 0, "quotedfixedcostbeforediscount" 0, "quotedfixedcostdiscount" 0, "quotedfixedcostafterdiscount" 0, "quotedcostbeforediscount" 0, "quotedcostdiscount" 0, "quotedcostafterdiscount" 0, "totalmeterunits" 0 } } ], "intervalquote" { "quotedusagecostbeforediscount" 0, "quotedusagecostdiscount" 0, "quotedusagecostafterdiscount" 0, "quotedfixedcostbeforediscount" 0, "quotedfixedcostdiscount" 0, "quotedfixedcostafterdiscount" 0, "quotedcostbeforediscount" 0, "quotedcostdiscount" 0, "quotedcostafterdiscount" 0, "totalmeterunits" 0 } } ], "totalquote" { "quotedusagecostbeforediscount" 0, "quotedusagecostdiscount" 0, "quotedusagecostafterdiscount" 0, "quotedfixedcostbeforediscount" 0, "quotedfixedcostdiscount" 0, "quotedfixedcostafterdiscount" 0, "quotedcostbeforediscount" 0, "quotedcostdiscount" 0, "quotedcostafterdiscount" 0, "totalmeterunits" 0 }, "term" { "starttimeinseconds" "", "endtimeinseconds" "" }, "metadata" { "lastupdateeventtimeseconds" "", "version" "" }, "customerquotestatesmap" "", "documentcontractdetails" { "pdffilebytes" "", "pdfcontractsent" false, "docusignenvelopeid" "", "customeremail" "", "customername" "", "senderemail" "", "sendername" "", "customerstatus" \[ { "status" "", "timeinseconds" "" } ], "accountstatus" \[ { "status" "", "timeinseconds" "" } ] } }