Amberflo API
Invoices
/payments/billing/customer-product-invoice/paginated
1 min
code examples curl location 'https //app amberflo io/payments/billing/customer product invoice/paginated' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //app amberflo io/payments/billing/customer product invoice/paginated", 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/billing/customer product invoice/paginated") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //app amberflo io/payments/billing/customer product invoice/paginated" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful request { "pageinfo" { "pagenumber" "", "pagesize" "", "pagetoken" "", "totalpages" "", "totalresults" "" }, "data" \[ { "invoiceuri" "", "uuid" "", "invoicekey" { "accountid" "", "customerid" "", "productid" "", "productplanid" "", "year" "", "month" "", "day" "" }, "planbillingperiod" { "interval" "", "intervalscount" "" }, "planname" "", "invoicestarttimeinseconds" "", "invoiceendtimeinseconds" "", "graceperiodinhours" "", "productiteminvoices" \[ { "key" { "accountid" "", "customerid" "", "productid" "", "productplanid" "", "year" "", "month" "", "day" "", "productitemkey" "" }, "productitemid" "", "productitemname" "", "meterapiname" "", "productplanname" "", "productiteminvoicelabel" "", "scalar" 0, "productitemvariants" \[ { "key" "", "itemdimensions" "", "dimensionlabel" "", "hourlybillinfos" \[ { "starttimeinseconds" "", "endtimeinseconds" "", "meterunits" 0, "price" 0, "meteredunitspertier" "", "pricepertier" "", "primarymeterunitname" "", "secondarymeterunitspertier" "", "secondarypricepertier" "", "priceincredits" 0, "priceinbasecurrency" 0 } ], "totalbill" { "starttimeinseconds" "", "endtimeinseconds" "", "meterunits" 0, "price" 0, "meteredunitspertier" "", "pricepertier" "", "primarymeterunitname" "", "secondarymeterunitspertier" "", "secondarypricepertier" "", "priceincredits" 0, "priceinbasecurrency" 0 }, "latearrivalmeters" 0 } ], "totalbill" { "starttimeinseconds" "", "endtimeinseconds" "", "meterunits" 0, "price" 0, "meteredunitspertier" "", "pricepertier" "", "primarymeterunitname" "", "secondarymeterunitspertier" "", "secondarypricepertier" "", "priceincredits" 0, "priceinbasecurrency" 0 } } ], "appliedpromotions" \[ { "customerappliedpromotionid" "", "promotionid" "", "promotionname" "", "promotiontype" "", "discount" 0, "hourlydiscounts" "", "promotionappliedtimeinseconds" "", "maxdiscountpossible" 0, "canbeusedforpayasyougo" false, "granularity" "", "entitytd" "", "dimensions" "", "promotionappliedtimerange" { "starttimeinseconds" "", "endtimeinseconds" "" }, "discountincredits" 0, "discountinbasecurrency" 0, "maxdiscountinbasecurrency" 0 } ], "appliedprepaids" \[ { "prepaiduri" "" } ], "productplanfees" \[ { "id" "", "name" "", "description" "", "cost" 0, "isonetimefee" false, "isprorated" false, "proratetoday" false, "discountable" false, "prepayable" false, "costincredits" 0, "costinbasecurrency" 0 } ], "appliedinvoicebasedfees" \[ { "feeid" "", "feename" "", "feeamount" 0, "feebytimeinseconds" "", "feeincredits" 0, "feeinbasecurrency" 0 } ], "appliedinvoicespendinglimitfees" \[ { "id" "", "label" "", "feeamount" 0, "feeamountincredits" 0, "feeamountinbasecurrency" 0 } ], "appliedcommitments" \[ { "commitmentid" "", "obligationid" "", "obligationname" "", "feeamount" 0, "feeincredits" 0, "feeinbasecurrency" 0 } ], "itemsubscriptiondetails" \[ { "productitemid" "", "variantsubscriptiondetails" \[ { "groupinfo" { "gi" "" }, "hourlyusage" \[ { "starttimeinseconds" "", "endtimeinseconds" "", "subscriptionunits" 0, "overageunits" 0 } ] } ] } ], "totalbill" { "starttimeinseconds" "", "endtimeinseconds" "", "totalprice" 0, "itemprice" 0, "fixprice" 0, "invoicebasedfees" 0, "invoicespendinglimitfees" 0, "commitmentsfees" 0, "prepaid" 0, "totaldiscount" 0, "totalpricebeforediscount" 0, "totalpricebeforeprepaid" 0, "totalpricebeforecommitments" 0, "totalpricebeforesalestax" 0, "discountablefixprice" 0, "discountablebaseprice" 0, "prepayablefixprice" 0, "prepayablenotdiscountablefees" 0, "prepayablecommitmentsfees" 0, "totalprepayableprice" 0 }, "invoicepricestatus" "", "creditunit" { "id" "", "shortname" "", "name" "", "ratiotocurrency" 0, "description" "", "active" false, "lastupdatetimeinmillis" "" }, "paymentstatus" "", "paymentcreatedinseconds" "", "externalsystemstatus" "", "invoicebillinbasecurrency" { "starttimeinseconds" "", "endtimeinseconds" "", "totalprice" 0, "itemprice" 0, "fixprice" 0, "invoicebasedfees" 0, "invoicespendinglimitfees" 0, "commitmentsfees" 0, "prepaid" 0, "totaldiscount" 0, "totalpricebeforediscount" 0, "totalpricebeforeprepaid" 0, "totalpricebeforecommitments" 0, "totalpricebeforesalestax" 0, "discountablefixprice" 0, "discountablebaseprice" 0, "prepayablefixprice" 0, "prepayablenotdiscountablefees" 0, "prepayablecommitmentsfees" 0, "totalprepayableprice" 0 }, "invoicebillincredits" { "starttimeinseconds" "", "endtimeinseconds" "", "totalprice" 0, "itemprice" 0, "fixprice" 0, "invoicebasedfees" 0, "invoicespendinglimitfees" 0, "commitmentsfees" 0, "prepaid" 0, "totaldiscount" 0, "totalpricebeforediscount" 0, "totalpricebeforeprepaid" 0, "totalpricebeforecommitments" 0, "totalpricebeforesalestax" 0, "discountablefixprice" 0, "discountablebaseprice" 0, "prepayablefixprice" 0, "prepayablenotdiscountablefees" 0, "prepayablecommitmentsfees" 0, "totalprepayableprice" 0 }, "prepaidpriceusedbasecurrency" 0, "prepaidpriceused" 0, "availableprepaidleft" 0, "availableprepaidleftbasecurrency" 0, "prepaidusageused" 0, "availableprepaidusageleft" 0, "availableprepaidleftincredits" 0, "invoicesalestax" { "totaltaxamount" 0, "totaltaxableamount" 0, "totalexemptamount" 0, "combinedtaxrate" 0, "hasnexus" false, "taxcode" "" }, "availablepayasyougomoney" 0, "availablepayasyougomoneyinbasecurrency" 0, "availablepayasyougomoneyincredits" 0, "paymentcurrencyinfo" { "baseplancurrency" "usd", "paymentcurrency" "usd", "exchangerate" 0 }, "paymentmethod" { "methodtype" "", "last4" "", "brand" "" }, "messages" \[ { "level" "", "code" "", "message" "" } ], "invoicestarttime" "", "invoiceendtime" "", "voided" false } ] }