Global API
...
Bill
Read
1 min
you can read all bills from xero without passing any filters however, to retrieve specific records based on any filter conditions, you can add the following filters as "queryparameters" as shown in the below example true 213,213,213 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type request // create a map to store all the data of a bill map\<string, object> billmap = new map\<string, object>(); billmap put('ids','192d2166 7cfa 4f30 89c1 9ad1dc1f55df'); // initializing the request data to be passed map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readbill'); reqobj put('queryparameters',billmap); //required, if xero multi org is enabled in breadwinner reqobj put('xeroorgid', '!aa00tm'); // placing a request to breadwinner global api map\<string, object> respmap = bread winner breadwinnerxeroapi call(reqobj); system debug(respmap); response { action=readbill, responsejson={ "statuscode" 200, "bills" \[ { "updateddateutc"\ null, "type" "accpay", "totaltax" 0 00, "totaldiscount"\ null, "total" 1000 00, "telephone" "", "subtotal" 1000 00, "status" "authorised", "senttocontact"\ null, "salesforcerecordid"\ null, "reference" "", "purchaseordernumber"\ null, "purchaseorderid"\ null, "payments" \[ ], "lineitems" \[ { "unitamount" 100 00, "tracking" \[ ], "taxtype" "output", "taxamount" 0 00, "quantity" 10 0000, "lineitemid" "1294d14b 30e6 4c76 85f5 d66de2c02b83", "lineamount" 1000 00, "itemcode"\ null, "discountrate"\ null, "description" "line item description updated", "accountcode" "200" } ], "lineamounttypes" "exclusive", "isdiscounted"\ false, "invoicenumber" "test bill", "invoiceid" "192d2166 7cfa 4f30 89c1 9ad1dc1f55df", "haserrors"\ false, "duedatestring" "2021 12 06t00 00 00", "duedate" "/date(1638748800000+0000)/", "deliveryinstructions" "", "deliverydatestring"\ null, "deliverydate"\ null, "deliveryaddress" "", "datevariable" "/date(1636588800000+0000)/", "datestring" "2021 11 11t00 00 00", "currencyrate" 1 0000000000, "currencycode" "inr", "creditnotes" \[ ], "contact" { "name" "test contact 2", "contactstatus"\ null, "contactid" "c84ebb15 0a8d 4145 933f 203e68d014a0" }, "brandingthemeid"\ null, "attentionto" "", "amountpaid" 0 00, "amountdue" 1000 00, "amountcredited" 0 00 } ], "errors" \[ ] }, timestamp=1636628499270, validrequest=true, version=1 0 }
