Global API
...
Contact
Read
2 min
you can read all the contacts from xero without passing any filters however, to get only the filtered response results, 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 example request // create a map to store all the data of a contact map\<string, object> contactfiltersmap = new map\<string, object>(); contactfiltersmap put('ids', 'd7b9fa11 1b1b 4751 a0bb 1cbae4f43240'); // initializing the request data to be passed map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readcontact'); reqobj put('queryparameters', contactfiltersmap); //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=readcontact, responsejson={ "statuscode" "200", "contacts" \[ { "website"\ null, "taxnumber"\ null, "skypeusername"\ null, "salestrackingcategories"\ null, "salesdefaultaccountcode"\ null, "salesforcerecordid"\ null, "purchasestrackingcategories"\ null, "purchasesdefaultaccountcode"\ null, "phones" \[ { "phonetype" "ddi", "phonenumber" "", "phonecountrycode" "", "phoneareacode" "" }, { "phonetype" "default", "phonenumber" "", "phonecountrycode" "", "phoneareacode" "" }, { "phonetype" "fax", "phonenumber" "", "phonecountrycode" "", "phoneareacode" "" }, { "phonetype" "mobile", "phonenumber" "", "phonecountrycode" "", "phoneareacode" "" } ], "phone" "", "paymentterms"\ null, "name" "contact 1", "lastname" "", "lastmodifiedinxero" "2021 10 20t23 10 17 000z", "issupplier"\ true, "iscustomer"\ true, "firstname" "", "fax" "", "errormessage"\ null, "emailaddress" "", "discount"\ null, "defaultcurrency"\ null, "createddateinxero"\ null, "contactstatus" "active", "contactpersons" \[], "contactid" "d7b9fa11 1b1b 4751 a0bb 1cbae4f43240", "brandingtheme"\ null, "balances" { "accountsreceivable" { "overdue" 400 00, "outstanding" 400 00 }, "accountspayable" { "overdue" 50 00, "outstanding" 50 00 } }, "addresses" \[ { "region" "", "postalcode" "", "country" "", "city" "", "attentionto" "", "addresstype" "street", "addressline4"\ null, "addressline3"\ null, "addressline2"\ null, "addressline1"\ null }, { "region" "", "postalcode" "", "country" "", "city" "", "attentionto" "", "addresstype" "pobox", "addressline4"\ null, "addressline3"\ null, "addressline2"\ null, "addressline1"\ null } ], "accountsreceivabletaxtype"\ null, "accountspayabletaxtype"\ null, "accountnumber"\ null } ], }, timestamp=1635839827844, validrequest=true, version=1 0 }
