API References
...
Credit Memos
Convert Credits to Credit Memos
1 min
code examples curl location 'https //api nue io/billing/credits\ convert' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "credits" \[ {} ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "credits" \[ {} ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api nue io/billing/credits\ convert", 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/billing/credits\ convert") 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({ "credits" \[ {} ] }) response = https request(request) puts response read body import requests import json url = "https //api nue io/billing/credits\ convert" payload = json dumps({ "credits" \[ {} ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // default response { "creditmemos" \[ { "id" "", "tenantid" "", "invoicenumber" "", "creditmemonumber" "", "invoicedate" "", "creditmemodate" "", "accountid" "", "status" "", "recordtype" "", "amount" 0, "amountwithouttax" 0, "taxamount" 0, "balance" 0, "duedate" "", "activatedbyid" "", "activatedtime" "", "startdate" "", "enddate" "", "targetdate" "", "salesaccountid" "", "currencyisocode" "", "items" \[ { "id" "", "invoiceitemnumber" "", "invoiceid" "", "invoicenumber" "", "creditmemoitemnumber" "", "creditmemoid" "", "creditmemonumber" "", "tenantid" "", "accountid" "", "productid" "", "productname" "", "assetid" "", "assetnumber" "", "assettype" "", "uomid" "", "transactiondate" "", "transactionamount" 0, "transactionamountwithouttax" 0, "transactionquantity" 0, "taxamount" 0, "balance" 0, "startdate" "", "enddate" "", "status" "", "salesaccountid" "", "currencyisocode" "", "details" \[ { "id" "", "invoiceitemdetailnumber" "", "invoiceitemid" "", "invoiceid" "", "creditmemoitemdetailnumber" "", "creditmemoitemid" "", "creditmemoid" "", "tenantid" "", "accountid" "", "orderproductid" "", "transactionamountwithouttax" 0, "transactionquantity" 0, "taxamount" 0, "startdate" "", "enddate" "", "billingtiming" "", "status" "", "salesaccountid" "", "currencyisocode" "" } ] } ] } ] }// bad request { "title" "", "message" "", "errorcode" "" }// not found