Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Create Invoice thru API

Started by Saba Khan -   in API Endpoints

Hi, When we use Xero's API to create invoice, for the Contact information, can we just use the Contact Name field alone? (i,e. Not Contact ID?)

If yes, then if the contact does not exist, does Xero throw an error or does it create the new contact

My system has a use case to push invoices into Xero, but for the Customer/Supplier name it is not clear if the name would be sufficient

Hi Saba,

If you only provide only a contact name, the API will either find the existing contact with that name or it will create a contact with that name if none currently exists.

Hope that helps,


Steven Brown (Xero Staff)