API References
...
Orders
Preview Billing Information
1 min
code examples curl location 'https //api nue io/orders/invoices\ preview' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "customerid" "", "orders" \[ { "id" "" } ], "orderproducts" \[ { "id" "", "pricemodel" "", "startdate" "", "totalprice" "", "tax" "", "quantity" "", "productid" "", "productname" "", "linetype" "", "netsalesprice" "", "productsku" "" } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "customerid" "", "orders" \[ { "id" "" } ], "orderproducts" \[ { "id" "", "pricemodel" "", "startdate" "", "totalprice" "", "tax" "", "quantity" "", "productid" "", "productname" "", "linetype" "", "netsalesprice" "", "productsku" "" } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api nue io/orders/invoices\ preview", 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/invoices\ preview") 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({ "customerid" "", "orders" \[ { "id" "" } ], "orderproducts" \[ { "id" "", "pricemodel" "", "startdate" "", "totalprice" "", "tax" "", "quantity" "", "productid" "", "productname" "", "linetype" "", "netsalesprice" "", "productsku" "" } ] }) response = https request(request) puts response read body import requests import json url = "https //api nue io/orders/invoices\ preview" payload = json dumps({ "customerid" "", "orders" \[ { "id" "" } ], "orderproducts" \[ { "id" "", "pricemodel" "", "startdate" "", "totalprice" "", "tax" "", "quantity" "", "productid" "", "productname" "", "linetype" "", "netsalesprice" "", "productsku" "" } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successfully generated preview invoices \[ { "accountex" "", "accountid" "", "accountingstatus" "", "activatedbyid" "", "activatedtime" "", "amount" 0, "amountwithouttax" 0, "autonumberformat" "", "autonumbersequence" "", "balance" 0, "billtocontactex" "", "billtocontactid" "", "cancellationdate" "", "currencyisocode" "", "duedate" "", "einvoicingdocid" "", "einvoicingdocstatus" "", "einvoicingmandatecode" "", "einvoicingmandateid" "", "einvoicingmessage" "", "enddate" "", "entityid" "", "externalinvoiceid" "", "externaltaxid" "", "groupkey" "", "id" "", "invoicedate" "", "invoicenumber" "", "invoicepdf" "", "iscatchup" false, "items" \[ { "tenantid" "", "accountid" "", "groupkey" "", "invoiceid" "", "invoicenumber" "", "id" "", "recordtype" "", "iscatchup" false, "invoiceitemnumber" "", "productid" "", "productname" "", "assetid" "", "assetnumber" "", "assettype" "", "uomid" "", "uomex" "", "currencyisocode" "", "transactiondate" "", "transactionamount" 0, "transactionamountwithouttax" 0, "transactionquantity" 0, "shippingandhandling" 0, "taxamount" 0, "ratedcredits" 0, "appliedcredits" 0, "netsalesprice" 0, "balance" 0, "startdate" "", "enddate" "", "billingtiming" "", "status" "", "taxstatus" "", "salesaccountid" "", "details" \[ { "tenantid" "", "accountid" "", "invoiceid" "", "invoiceitemid" "", "id" "", "iscatchup" false, "orderproductid" "", "detailtype" "", "billedamount" 0, "transactionamount" 0, "transactionamountwithouttax" 0, "transactionquantity" 0, "shippingandhandling" 0, "billedshipping" 0, "taxamount" 0, "netsalesprice" 0, "ratedcredits" 0, "appliedcredits" 0, "startdate" "", "enddate" "", "billingtiming" "", "status" "", "taxstatus" "", "currencyisocode" "", "salesaccountid" "", "invoiceitemdetailnumber" "", "taxrates" "", "vatcode" "", "vatnumbertypeid" "", "avtuserbin" "", "autonumberformat" "", "autonumbersequence" "", "entityid" "" } ], "taxcode" "", "taxmode" "", "taxrates" "", "taxpercent" 0, "description" "", "autonumberformat" "", "autonumbersequence" "", "entityid" "", "targetdate" "", "customfields" "", "paymentstatus" "" } ], "paymentmethods" \[ "" ], "podates" "", "ponumbers" "", "recordtype" "", "salesaccountid" "", "shippingandhandling" 0, "source" "", "startdate" "", "status" "", "synctime" "", "targetdate" "", "taxamount" 0, "taxcompanycode" "", "taxerrormessage" "", "taxstatus" "", "templateid" "", "tenantid" "", "vatmessages" "" } ]// bad request { "title" "", "message" "", "errorcode" "" }// not found