Global API
...
Request
Contact

Read

2min
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 param name type description order string order by any element returned page string up to 100 contacts will be returned per call when the page parameter is used e g page=1 includearchived boolean e g includearchived=true contacts with a status of archived will be included in the response ids string filter by a comma separated list of contactids allows you to retrieve a specific set of contacts in a single call where string filter using the where parameter we recommend you limit filtering to the optimised elements https //developer xero com/documentation/api/accounting/contacts#optimised use of the where filter only 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 }