Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

How to extract Contact primary key from Xero?

Started by Craig Thomson -   in Getting Started


I am integrating Xero and Salesforce using Integromat. This is fairly straightforward but I am stuck on one very fundamental point - which field do I use as the primary key in Xero?

I assume it is the 'Contact ID' which is appended to the url of a Contact record - https://go.xero.com/Contacts/View/9550ea20-c063-4b06-9bd1-7b5d379c51ab

Can someone please tell me:
1. Is the 'Contact ID' the best unique identifier to use for a Xero contact when integrating with external systems or is there another field that is better?

2 . How do I get a dump of the Contact table that includes the 'Contact ID' for ALL contacts so I can import them into Salesforce? I've looked at the existing reports but I don't see one for 'all contacts' or see the ability to add the Contact ID' to any of the reports. There must be a way to get these values out surely....

Any help is much appreciated.

Kind regards,


Hi Craig

1) Yes the contactID or the contacts UUID (Universal Unique Identifier) is what you want to use

2) I'd recommend setting up a rest client to do a GET on all your Contacts. We've got a collection where you can generate an OAuth2 token and make the call quickly https://github.com/XeroAPI/Xero-Insomnia

Christopher Knight (Xero Staff)